61d6952868
Make all of the write() handlers use a consistent flow From Jason, This series unifies all the write handlers to use a flow that is very similar to the ioctl handler flow, including having the same basic assumptions about extensible buffer handling and the same handler function call signature. Along the way this consolidates all the copy_to/from_user into a small set of safe buffer accessor functions tailored to the usage here. These accessors use the new dispatcher-controlled calling convention for ucore data, and support a placement of the response that does not rely on the cmd.response value. Overall this brings in in strong bounds checking to all the write() handlers and consistent enforcement of the zero-fill/zero-check methodology for buffer extension. The end result is a significant complexity reduction for all of the handlers and creates a high degree of uniformity between the write, write_ex, and ioctl handlers and dispatch flow. Thanks Jason Gunthorpe (12): RDMA/uverbs: Remove out_len checks that are now done by the core RDMA/uverbs: Use uverbs_attr_bundle to pass ucore for write/write_ex RDMA/uverbs: Get rid of the 'callback' scheme in the compat path RDMA/uverbs: Use uverbs_response() for remaining response copying RDMA/uverbs: Use uverbs_request() for request copying RDMA/uverbs: Use uverbs_request() and core for write_ex handlers RDMA/uverbs: Fill in the response for IB_USER_VERBS_EX_CMD_MODIFY_QP RDMA/uverbs: Simplify ib_uverbs_ex_query_device RDMA/uverbs: Add a simple iterator interface for reading the command RDMA/uverbs: Use the iterator for ib_uverbs_unmarshall_recv() RDMA/uverbs: Do not check the input length on create_cq/qp paths RDMA/uverbs: Use only attrs for the write() handler signature drivers/infiniband/core/rdma_core.h | 5 +- drivers/infiniband/core/uverbs_cmd.c | 1165 ++++++++++--------------- drivers/infiniband/core/uverbs_main.c | 23 +- drivers/infiniband/core/uverbs_uapi.c | 23 +- include/rdma/uverbs_ioctl.h | 9 +- 5 files changed, 479 insertions(+), 746 deletions(-) Signed-off-by: Doug Ledford <dledford@redhat.com> |
||
---|---|---|
Documentation | ||
LICENSES | ||
arch | ||
block | ||
certs | ||
crypto | ||
drivers | ||
firmware | ||
fs | ||
include | ||
init | ||
ipc | ||
kernel | ||
lib | ||
mm | ||
net | ||
samples | ||
scripts | ||
security | ||
sound | ||
tools | ||
usr | ||
virt | ||
.clang-format | ||
.cocciconfig | ||
.get_maintainer.ignore | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
COPYING | ||
CREDITS | ||
Kbuild | ||
Kconfig | ||
MAINTAINERS | ||
Makefile | ||
README |
README
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.