lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOQ4uxjwXbpCxo0CetBnWkEHQ-X1MjPS9J2siQfGCqDYNDhZPA@mail.gmail.com>
Date: Wed, 20 Nov 2024 12:36:53 +0100
From: Amir Goldstein <amir73il@...il.com>
To: Christian Brauner <brauner@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, Josef Bacik <josef@...icpanda.com>, 
	kernel-team@...com, linux-fsdevel@...r.kernel.org, jack@...e.cz, 
	linux-xfs@...r.kernel.org, linux-btrfs@...r.kernel.org, linux-mm@...ck.org, 
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH v7 05/18] fsnotify: introduce pre-content permission events

On Wed, Nov 20, 2024 at 12:10 PM Christian Brauner <brauner@...nel.org> wrote:
>
> > But if anybody is really worried about running out of f_mode bits, we
> > could almost certainly turn the existing
> >
> >         unsigned int f_flags;
> >
> > into a bitfield, and make it be something like
> >
> >         unsigned int f_flags:26, f_special:6;
>
> I just saw this now. Two points I would like to keep you to keep mind.
>
> I've already mentiond that I've freed up 5 fmode bits so it's not that
> we're in immediate danger of running out. Especially since I added
> f_ops_flags which contains all flags that are static, i.e., never change
> and can simply live in the file operations struct and aren't that
> performance sensitive.
>
> I shrunk struct file to three cachelines. And in fact, we have 8 bytes
> to use left since I removed f_version. So it really wouldn't be a
> problem to simply add a separate u32 f_special member into struct file
> without growing it and still leaving a 4 byte hole if it ever comes to
> that.

That's good to know, but for the record, I ended up using just one
extra f_mode bit for fsnotify [1].

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/5ea5f8e283d1edb55aa79c35187bfe344056af14.1731684329.git.josef@toxicpanda.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ