Re: [PATCH] proc: add config & param to block forcing mem writes

2024-07-24 Thread Adrian Ratiu
On Tuesday, July 23, 2024 21:30 EEST, Linus Torvalds wrote: > On Tue, 23 Jul 2024 at 10:18, Adrian Ratiu wrote: > > > > This adds a Kconfig option and boot param to allow removing > > the FOLL_FORCE flag from /proc/pid/mem write calls because > > it can be abused. > > Ack, this looks much simp

Re: [PATCH] proc: add config & param to block forcing mem writes

2024-07-23 Thread Linus Torvalds
On Tue, 23 Jul 2024 at 11:30, Linus Torvalds wrote: > > but while that looks a bit prettier, the whole "fs_parser.h" thing is > admittedly odd. .. don't get me wrong - /proc obviously *is* a filesystem, but in this context it's a boot command line parameter, not a mount option. The "constant_tab

Re: [PATCH] proc: add config & param to block forcing mem writes

2024-07-23 Thread Linus Torvalds
On Tue, 23 Jul 2024 at 10:18, Adrian Ratiu wrote: > > This adds a Kconfig option and boot param to allow removing > the FOLL_FORCE flag from /proc/pid/mem write calls because > it can be abused. Ack, this looks much simpler. That said, I think this can be prettied up some more: > +enum proc_mem

[PATCH] proc: add config & param to block forcing mem writes

2024-07-23 Thread Adrian Ratiu
This adds a Kconfig option and boot param to allow removing the FOLL_FORCE flag from /proc/pid/mem write calls because it can be abused. The traditional forcing behavior is kept as default because it can break GDB and some other use cases. Previously we tried a more sophisticated approach allowin