Skip to content

bpf: Add kfuncs for read-only string operations #8902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: bpf-next_base
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/linux/btf.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ static inline bool btf_type_is_type_tag(const struct btf_type *t)
return BTF_INFO_KIND(t->info) == BTF_KIND_TYPE_TAG;
}

static inline bool btf_type_is_const(const struct btf_type *t)
{
return BTF_INFO_KIND(t->info) == BTF_KIND_CONST;
}

/* union is only a special case of struct:
* all its offsetof(member) == 0
*/
Expand Down
2 changes: 2 additions & 0 deletions include/linux/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ static inline bool pagefault_disabled(void)
*/
#define faulthandler_disabled() (pagefault_disabled() || in_atomic())

DEFINE_LOCK_GUARD_0(pagefault, pagefault_disable(), pagefault_enable())

#ifndef CONFIG_ARCH_HAS_SUBPAGE_FAULTS

/**
Expand Down
Loading
Loading