Re: [PATCH v3 04/47] filelock: add some new helper functions

2024-02-05 Thread Christian Brauner
On Mon, Feb 05, 2024 at 07:06:00AM -0500, Jeff Layton wrote: > On Mon, 2024-02-05 at 12:57 +0100, Christian Brauner wrote: > > On Mon, Feb 05, 2024 at 06:55:44AM -0500, Jeff Layton wrote: > > > On Mon, 2024-02-05 at 12:36 +0100, Christian Brauner wrote: > > > >

Re: [PATCH v3 04/47] filelock: add some new helper functions

2024-02-05 Thread Christian Brauner
On Mon, Feb 05, 2024 at 06:55:44AM -0500, Jeff Layton wrote: > On Mon, 2024-02-05 at 12:36 +0100, Christian Brauner wrote: > > > diff --git a/include/linux/filelock.h b/include/linux/filelock.h > > > index 085ff6ba0653..a814664b1053 100644 > > > --- a/include/linux/

Re: [PATCH v3 04/47] filelock: add some new helper functions

2024-02-05 Thread Christian Brauner
> diff --git a/include/linux/filelock.h b/include/linux/filelock.h > index 085ff6ba0653..a814664b1053 100644 > --- a/include/linux/filelock.h > +++ b/include/linux/filelock.h > @@ -147,6 +147,29 @@ int fcntl_setlk64(unsigned int, struct file *, unsigned > int, > int fcntl_setlease(unsigned int

Re: [PATCH v3 00/47] filelock: split file leases out of struct file_lock

2024-02-02 Thread Christian Brauner
uest based on the patches. And this has a merge commit of the following form: commit 363af2435e403ac323ab2543da91f5984047bdb8 Merge: 6613476e225e 6c6109548454 Author: Christian Brauner AuthorDate: Fri Feb 2 12:09:26 2024 +0100 Commit: Christian Brauner CommitDate: Fri Feb 2 12:09:26 2024

Re: [PATCH 00/20] filelock: split struct file_lock into file_lock and file_lease structs

2024-01-17 Thread Christian Brauner
> I'd like to have this considered for inclusion in v6.9. Christian, would > you be amenable to shepherding this into mainline (assuming there are no > major objections, of course)? Yes, of course I will be happy to.

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-12 Thread Christian Brauner
On Thu, Jan 11, 2024 at 04:53:19PM -0500, Steven Rostedt wrote: > On Thu, 11 Jan 2024 22:01:32 +0100 > Christian Brauner wrote: > > > What I'm pointing out in the current logic is that the caller is > > taxed twice: > > > > (1) Once when the VFS has done inode_p

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-11 Thread Christian Brauner
On Wed, Jan 10, 2024 at 08:07:46AM -0500, Steven Rostedt wrote: > On Wed, 10 Jan 2024 12:45:36 +0100 > Christian Brauner wrote: > > > So say you do: > > > > mkdir /sys/kernel/tracing/instances/foo > > > > After this has returned we know everything we

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-10 Thread Christian Brauner
On Mon, Jan 08, 2024 at 10:23:31AM -0500, Steven Rostedt wrote: > On Mon, 8 Jan 2024 12:04:54 +0100 > Christian Brauner wrote: > > > > > IOW, the inode_permission() in lookup_one_len() that eventfs does is > > > > redundant and just wrong. > > > &

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-08 Thread Christian Brauner
On Sun, Jan 07, 2024 at 01:32:28PM -0500, Steven Rostedt wrote: > On Sun, 7 Jan 2024 13:29:12 -0500 > Steven Rostedt wrote: > > > > > > > IOW, the inode_permission() in lookup_one_len() that eventfs does is > > > redundant and just wrong. > > > > I don't think so. > > Just to make it clear.

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-08 Thread Christian Brauner
> > * Tracefs supports the creation of instances from userspace via mkdir. > > For example, > > > > mkdir /sys/kernel/tracing/instances/foo > > > > And here the idmapping is relevant so we need to make the helpers > > aware of the idmapping. > > > > I just went and plumbed this

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-07 Thread Christian Brauner
On Sun, Jan 07, 2024 at 06:42:33PM +0100, Christian Brauner wrote: > On Sun, Jan 07, 2024 at 01:42:39PM +0100, Christian Brauner wrote: > > > > So tracefs supports remounting with different uid/gid mount options and > > > > then actually wades through _all

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-07 Thread Christian Brauner
On Sun, Jan 07, 2024 at 01:42:39PM +0100, Christian Brauner wrote: > > > So tracefs supports remounting with different uid/gid mount options and > > > then actually wades through _all_ of the inodes and changes their > > > ownership internally? What's the us

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-07 Thread Christian Brauner
e they already exist (they were created during mkdir) we just need to splice in inodes and dentries for them. But for that we shouldn't check permissions on the directory again. Because we've done that already correctly when the VFS called may_lookup(). IOW, the inode_permission() in lookup_one_len(

Re: [PATCH] tracefs/eventfs: Use root and instance inodes as default ownership

2024-01-05 Thread Christian Brauner
On Wed, Jan 03, 2024 at 08:32:46PM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of walking the dentries on mount/remount to update the gid values of > all the dentries if a gid option is specified on mount, just update the root > inode. Add .getattr, .setattr, and

Re: [PATCH] fs : Fix warning using plain integer as NULL

2023-11-08 Thread Christian Brauner
On Wed, 08 Nov 2023 10:15:50 +0530, Abhinav Singh wrote: > Sparse static analysis tools generate a warning with this message > "Using plain integer as NULL pointer". In this case this warning is > being shown because we are trying to initialize pointer to NULL using > integer value 0. > >

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-15 Thread Christian Brauner
> Lifetime rules for fs-private parts of superblock are really private to Fine, I'll drop that. It's still correct that a filesystem needs to take care when it frees sb->s_fs_info. See the RCU fun you just encountered.

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-15 Thread Christian Brauner
logic fwiw. I hope to upstream these docs soon so we all have something to point to. >From 200666901f53db74edf309d48e3c74fd275a822a Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 15 Sep 2023 16:01:02 +0200 Subject: [PATCH 1/2] porting: document new block device opening order

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-15 Thread Christian Brauner
On Thu, Sep 14, 2023 at 05:58:05PM +0100, Al Viro wrote: > On Thu, Sep 14, 2023 at 04:02:25PM +0200, Christian Brauner wrote: > > > Yes, you're right that making the superblock and not the filesytem type > > the bd_holder changes the logic and we are aware of that of course. A

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-15 Thread Christian Brauner
On Thu, Sep 14, 2023 at 08:23:31PM +0100, Al Viro wrote: > On Thu, Sep 14, 2023 at 05:58:05PM +0100, Al Viro wrote: > > > Incidentally, I'm going to add a (belated by 10 years) chunk in porting.rst > > re making sure that anything in superblock that might be needed by methods > > called in RCU

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-14 Thread Christian Brauner
> Christoph, could you explain what the hell do we need that for? It does > create the race in question and AFAICS 2c18a63b760a (and followups trying > to plug holes in it) had been nothing but headache. > > Old logics: if mount attempt with a different fs type happens, -EBUSY > is precisely

Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super

2023-09-14 Thread Christian Brauner
> BTW, this part of commit message in 2c18a63b760a is rather confused: > Recent rework moved block device closing out of sb->put_super() and into > sb->kill_sb() to avoid deadlocks as s_umount is held in put_super() and > blkdev_put() can end up taking s_umount again. > > That was

Re: [PATCH 01/19] fs: reflow deactivate_locked_super

2023-09-13 Thread Christian Brauner
(struct super_block *s) I wouldn't mind s/s/sb/ here as well. So we stop using @s in some and @sb in other places. Otherwise looks good to me, Reviewed-by: Christian Brauner

Re: [PATCH v3.4] capabilities: require CAP_SETFCAP to map uid 0

2021-04-20 Thread Christian Brauner
c2d3eaa83 ("Revert > 95ebabde382c ("capabilities: Don't allow writing ambiguous v3 file > capabilities")"). > > [1]: https://github.com/containers/buildah/issues/3071 > > Signed-off-by: Serge Hallyn > Reviewed-by: Andrew G. Morgan > Tested-by: Christian B

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.3)

2021-04-20 Thread Christian Brauner
On Mon, Apr 19, 2021 at 10:42:08PM -0500, Serge Hallyn wrote: > On Mon, Apr 19, 2021 at 06:09:11PM +0200, Christian Brauner wrote: > > On Mon, Apr 19, 2021 at 07:25:14AM -0500, Serge Hallyn wrote: > > > cap_setfcap is required to create file capabilities. > > >

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.3)

2021-04-19 Thread Christian Brauner
abde382c ("capabilities: Don't allow writing ambiguous v3 file capabilities") > Signed-off-by: Serge Hallyn > Reviewed-by: Andrew G. Morgan > Tested-by: Christian Brauner > Reviewed-by: Christian Brauner > Cc: "Eric W. Biederman"

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-19 Thread Christian Brauner
On Mon, Apr 19, 2021 at 05:52:39PM +0200, Giuseppe Scrivano wrote: > ebied...@xmission.com (Eric W. Biederman) writes: > > > Guiseppe can you take a look at this? > > > > This is a second attempt at tightening up the semantics of writing to > > file capabilities from a user namespace. > > > > The

Re: [PATCH] linux/mount.h: Remove duplicate struct declaration

2021-04-19 Thread Christian Brauner
On Mon, Apr 19, 2021 at 07:33:04PM +0800, Wan Jiabing wrote: > struct path is declared at 85th line. > The declaration here is unnecessary. Remove it. > > Signed-off-by: Wan Jiabing > --- Looks good, Reviewed-by: Christian Brauner

Re: [PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3.2)

2021-04-18 Thread Christian Brauner
verify_root_mapping to Christian's suggested flow > --- Thank you. This looks good. I tested this with: - fstests - LXD testsuite - Podman testsuite - libcap testsuite Tested-by: Christian Brauner Reviewed-by: Christian Brauner

Re: [RFC PATCH] capabilities: require CAP_SETFCAP to map uid 0 (v3)

2021-04-16 Thread Christian Brauner
On Thu, Apr 15, 2021 at 11:58:51PM -0500, Serge Hallyn wrote: > (Eric - this patch (v3) is a cleaned up version of the previous approach. > v4 is at > https://git.kernel.org/pub/scm/linux/kernel/git/sergeh/linux.git/log/?h=2021-04-15/setfcap-nsfscaps-v4 > and is the approach you suggested. I can

Re: [PATCH] fs: split receive_fd_replace from __receive_fd

2021-04-16 Thread Christian Brauner
On Fri, Apr 16, 2021 at 04:15:43AM +, Al Viro wrote: > On Fri, Apr 02, 2021 at 12:01:05PM -0700, Kees Cook wrote: > > 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

Re: [PATCH] Documentation: syscalls: add a note about ABI-agnostic types

2021-04-14 Thread Christian Brauner
On Wed, Apr 14, 2021 at 12:46:01PM +0300, Mike Rapoport wrote: > On Wed, Apr 14, 2021 at 10:46:05AM +0200, Christian Brauner wrote: > > On Wed, Apr 14, 2021 at 08:14:22AM +0200, Mauro Carvalho Chehab wrote: > > > Em Tue, 13 Apr 2021 21:40:20 -0700 > > > Yury Norov es

Re: [PATCH] Documentation: syscalls: add a note about ABI-agnostic types

2021-04-14 Thread Christian Brauner
Kernels with 32-bits userspace and when cameras started > being supported on arm32. > > We did have some real bugs with "enum", as, on that time, some > compilers (gcc, I guess) were optimizing them to have less than > 32 bits on certain architectures, when it fits. Fwiw, Ale

Re: [PATCH 1/1] seccomp: Always "goto wait" if the list is empty

2021-04-13 Thread Christian Brauner
present since 5.9, when addfd was added. > > Fixes: 7cf97b1254550 > Cc: sta...@vger.kernel.org # 5.9+ > Signed-off-by: Rodrigo Campos > --- So the agent will see the return value from wait_for_completion_interruptible() and know that the addfd wasn't successful and the target will notice that no addfd request has actually been added and essentially try again. Seems like a decent fix and can be backported cleanly. I assume seccomp testsuite passes. Acked-by: Christian Brauner

[GIT PULL] close_range fix

2021-04-08 Thread Christian Brauner
! Christian for-linus-2021-04-08 Christian Brauner (1): file: fix close_range() for unshare+cloexec fs/file.c | 21 + 1 file changed, 17 insertions

Re: [RFC bpf-next 1/1] bpf: Introduce iter_pagecache

2021-04-08 Thread Christian Brauner
On Wed, Apr 07, 2021 at 02:46:11PM -0700, Daniel Xu wrote: > This commit introduces the bpf page cache iterator. This iterator allows > users to run a bpf prog against each page in the "page cache". > Internally, the "page cache" is extremely tied to VFS superblock + inode > combo. Because of

Re: [RFC bpf-next 0/1] bpf: Add page cache iterator

2021-04-08 Thread Christian Brauner
On Wed, Apr 07, 2021 at 02:46:10PM -0700, Daniel Xu wrote: > There currently does not exist a way to answer the question: "What is in > the page cache?". There are various heuristics and counters but nothing > that can tell you anything like: > > * 3M from /home/dxu/foo.txt > * 5K from ... >

Re: High kmalloc-32 slab cache consumption with 10k containers

2021-04-07 Thread Christian Brauner
On Wed, Apr 07, 2021 at 08:28:07AM +1000, Dave Chinner wrote: > On Mon, Apr 05, 2021 at 11:18:48AM +0530, Bharata B Rao wrote: > > Hi, > > > > When running 1 (more-or-less-empty-)containers on a bare-metal Power9 > > server(160 CPUs, 2 NUMA nodes, 256G memory), it is seen that memory > >

Re: High kmalloc-32 slab cache consumption with 10k containers

2021-04-07 Thread Christian Brauner
On Wed, Apr 07, 2021 at 01:54:48PM +0200, Michal Hocko wrote: > On Mon 05-04-21 11:18:48, Bharata B Rao wrote: > > Hi, > > > > When running 1 (more-or-less-empty-)containers on a bare-metal Power9 > > server(160 CPUs, 2 NUMA nodes, 256G memory), it is seen that memory > > consumption

Re: [PATCH v5 08/12] evm: Pass user namespace to set/remove xattr hooks

2021-04-07 Thread Christian Brauner
etermined > by posix_acl_update_mode(). > > Cc: Christian Brauner > Cc: Andreas Gruenbacher > Signed-off-by: Roberto Sassu > --- Looks good, Reviewed-by: Christian Brauner

Re: [PATCH v5 09/12] evm: Allow setxattr() and setattr() for unmodified metadata

2021-04-07 Thread Christian Brauner
signatures are immutable, all subsequent operations > fail (e.g. fchown()), even if the operation is legitimate (does not alter > the current value). > > This patch avoids this problem by reporting successful operation to user > space when that operation does not alter the current valu

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Christian Brauner
On Tue, Apr 06, 2021 at 02:15:01PM +, Al Viro wrote: > On Tue, Apr 06, 2021 at 03:22:05PM +0200, Christian Brauner wrote: > > > Why is a another function in charge of checking the return value of an > > initialization function. If something like path_init() fails why is t

Re: [PATCH v1 1/1] kernel.h: Split out panic and oops helpers

2021-04-06 Thread Christian Brauner
ase. (Be good to see kbuild do an allmodconfig build of this though.) Acked-by: Christian Brauner > arch/powerpc/kernel/setup-common.c | 1 + > arch/x86/include/asm/desc.h | 1 + > arch/x86/kernel/cpu/mshyperv.c | 1 + > arch/x86/kernel/setup.c | 1 + &g

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Christian Brauner
On Tue, Apr 06, 2021 at 01:13:13PM +, Al Viro wrote: > On Tue, Apr 06, 2021 at 02:35:05PM +0200, Christian Brauner wrote: > > > And while we're at it might I bring up the possibility of an additional > > cleanup of how we currently call path_init(). > > Right now we pa

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-06 Thread Christian Brauner
On Tue, Apr 06, 2021 at 01:38:39AM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 10:07:37PM +0200, Christian Brauner wrote: > > > > diff --git a/fs/namei.c b/fs/namei.c > > > index 216f16e74351..82344f1139ff 100644 > > > --- a/fs/namei.c > > > +++ b/fs/

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Christian Brauner
On Mon, Apr 05, 2021 at 06:28:54PM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 06:23:49PM +, Al Viro wrote: > > On Mon, Apr 05, 2021 at 07:08:01PM +0200, Christian Brauner wrote: > > > > > Ah dentry count of -127 looks... odd. > > > > dead + 1... &g

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Christian Brauner
On Mon, Apr 05, 2021 at 04:18:58PM +, Al Viro wrote: > On Mon, Apr 05, 2021 at 01:44:37PM +0200, Christian Brauner wrote: > > On Sun, Apr 04, 2021 at 08:17:21PM +, Al Viro wrote: > > > On Sun, Apr 04, 2021 at 06:50:10PM +, Al Viro wrote: > > > > > &g

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-05 Thread Christian Brauner
On Sun, Apr 04, 2021 at 08:17:21PM +, Al Viro wrote: > On Sun, Apr 04, 2021 at 06:50:10PM +, Al Viro wrote: > > > > Yeah, I have at least namei.o > > > > > > https://drive.google.com/file/d/1AvO1St0YltIrA86DXjp1Xg3ojtS9owGh/view?usp=sharing > > > > *grumble* > > > > Is it reproducible

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 04:44:06PM +, Al Viro wrote: > On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > > > > Very interesting. What happens if you call loop() twice? And now I > > > wonder > > > whether it's root or cwd, actually.

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 06:52:08PM +0200, Christian Brauner wrote: > On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > > On Sun, Apr 04, 2021 at 03:56:02PM +, Al Viro wrote: > > > On Sun, Apr 04, 2021 at 01:34:45PM +0200, Christian Brauner wrote: &g

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 06:40:40PM +0200, Christian Brauner wrote: > On Sun, Apr 04, 2021 at 03:56:02PM +, Al Viro wrote: > > On Sun, Apr 04, 2021 at 01:34:45PM +0200, Christian Brauner wrote: > > > > > Sorry for not replying to your earlier mail but I've been debu

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 03:56:02PM +, Al Viro wrote: > On Sun, Apr 04, 2021 at 01:34:45PM +0200, Christian Brauner wrote: > > > Sorry for not replying to your earlier mail but I've been debugging this > > too. My current theory is that it's related to LOOKUP

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-04 Thread Christian Brauner
On Sun, Apr 04, 2021 at 02:34:08AM +, Al Viro wrote: > On Thu, Apr 01, 2021 at 07:11:12PM +, Al Viro wrote: > > > > I _think_ I see what the issue is. It seems that an assumption made in > > > this commit might be wrong and we're missing a mnt_add_count() bump that > > > we would

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 05:16:03AM -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit 73d90386b559d6f4c3c5db5e6bb1b68aae8fd3e7 > Author: Damien Le Moal > Date: Thu Jan 28 04:47:27 2021 + > > nvme: cleanup zone information initialization > > bisection log:

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 02:09:20AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:d19cc4bf Merge tag 'trace-v5.12-rc5' of git://git.kernel.o.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=1018f281d0 >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 07:46:13PM +0200, Christian Brauner wrote: > On Thu, Apr 01, 2021 at 10:09:18AM -0600, Jens Axboe wrote: > > On 4/1/21 9:45 AM, Christian Brauner wrote: > > > On Thu, Apr 01, 2021 at 02:09:20AM -0700, syzbot wrote: > > >> Hello, > >

Re: [syzbot] WARNING in mntput_no_expire (2)

2021-04-01 Thread Christian Brauner
On Thu, Apr 01, 2021 at 10:09:18AM -0600, Jens Axboe wrote: > On 4/1/21 9:45 AM, Christian Brauner wrote: > > On Thu, Apr 01, 2021 at 02:09:20AM -0700, syzbot wrote: > >> Hello, > >> > >> syzbot found the following issue on: > >> > >&g

Re: [syzbot] KASAN: null-ptr-deref Read in filp_close (2)

2021-03-29 Thread Christian Brauner
On Mon, Mar 29, 2021 at 11:21:34AM +0200, Christian Brauner wrote: > On Sat, Mar 27, 2021 at 11:33:37PM +, Al Viro wrote: > > On Fri, Mar 26, 2021 at 02:50:11PM +0100, Christian Brauner wrote: > > > @@ -632,6 +632,7 @@ EXPORT_SYMBOL(close_fd); /* for ksys_close() */ > &g

Re: [syzbot] KASAN: null-ptr-deref Read in filp_close (2)

2021-03-29 Thread Christian Brauner
On Sat, Mar 27, 2021 at 11:33:37PM +, Al Viro wrote: > On Fri, Mar 26, 2021 at 02:50:11PM +0100, Christian Brauner wrote: > > @@ -632,6 +632,7 @@ EXPORT_SYMBOL(close_fd); /* for ksys_close() */ > > static inline void __range_cloexec(struct files_

Re: [syzbot] KASAN: null-ptr-deref Read in filp_close (2)

2021-03-26 Thread Christian Brauner
On Fri, Mar 26, 2021 at 10:34:28AM +0100, Christian Brauner wrote: > On Fri, Mar 26, 2021, 10:21 Dmitry Vyukov wrote: > > > On Fri, Mar 26, 2021 at 10:12 AM Christian Brauner > > wrote: > > > > > > On Fri, Mar 26, 2021 at 09:02:08AM +0100, Dmitry Vyukov wrot

Re: [syzbot] KASAN: null-ptr-deref Read in filp_close (2)

2021-03-26 Thread Christian Brauner
On Fri, Mar 26, 2021 at 09:02:08AM +0100, Dmitry Vyukov wrote: > On Fri, Mar 26, 2021 at 8:55 AM syzbot > wrote: > > > > Hello, > > > > syzbot found the following issue on: > > > > HEAD commit:5ee96fa9 Merge tag 'irq-urgent-2021-03-21' of git://git.ke.. > > git tree: upstream > >

Re: [PATCH v4 08/11] evm: Allow setxattr() and setattr() for unmodified metadata

2021-03-25 Thread Christian Brauner
On Thu, Mar 25, 2021 at 01:13:41PM +0100, Christian Brauner wrote: > On Thu, Mar 25, 2021 at 10:53:43AM +, Roberto Sassu wrote: > > > From: Roberto Sassu > > > Sent: Friday, March 5, 2021 4:19 PM > > > With the patch to allow xattr/attr operations if a portabl

Re: [PATCH v4 08/11] evm: Allow setxattr() and setattr() for unmodified metadata

2021-03-25 Thread Christian Brauner
On Thu, Mar 25, 2021 at 10:53:43AM +, Roberto Sassu wrote: > > From: Roberto Sassu > > Sent: Friday, March 5, 2021 4:19 PM > > With the patch to allow xattr/attr operations if a portable signature > > verification fails, cp and tar can copy all xattrs/attrs so that at the > > end of the

[PATCH] fanotify_user: use upper_32_bits() to verify mask

2021-03-25 Thread Christian Brauner
From: Christian Brauner I don't see an obvious reason why the upper 32 bit check needs to be open-coded this way. Switch to upper_32_bits() which is more idiomatic and should conceptually be the same check. Cc: Amir Goldstein Cc: Jan Kara Signed-off-by: Christian Brauner --- fs/notify

Re: split receive_fd_replace from __receive_fd

2021-03-25 Thread Christian Brauner
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

Re: [PATCH v2 01/18] vfs: add miscattr ops

2021-03-24 Thread Christian Brauner
On Mon, Mar 22, 2021 at 03:48:59PM +0100, Miklos Szeredi wrote: > There's a substantial amount of boilerplate in filesystems handling > FS_IOC_[GS]ETFLAGS/ FS_IOC_FS[GS]ETXATTR ioctls. > > Also due to userspace buffers being involved in the ioctl API this is > difficult to stack, as shown by

Re: [PATCH v2 01/18] vfs: add miscattr ops

2021-03-24 Thread Christian Brauner
On Mon, Mar 22, 2021 at 03:33:38PM -0700, Darrick J. Wong wrote: > On Mon, Mar 22, 2021 at 03:48:59PM +0100, Miklos Szeredi wrote: > > There's a substantial amount of boilerplate in filesystems handling > > FS_IOC_[GS]ETFLAGS/ FS_IOC_FS[GS]ETXATTR ioctls. > > > > Also due to userspace buffers

Re: [PATCH 1/3] posic_acl: Add a helper determine if SGID should be cleared

2021-03-23 Thread Christian Brauner
On Mon, Mar 22, 2021 at 01:01:11PM -0400, Vivek Goyal wrote: > On Sat, Mar 20, 2021 at 11:03:22AM +0100, Christian Brauner wrote: > > On Fri, Mar 19, 2021 at 11:42:48PM +0100, Andreas Grünbacher wrote: > > > Hi, > > > > > > Am Fr., 19. März 2

Re: [PATCH] hfs/hfsplus: use WARN_ON for sanity check

2021-03-23 Thread Christian Brauner
panic() is probably not the correct choice here, but a WARN_ON > seems appropriate and avoids the compile-time warning. > > Signed-off-by: Arnd Bergmann > --- Thanks! Reviewed-by: Christian Brauner

Re: [PATCH] kernel/sys.c: Fix a typo

2021-03-23 Thread Christian Brauner
On Tue, Mar 23, 2021 at 06:49:09AM +0530, Bhaskar Chowdhury wrote: > > s/concurent/concurrent/ > > Signed-off-by: Bhaskar Chowdhury > --- Looks good, Reviewed-by: Christian Brauner

Re: [PATCH] kernel/signal: Modify the comment of function check_kill_permission

2021-03-23 Thread Christian Brauner
On Tue, Mar 23, 2021 at 01:03:56AM -0700, zhouchuangao wrote: > Maybe it's easier for us to understand the function of > check_kill_permission. > > Signed-off-by: zhouchuangao > --- > kernel/signal.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/kernel/signal.c

Re: [PATCH 03/11] security: commoncap: fix -Wstringop-overread warning

2021-03-22 Thread Christian Brauner
> Add a separate NULL check to tell gcc about it as well. > > Signed-off-by: Arnd Bergmann > --- Seems reasonable, Acked-by: Christian Brauner

Re: [PATCH] arcc/kernel/process: Few mundane typo fixes

2021-03-22 Thread Christian Brauner
rocess there's a typo in the patch subject :) s/arcc/arc/ otherwise Reviewed-by: Christian Brauner

Re: [PATCH] [v2] posix-acl: avoid -Wempty-body warning

2021-03-22 Thread Christian Brauner
expression these days, it is no longer > necessary to evaluate its return code, and the if() can just be droped. > > Signed-off-by: Arnd Bergmann > --- Thanks you! Reviewed-by: Christian Brauner

Re: [PATCH] posix-acl: avoid -Wempty-body warning

2021-03-22 Thread Christian Brauner
On Mon, Mar 22, 2021 at 02:02:54PM +0100, Arnd Bergmann wrote: > On Mon, Mar 22, 2021 at 1:15 PM Christian Brauner > wrote: > > On Mon, Mar 22, 2021 at 12:38:24PM +0100, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > The fallthrough commen

Re: [PATCH] posix-acl: avoid -Wempty-body warning

2021-03-22 Thread Christian Brauner
t drop the if() entirely, but > in some cases this causes a different warning. And you don't see the warning for the second unconditional cmpxchg(p, sentinel, ACL_NOT_CACHED); below? > > Signed-off-by: Arnd Bergmann > --- In any case that should be fine, Reviewed-by: Christian Brauner

Re: [PATCH 1/3] posic_acl: Add a helper determine if SGID should be cleared

2021-03-20 Thread Christian Brauner
On Fri, Mar 19, 2021 at 11:42:48PM +0100, Andreas Grünbacher wrote: > Hi, > > Am Fr., 19. März 2021 um 20:58 Uhr schrieb Vivek Goyal : > > posix_acl_update_mode() determines what's the equivalent mode and if SGID > > needs to be cleared or not. I need to make use of this code in fuse > > as well.

Re: seccomp: Delay filter activation

2021-03-19 Thread Christian Brauner
On Thu, Mar 18, 2021 at 08:39:13PM +, Sargun Dhillon wrote: > On Thu, Mar 18, 2021 at 03:54:54PM +0100, Christian Brauner wrote: > > Sorry, I just found that mail. > > > > On Mon, Mar 01, 2021 at 03:44:06PM -0800, Kees Cook wrote: > > > On Mon, Mar 01, 2021

Re: [PATCH] fs/dcache: fix typos and sentence disorder

2021-03-18 Thread Christian Brauner
On Thu, Mar 18, 2021 at 04:35:34PM +, Al Viro wrote: > On Thu, Mar 18, 2021 at 03:00:20PM +, Matthew Wilcox wrote: > > On Thu, Mar 18, 2021 at 10:31:53PM +0800, Xiaofeng Cao wrote: > > > change 'sould' to 'should' > > > change 'colocated' to 'collocated' > > > > uh. collocated is

Re: [PATCH] fs/exec: fix typos and sentence disorder

2021-03-18 Thread Christian Brauner
On Thu, Mar 18, 2021 at 11:31:45PM +0800, Xiaofeng Cao wrote: > change 'backwords' to 'backwards' > change 'and argument' to 'an argument' > change 'visibile' to 'visible' > change 'wont't' to 'won't' > reorganize sentence > > Signed-off-by: Xiaofeng Cao > --- Reviewed-by: Christian Brauner

Re: seccomp: Delay filter activation

2021-03-18 Thread Christian Brauner
Sorry, I just found that mail. On Mon, Mar 01, 2021 at 03:44:06PM -0800, Kees Cook wrote: > On Mon, Mar 01, 2021 at 02:21:56PM +0100, Christian Brauner wrote: > > On Mon, Mar 01, 2021 at 12:09:09PM +0100, Christian Brauner wrote: > > > On Sat, Feb 20, 2021 at 01:31:57AM -08

Re: [PATCH] proc: fix incorrect pde_is_permanent check

2021-03-18 Thread Christian Brauner
root with next. > > Addresses-Coverity: ("Copy-paste error") > Fixes: d919b33dafb3 ("proc: faster open/read/close with "permanent" files") > Signed-off-by: Colin Ian King > --- Thanks! Seems very much like it. Acked-by: Christian Brauner

Re: [PATCH 1/2] audit: add support for the openat2 syscall

2021-03-18 Thread Christian Brauner
On Thu, Mar 18, 2021 at 11:48:45AM +0100, Christian Brauner wrote: > [+Cc Aleksa, the author of openat2()] > > and a comment below. :) > > On Wed, Mar 17, 2021 at 09:47:17PM -0400, Richard Guy Briggs wrote: > > The openat2(2) syscall was added in kernel v5.6 with commit fd

Re: [PATCH 0/2] audit: add support for openat2

2021-03-18 Thread Christian Brauner
On Wed, Mar 17, 2021 at 09:47:16PM -0400, Richard Guy Briggs wrote: > The openat2(2) syscall was added in v5.6. Add support for openat2 to the > audit syscall classifier and for recording openat2 parameters that cannot > be captured in the syscall parameters of the SYSCALL record. > > Supporting

Re: [PATCH 1/2] audit: add support for the openat2 syscall

2021-03-18 Thread Christian Brauner
[+Cc Aleksa, the author of openat2()] and a comment below. :) On Wed, Mar 17, 2021 at 09:47:17PM -0400, Richard Guy Briggs wrote: > The openat2(2) syscall was added in kernel v5.6 with commit fddb5d430ad9 > ("open: introduce openat2(2) syscall") > > Add the openat2(2) syscall to the audit

Re: [PATCH v3 1/3] binder: BINDER_FREEZE ioctl

2021-03-17 Thread Christian Brauner
On Mon, Mar 15, 2021 at 06:16:28PM -0700, Li Li wrote: > From: Marco Ballesio > > Frozen tasks can't process binder transactions, so a way is required to > inform transmitting ends of communication failures due to the frozen > state of their receiving counterparts. Additionally, races are

Re: [PATCH v3 0/3] Binder: Enable App Freezing Capability

2021-03-17 Thread Christian Brauner
On Mon, Mar 15, 2021 at 06:16:27PM -0700, Li Li wrote: > From: Li Li > > To improve the user experience when switching between recently used > applications, the background applications which are not currently needed > are cached in the memory. Normally, a well designed application will not >

Re: [PATCH] kernel:fork: Fix typo issue

2021-03-17 Thread Christian Brauner
On Wed, Mar 17, 2021 at 04:20:31PM +0800, Xiaofeng Cao wrote: > change 'ancestoral' to 'ancestral' > change 'reuseable' to 'reusable' > delete 'do' grammatically > > Signed-off-by: Xiaofeng Cao > --- Thanks! Reviewed-by: Christian Brauner

Re: [PATCH] kernel:signal: Fix typo issue

2021-03-17 Thread Christian Brauner
On Wed, Mar 17, 2021 at 04:46:52PM +0800, Xiaofeng Cao wrote: > change 'situration' to 'situation' > change 'delievered' to 'delivered' > change 'overriden' to 'overridden' > > Signed-off-by: Xiaofeng Cao > --- Thanks! (Self-detected or through some tool?) Reviewed-by: Christian Brauner

[GIT PULL] detached mounts fix

2021-03-10 Thread Christian Brauner
-2021-03-10 tag. Thanks! Christian for-linus-2021-03-10 -------- Christian Brauner (1): mount: fix mounting of detached mounts onto targets that reside on shared mounts fs/pnode.h

Re: [PATCH 2/9] fs: add an argument-less alloc_anon_inode

2021-03-10 Thread Christian Brauner
On Tue, Mar 09, 2021 at 04:53:41PM +0100, Christoph Hellwig wrote: > Add a new alloc_anon_inode helper that allocates an inode on > the anon_inode file system. > > Signed-off-by: Christoph Hellwig > --- Looks good! Reviewed-by: Christian Brauner

Re: [PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb

2021-03-10 Thread Christian Brauner
kernel.org/lkml/20210310083040.ga5...@lst.de) Reviewed-by: Christian Brauner > arch/powerpc/platforms/pseries/cmm.c | 2 +- > drivers/dma-buf/dma-buf.c| 2 +- > drivers/gpu/drm/drm_drv.c| 2 +- > drivers/misc/cxl/api.c | 2 +- > drivers/mi

Re: [GIT PULL] idmapped mounts for v5.12

2021-03-03 Thread Christian Brauner
On Wed, Mar 03, 2021 at 01:36:31PM -0600, Eric W. Biederman wrote: > Christian Brauner writes: > > > Hi Linus, Hi Eric, > > > This series comes with an extensive xfstests suite covering both ext4 and > > xfs > > https://git.kernel.org/brauner/xfstests-de

Re: [PATCH v6 09/40] xattr: handle idmapped mounts

2021-03-03 Thread Christian Brauner
On Wed, Mar 03, 2021 at 02:45:07PM +, David Howells wrote: > Christian Brauner wrote: > > > In order to answer this more confidently I need to know a bit more about > > how cachefiles are supposed to work. > > > > From what I gather here it seemed what t

Re: [PATCH v6 09/40] xattr: handle idmapped mounts

2021-03-03 Thread Christian Brauner
On Wed, Mar 03, 2021 at 01:24:02PM +, David Howells wrote: > Christian Brauner wrote: > > > diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c > > index 72e42438f3d7..a591b5e09637 100644 > > --- a/fs/cachefiles/xattr.c > > +++ b/fs/cachefiles/xat

Re: [PATCH bpf 2/4] nsfs: add an ioctl to discover the network namespace cookie

2021-03-02 Thread Christian Brauner
On Tue, Mar 02, 2021 at 09:47:10AM +, Lorenz Bauer wrote: > On Mon, 1 Mar 2021 at 10:04, Christian Brauner > wrote: > > > > Hey Lorenz, > > > > Just to make sure: is it intentional that any user can retrieve the > > cookie associated with any network n

Re: seccomp: Delay filter activation

2021-03-01 Thread Christian Brauner
On Mon, Mar 01, 2021 at 12:09:09PM +0100, Christian Brauner wrote: > On Sat, Feb 20, 2021 at 01:31:57AM -0800, Sargun Dhillon wrote: > > We've run into a problem where attaching a filter can be quite messy > > business because the filter itself intercepts sendmsg, and other >

Re: [PATCH 0/5] kernel-doc fixes to latest fs changes

2021-03-01 Thread Christian Brauner
On Thu, Feb 04, 2021 at 07:00:54PM +0100, Lukas Bulwahn wrote: > this patchset was motivated by new warnings with make htmldocs appearing on > linux-next in the last week. > > Please apply this on top of your latest work in fs on top of the mount user > namespace refactoring, cf. the commits

Re: [PATCH -next] fs: libfs: fix kernel-doc for mnt_userns

2021-03-01 Thread Christian Brauner
On Tue, Feb 16, 2021 at 09:48:25AM +0100, Christoph Hellwig wrote: > On Mon, Feb 15, 2021 at 08:29:27PM -0800, Randy Dunlap wrote: > > Fix kernel-doc warning in libfs.c. > > > > ../fs/libfs.c:498: warning: Function parameter or member 'mnt_userns' not > > described in 'simple_setattr' > >

Re: [PATCH] kernel: Return -EFAULT if copy_to_user() fails

2021-03-01 Thread Christian Brauner
On Mon, Mar 01, 2021 at 07:28:11PM +0800, Wang Qing wrote: > The copy_to_user() function returns the number of bytes remaining to be > copied, but we want to return -EFAULT if the copy doesn't complete. > > Signed-off-by: Wang Qing > --- Hey Wang, Thanks for the patch. It looks like

Re: seccomp: Delay filter activation

2021-03-01 Thread Christian Brauner
On Sat, Feb 20, 2021 at 01:31:57AM -0800, Sargun Dhillon wrote: > We've run into a problem where attaching a filter can be quite messy > business because the filter itself intercepts sendmsg, and other > syscalls related to exfiltrating the listener FD. I believe that this > problem set has been

  1   2   3   4   5   6   7   8   9   10   >