Re: [PATCH v6 1/2] proc: pass file instead of inode to proc_mem_open

2024-06-17 Thread Adrian Ratiu
On Monday, June 17, 2024 11:48 EEST, Christian Brauner wrote: > On Thu, Jun 13, 2024 at 04:39:36PM GMT, Adrian Ratiu wrote: > > The file struct is required in proc_mem_open() so its > > f_mode can be checked when deciding whether to allow or > > deny /proc/*/mem open requests via the new read/wr

Re: [PATCH v6 1/2] proc: pass file instead of inode to proc_mem_open

2024-06-17 Thread Christian Brauner
On Thu, Jun 13, 2024 at 04:39:36PM GMT, Adrian Ratiu wrote: > The file struct is required in proc_mem_open() so its > f_mode can be checked when deciding whether to allow or > deny /proc/*/mem open requests via the new read/write > and foll_force restriction mechanism. > > Thus instead of directly

[PATCH v6 1/2] proc: pass file instead of inode to proc_mem_open

2024-06-13 Thread Adrian Ratiu
The file struct is required in proc_mem_open() so its f_mode can be checked when deciding whether to allow or deny /proc/*/mem open requests via the new read/write and foll_force restriction mechanism. Thus instead of directly passing the inode to the fun, we pass the file and get the inode inside