Skip to content
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

Add bpf_getxattr #3189

Closed
wants to merge 6 commits into from
Closed

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: Add bpf_getxattr
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=652161

@kernel-patches-bot
Copy link
Author

Master branch: b40b414
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=652161
version: 2

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=652161 expired. Closing PR.

@kernel-patches-bot
Copy link
Author

Master branch: d4609a5
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=652506
version: 3

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=652506 expired. Closing PR.

@kernel-patches-bot
Copy link
Author

Master branch: 6dc7a0b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=653430
version: 4

@kernel-patches-bot
Copy link
Author

Master branch: 395e942
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=653430
version: 4

@kernel-patches-bot
Copy link
Author

Master branch: 41188e9
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=653430
version: 4

@kernel-patches-bot
Copy link
Author

Master branch: 780d3d5
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=653430
version: 4

@kernel-patches-bot
Copy link
Author

Master branch: 2f6d1e0
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=653430
version: 4

Kernel Patches Daemon and others added 4 commits June 24, 2022 14:27
This allows to declare a kfunc as sleepable and prevents its use in
a non sleepable program.

Acked-by: KP Singh <kpsingh@kernel.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: KP Singh <kpsingh@kernel.org>
kfuncs can handle pointers to memory when the next argument is
the size of the memory that can be read and verify these as
ARG_CONST_SIZE_OR_ZERO

Similarly add support for string constants (const char *) and
verify it similar to ARG_PTR_TO_CONST_STR.

Signed-off-by: KP Singh <kpsingh@kernel.org>
In preparation for the addition of bpf_getxattr kfunc.

Signed-off-by: KP Singh <kpsingh@kernel.org>
@kernel-patches-bot
Copy link
Author

Master branch: fd75733
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=653430
version: 4

KP Singh added 2 commits June 24, 2022 14:27
LSMs like SELinux store security state in xattrs. bpf_getxattr enables
BPF LSM to implement similar functionality. In combination with
bpf_local_storage, xattrs can be used to develop more complex security
policies.

This kfunc wraps around __vfs_getxattr which can sleep and is,
therefore, limited to sleepable programs using the newly added
sleepable_set for kfuncs.

Signed-off-by: KP Singh <kpsingh@kernel.org>
A simple test that adds an xattr on a copied /bin/ls and reads it back
when the copied ls is executed.

Signed-off-by: KP Singh <kpsingh@kernel.org>
@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=653430 expired. Closing PR.

@kernel-patches-bot kernel-patches-bot deleted the series/641095=>bpf-next branch June 27, 2022 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants