turning (2) into an error (-EBADF is what you'd get from
> attempt to set something at such descriptor) and seeing if anything
> breaks. And having SECCOMP_ADDFD_FLAG_SETFD status passed into kaddfd
> explicitly, with explicit check in seccomp_handle_addfd(). As in
>
> commit 42
breaks. And having SECCOMP_ADDFD_FLAG_SETFD status passed into kaddfd
explicitly, with explicit check in seccomp_handle_addfd(). As in
commit 42eb0d54c08a0331d6d295420f602237968d792b
Author: Christoph Hellwig
Date: Thu Mar 25 09:22:09 2021 +0100
fs: split receive_fd_replace from __receive_fd
On Thu, Mar 25, 2021 at 09:22:09AM +0100, Christoph Hellwig wrote:
> receive_fd_replace shares almost no code with the general case, so split
> it out. Also remove the "Bump the sock usage counts" comment from
> both copies, as that is now what __receive_sock actually does.
Nice, except that
On Thu, Mar 25, 2021 at 09:22:09AM +0100, Christoph Hellwig wrote:
> receive_fd_replace shares almost no code with the general case, so split
> it out. Also remove the "Bump the sock usage counts" comment from
> both copies, as that is now what __receive_sock actually does.
>
> Signed-off-by:
On Thu, Mar 25, 2021 at 09:22:08AM +0100, Christoph Hellwig wrote:
> The receive_fd_replace case shares almost no logic with the more general
> __receive_fd case, so split it into a separate function.
>
> BTW, I'm not sure if receive_fd_replace is such a useful primitive to
> start with, why not
The receive_fd_replace case shares almost no logic with the more general
__receive_fd case, so split it into a separate function.
BTW, I'm not sure if receive_fd_replace is such a useful primitive to
start with, why not just open code it in seccomp?
receive_fd_replace shares almost no code with the general case, so split
it out. Also remove the "Bump the sock usage counts" comment from
both copies, as that is now what __receive_sock actually does.
Signed-off-by: Christoph Hellwig
---
fs/file.c| 39
7 matches
Mail list logo