lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230519081526.59411533@kernel.org>
Date:   Fri, 19 May 2023 08:15:26 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Breno Leitao <leitao@...ian.org>
Cc:     axboe@...nel.dk, davem@...emloft.net, edumazet@...gle.com,
        pabeni@...hat.com, willemdebruijn.kernel@...il.com,
        courmisch@...il.com, nhorman@...driver.com, asml.silence@...il.com,
        alex.aring@...il.com, dccp@...r.kernel.org, mptcp@...ts.linux.dev,
        linux-kernel@...r.kernel.org, matthieu.baerts@...sares.net,
        marcelo.leitner@...il.com, linux-wpan@...r.kernel.org,
        linux-sctp@...r.kernel.org, leit@...com, David.Laight@...LAB.COM,
        dsahern@...nel.org
Subject: Re: [PATCH 0/1] net: ioctl: Use kernel buffer on proto ioctl
 callbacks

On Fri, 19 May 2023 06:58:20 -0700 Breno Leitao wrote:
> With the implementation of network ioctl on io_uring[1], Willem
> suggested[2] that the "struct proto" ioctls functions should be reused,
> instead of duplicating the code.
> For that, the ioctl callbacks need to be more flexible, and avoid
> operating on userspace buffers (doing get/put_user()) directly on the
> callbacks. This patch adds this flexibility, so, the io_uring plumbing
> becomes more clean, avoiding duplicating code. This may also benefit
> BPF.
> 
> For that, a wrapper is created, which will copy from/to userspace, and
> the ioctl callback will rely on the wrapper to do userspace memory
> copies.
> 
> I've tested this patch in three different ways:
> 1) Created a simple testcase for TCP/UDP [3]
> 2) Run relevant LTP tests, such as: sockioctl, setsockopt, bind, sendto,
> 				    fanout, ns-udpsender, etc
> 3) Run basics network selftests
> 
> PS: There are some `strcmp()` in the `sock_skprot_ioctl()`, that I was
> not able to find a better way to deal with it. Any feedback is
> appreciated.

Why not CC netdev@ on this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ