Re: [PATCH] fs: Set file_handle::handle_bytes before referencing file_handle::f_handle

2024-04-05 Thread Christian Brauner
On Thu, Apr 04, 2024 at 11:19:00AM +0200, Jan Kara wrote: > On Wed 03-04-24 14:54:03, Kees Cook wrote: > > With adding __counted_by(handle_bytes) to struct file_handle, we need > > to explicitly set it in the one place it wasn't yet happening prior to > > accessing the flex array "f_handle". > >

Re: [PATCH] fs: Set file_handle::handle_bytes before referencing file_handle::f_handle

2024-04-04 Thread Chuck Lever
On Thu, Apr 04, 2024 at 11:19:00AM +0200, Jan Kara wrote: > On Wed 03-04-24 14:54:03, Kees Cook wrote: > > With adding __counted_by(handle_bytes) to struct file_handle, we need > > to explicitly set it in the one place it wasn't yet happening prior to > > accessing the flex array "f_handle". > >

Re: [PATCH] fs: Set file_handle::handle_bytes before referencing file_handle::f_handle

2024-04-04 Thread Jan Kara
On Wed 03-04-24 14:54:03, Kees Cook wrote: > With adding __counted_by(handle_bytes) to struct file_handle, we need > to explicitly set it in the one place it wasn't yet happening prior to > accessing the flex array "f_handle". > > Fixes: 1b43c4629756 ("fs: Annotate struct file_handle with

Re: [PATCH] fs: Set file_handle::handle_bytes before referencing file_handle::f_handle

2024-04-03 Thread Gustavo A. R. Silva
On 03/04/24 15:54, Kees Cook wrote: With adding __counted_by(handle_bytes) to struct file_handle, we need to explicitly set it in the one place it wasn't yet happening prior to accessing the flex array "f_handle". Yes, which (access to `f_handle`) happens here: 48 retval =

[PATCH] fs: Set file_handle::handle_bytes before referencing file_handle::f_handle

2024-04-03 Thread Kees Cook
With adding __counted_by(handle_bytes) to struct file_handle, we need to explicitly set it in the one place it wasn't yet happening prior to accessing the flex array "f_handle". Fixes: 1b43c4629756 ("fs: Annotate struct file_handle with __counted_by() and use struct_size()") Signed-off-by: Kees