[PATCH] selftests: add file SLAB_TYPESAFE_BY_RCU recycling stressor

2024-10-21 Thread Christian Brauner
AB_TYPEAFE_BY_RCU concurrently. This will trigger various warnings in the file reference counting code. Signed-off-by: Christian Brauner --- This is in vfs.file unless I hear objections. --- .../testing/selftests/filesystems/.gitignore | 1 + tools/testing/selftests/filesystems/Makefile | 2

Re: [PATCH] selftests/binderfs: use the Makefile's rules, not Make's implicit rules

2024-05-03 Thread Christian Brauner
g at lib.mk. > > Fix this by simply deleting the "binderfs_test:" Makefile target and > letting lib.mk handle it instead. > > [1] > https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c...@valentinobst.de/ > > Fixes: 6e29225af902 ("binderfs: port tests to test harness infrastructure") > Cc: Christian Brauner > Signed-off-by: John Hubbard > --- Reviewed-by: Christian Brauner

Re: [PATCH v3 7/9] selftests/pidfd: Fix wrong expectation

2024-05-02 Thread Christian Brauner
On Mon, Apr 29, 2024 at 09:19:09PM +0200, Mickaël Salaün wrote: > Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(), > which will be actually tested on the parent and child sides with a > following commit. > > Cc: Christian Brauner > Cc: Shuah Khan >

Re: [PATCH v3 1/9] selftests/pidfd: Fix config for pidfd_setns_test

2024-05-02 Thread Christian Brauner
On Mon, Apr 29, 2024 at 09:19:03PM +0200, Mickaël Salaün wrote: > Required by switch_timens() to open /proc/self/ns/time_for_children. > > CONFIG_GENERIC_VDSO_TIME_NS is not available on UML, so pidfd_setns_test > cannot be run successfully on this architecture. > > Cc: Chris

Re: tools/testing/selftests/clone3/clone3_set_tid.c appears to always pass?

2024-04-18 Thread Christian Brauner
On Wed, Apr 17, 2024 at 08:22:22AM -0700, Nathan Chancellor wrote: > Hi Christian, > > I am looking at tools/testing/selftests/clone3/clone3_set_tid.c as part > of a patch to clean up the uses of 'return ksft_exit_...();' throughout > the selftests (as they call exit() so they do not return) and I

Re: [PATCH v9 12/25] security: Introduce file_post_open hook

2024-02-09 Thread Christian Brauner
On Fri, Feb 09, 2024 at 11:46:16AM +0100, Roberto Sassu wrote: > On Fri, 2024-02-09 at 11:12 +0100, Christian Brauner wrote: > > On Mon, Jan 15, 2024 at 07:17:56PM +0100, Roberto Sassu wrote: > > > From: Roberto Sassu > > > > > > In preparation to move I

Re: [PATCH v9 10/25] security: Introduce inode_post_setattr hook

2024-02-09 Thread Christian Brauner
he operation to be > reverted. > > Signed-off-by: Roberto Sassu > Reviewed-by: Stefan Berger > Reviewed-by: Mimi Zohar > Acked-by: Casey Schaufler > --- > fs/attr.c | 1 + Acked-by: Christian Brauner

Re: [PATCH v9 11/25] security: Introduce inode_post_removexattr hook

2024-02-09 Thread Christian Brauner
to be > reverted. > > Signed-off-by: Roberto Sassu > Reviewed-by: Stefan Berger > Reviewed-by: Mimi Zohar > Reviewed-by: Casey Schaufler > --- > fs/xattr.c| 9 + Acked-by: Christian Brauner

Re: [PATCH v9 13/25] security: Introduce file_release hook

2024-02-09 Thread Christian Brauner
ease(file); > ima_file_free(file); This has always been an extremely dicy hook in here and that's caused us issues before for stacking filesystems so I'm not enthusiastic about exposing this to all LSMs. So reluctantly, Acked-by: Christian Brauner

Re: [PATCH v9 12/25] security: Introduce file_post_open hook

2024-02-09 Thread Christian Brauner
On Mon, Jan 15, 2024 at 07:17:56PM +0100, Roberto Sassu wrote: > From: Roberto Sassu > > In preparation to move IMA and EVM to the LSM infrastructure, introduce the > file_post_open hook. Also, export security_file_post_open() for NFS. > > Based on policy, IMA calculates the digest of the file c

Re: [PATCH v9 12/25] security: Introduce file_post_open hook

2024-02-09 Thread Christian Brauner
On Fri, Feb 09, 2024 at 10:56:33AM +0100, Christian Brauner wrote: > On Mon, Jan 15, 2024 at 07:17:56PM +0100, Roberto Sassu wrote: > > From: Roberto Sassu > > > > In preparation to move IMA and EVM to the LSM infrastructure, introduce the > > file_p

Re: [PATCH v9 12/25] security: Introduce file_post_open hook

2024-02-09 Thread Christian Brauner
> > The new hook returns a value and can cause the open to be aborted. > > Signed-off-by: Roberto Sassu > Reviewed-by: Stefan Berger > Acked-by: Casey Schaufler > Reviewed-by: Mimi Zohar > --- > fs/namei.c| 2 ++ Acked-by: Christian Brauner

Re: [PATCH v9 14/25] security: Introduce path_post_mknod hook

2024-02-09 Thread Christian Brauner
> Signed-off-by: Roberto Sassu > Acked-by: Casey Schaufler > Reviewed-by: Mimi Zohar > --- > fs/namei.c | 5 + Acked-by: Christian Brauner

Re: [PATCH v9 15/25] security: Introduce inode_post_create_tmpfile hook

2024-02-09 Thread Christian Brauner
y: Roberto Sassu > Acked-by: Casey Schaufler > Reviewed-by: Mimi Zohar > --- > fs/namei.c| 1 + Acked-by: Christian Brauner

Re: [PATCH v9 17/25] security: Introduce inode_post_remove_acl hook

2024-02-09 Thread Christian Brauner
he operation to be > reverted. > > Signed-off-by: Roberto Sassu > Reviewed-by: Stefan Berger > Acked-by: Casey Schaufler > Reviewed-by: Mimi Zohar > --- > fs/posix_acl.c| 1 + Acked-by: Christian Brauner

Re: [PATCH v9 16/25] security: Introduce inode_post_set_acl hook

2024-02-09 Thread Christian Brauner
be > reverted. > > Signed-off-by: Roberto Sassu > Reviewed-by: Stefan Berger > Acked-by: Casey Schaufler > Reviewed-by: Mimi Zohar > --- > fs/posix_acl.c| 1 + Acked-by: Christian Brauner

Re: [PATCH v9 20/25] ima: Move to LSM infrastructure

2024-02-09 Thread Christian Brauner
> > Finally, add the LSM_ID_IMA case in lsm_list_modules_test.c. > > Signed-off-by: Roberto Sassu > Acked-by: Chuck Lever > --- > fs/file_table.c | 2 - > fs/namei.c | 6 - > fs/nfsd/vfs.c | 7 -- > fs/open.c | 1 - Acked-by: Christian Brauner

Re: [PATCH v9 22/25] evm: Move to LSM infrastructure

2024-02-09 Thread Christian Brauner
| 2 - > fs/posix_acl.c | 3 - > fs/xattr.c| 2 - Acked-by: Christian Brauner

Re: [PATCH v9 21/25] ima: Move IMA-Appraisal to LSM infrastructure

2024-02-09 Thread Christian Brauner
hange(dentry, ia_valid); > security_inode_post_setattr(idmap, dentry, ia_valid); > - ima_inode_post_setattr(idmap, dentry, ia_valid); > evm_inode_post_setattr(idmap, dentry, ia_valid); > } Acked-by: Christian Brauner

Re: 回复: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc

2024-01-19 Thread Christian Brauner
> May I take the liberty to ask why I don't see patch applied to above branch? Just wasn't pushed yet. It is now.

Re: [PATCH v4] selftests/move_mount_set_group:Make tests build with old libc

2024-01-18 Thread Christian Brauner
On Thu, 11 Jan 2024 19:32:29 +0800, Hu Yadi wrote: > Replace SYS_ with __NR_. Using the __NR_ > notation, provided by UAPI, is useful to build tests on systems without > the SYS_ definitions. > > Replace SYS_move_mount with __NR_move_mount > > Similar changes: commit 87129ef13603 ("selftests/lan

Re: [PATCH] selftests/filesystems:fix build error in overlayfs

2024-01-17 Thread Christian Brauner
On Fri, 12 Jan 2024 15:40:59 +0800, Hu Yadi wrote: > One build issue comes up due to both mount.h included dev_in_maps.c > > In file included from dev_in_maps.c:10: > /usr/include/sys/mount.h:35:3: error: expected identifier before numeric > constant >35 | MS_RDONLY = 1, /* Mount read-only

Re: [PATCH] kselftest/clone3: Make test names for set_tid test stable

2023-11-24 Thread Christian Brauner
> root, a condition likely to be stable for a given test system. > > Signed-off-by: Mark Brown > --- May I already acked this. Not sure, Acked-by: Christian Brauner

Re: [PATCH RFT v3 2/5] fork: Add shadow stack support to clone3()

2023-11-23 Thread Christian Brauner
On Thu, Nov 23, 2023 at 12:17:19PM +, Mark Brown wrote: > On Thu, Nov 23, 2023 at 11:28:47AM +0100, Christian Brauner wrote: > > On Mon, Nov 20, 2023 at 11:54:30PM +, Mark Brown wrote: > > > Any reasonably maximum that should be assumed here? IOW, what happens if &g

Re: [PATCH RFT v3 0/5] fork: Support shadow stacks in clone3()

2023-11-23 Thread Christian Brauner
On Thu, Nov 23, 2023 at 11:37:54AM +, Mark Brown wrote: > On Thu, Nov 23, 2023 at 11:10:24AM +0100, Christian Brauner wrote: > > On Tue, Nov 21, 2023 at 04:09:40PM +, Mark Brown wrote: > > > On Tue, Nov 21, 2023 at 12:21:37PM +, Szabolcs Nagy wrote: > >

Re: [PATCH RFT v3 2/5] fork: Add shadow stack support to clone3()

2023-11-23 Thread Christian Brauner
On Mon, Nov 20, 2023 at 11:54:30PM +, Mark Brown wrote: > Unlike with the normal stack there is no API for configuring the the shadow > stack for a new thread, instead the kernel will dynamically allocate a new > shadow stack with the same size as the normal stack. This appears to be due > to t

Re: [PATCH RFT v3 0/5] fork: Support shadow stacks in clone3()

2023-11-23 Thread Christian Brauner
On Tue, Nov 21, 2023 at 04:09:40PM +, Mark Brown wrote: > On Tue, Nov 21, 2023 at 12:21:37PM +, Szabolcs Nagy wrote: > > The 11/21/2023 11:17, Christian Brauner wrote: > > > > I have a few questions that are probably me just not knowing much about > > > shad

Re: [PATCH RFT v3 0/5] fork: Support shadow stacks in clone3()

2023-11-21 Thread Christian Brauner
On Mon, Nov 20, 2023 at 11:54:28PM +, Mark Brown wrote: > The kernel has recently added support for shadow stacks, currently > x86 only using their CET feature but both arm64 and RISC-V have > equivalent features (GCS and Zicfiss respectively), I am actively > working on GCS[1]. With shadow st