Re: [PATCH rdma-next 00/10] Do not allow commands to run that the driver does not support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 12, 2018 at 10:59:48PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> 
> >From Jason,
> 
> This extends the uverbs_uapi to have the notion of a disabled object and
> in turn disabled methods. Objects that are not supported by the driver
> become disabled and all the uAPI entry points are removed.
> 
> The same approach is extended to the write() interface by harmonizing
> the write() method description with ioctl within the uverbs_api.
> 
> Blocking commands very early on makes it harder to exploit any error
> path bugs that may exist, and provides the necessary infrastructure for
> an API introspection feature down the road.
> 
> Along the way this introduces the next step towards making the specs
> macros saner but introducing a list-base description of the specs at the
> top level of the tree instead of the existing tree based description.
> This reworking is necessary to allow splitting data describing objects
> across multiple files.
> 
> The introduction of meta-data for write() interface commands is the
> first step toward unifying the write/write_ex/ioctl command path into a
> consistent and interchangeable flow. Later series will add additional
> meta-data using this same framework.
> 
> Thanks
> 
> Jason Gunthorpe (10):
>   RDMA/mlx5: Do not generate the uabi specs unconditionally
>   RDMA/uverbs: Use a linear list to describe the compiled-in uapi
>   RDMA/uverbs: Factor out the add/get pattern into a helper
>   RDMA/uverbs: Add helpers to mark uapi functions as unsupported
>   RDMA/mlx5: Use the uapi disablement APIs instead of code
>   RDMA/uverbs: Require all objects to have a driver destroy function
>   RDMA/verbs: Store the write/write_ex uapi entry points in the
>     uverbs_api
>   RDMA/uverbs: Convert the write interface to use uverbs_api
>   RDMA/uverbs: Make all the method functions in uverbs_cmd static
>   RDMA/uverbs: Check for NULL driver methods for every write call

I applied this to for-next, but it didn't apply cleanly as this series
was not based directly anything likefor-next. 

The resolutions were simple, so I did them, but please check my work.

Applying: RDMA/mlx5: Do not generate the uabi specs unconditionally
Applying: RDMA/uverbs: Use a linear list to describe the compiled-in uapi
Using index info to reconstruct a base tree...
M	drivers/infiniband/hw/mlx5/main.c
M	drivers/infiniband/hw/mlx5/mlx5_ib.h
M	include/rdma/ib_verbs.h
Falling back to patching base and 3-way merge...
Auto-merging include/rdma/ib_verbs.h
Auto-merging drivers/infiniband/hw/mlx5/mlx5_ib.h
Auto-merging drivers/infiniband/hw/mlx5/main.c
Applying: RDMA/uverbs: Factor out the add/get pattern into a helper
Applying: RDMA/uverbs: Add helpers to mark uapi functions as unsupported
Applying: RDMA/mlx5: Use the uapi disablement APIs instead of code
Using index info to reconstruct a base tree...
M	drivers/infiniband/hw/mlx5/main.c
M	drivers/infiniband/hw/mlx5/mlx5_ib.h
Falling back to patching base and 3-way merge...
Auto-merging drivers/infiniband/hw/mlx5/mlx5_ib.h
CONFLICT (content): Merge conflict in drivers/infiniband/hw/mlx5/mlx5_ib.h
Auto-merging drivers/infiniband/hw/mlx5/main.c
CONFLICT (content): Merge conflict in drivers/infiniband/hw/mlx5/main.c
error: Failed to merge in the changes.
Patch failed at 0005 RDMA/mlx5: Use the uapi disablement APIs instead of code
Applying: RDMA/mlx5: Use the uapi disablement APIs instead of code
Applying: RDMA/uverbs: Require all objects to have a driver destroy function
Applying: RDMA/verbs: Store the write/write_ex uapi entry points in the uverbs_api
Applying: RDMA/uverbs: Convert the write interface to use uverbs_api
Applying: RDMA/uverbs: Make all the method functions in uverbs_cmd static
Applying: RDMA/uverbs: Check for NULL driver methods for every write call

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux