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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZJXAhINndD49qo5M@gmail.com>
Date: Fri, 23 Jun 2023 08:55:48 -0700
From: Breno Leitao <leitao@...ian.org>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: Jens Axboe <axboe@...nel.dk>, Pavel Begunkov <asml.silence@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	"open list:IO_URING" <io-uring@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>
Subject: Re: [PATCH v3] io_uring: Add io_uring command support for sockets

On Fri, Jun 23, 2023 at 08:39:02AM +0200, Greg KH wrote:
> On Thu, Jun 22, 2023 at 02:59:14PM -0700, Breno Leitao wrote:
> > --- a/io_uring/uring_cmd.c
> > +++ b/io_uring/uring_cmd.c
> > @@ -7,6 +7,7 @@
> >  #include <linux/nospec.h>
> >  
> >  #include <uapi/linux/io_uring.h>
> > +#include <uapi/asm-generic/ioctls.h>
> 
> Is this still needed?

Yes, this is what is providing the definitions for SIOCINQ and SIOCOUTQ.
If we don't include these headers, we get the following compilation
failure:

	In file included from ./include/linux/socket.h:7,
			 from ./include/net/af_unix.h:5,
			 from io_uring/rsrc.h:5,
			 from io_uring/uring_cmd.c:12:
	io_uring/uring_cmd.c: In function ‘io_uring_cmd_sock’:
	./include/uapi/linux/sockios.h:26:18: error: ‘FIONREAD’ undeclared (first use in this function); did you mean ‘READ’?
	 #define SIOCINQ  FIONREAD
			  ^~~~~~~~
	io_uring/uring_cmd.c:171:32: note: in expansion of macro ‘SIOCINQ’
	   ret = sk->sk_prot->ioctl(sk, SIOCINQ, &arg);
					^~~~~~~
	./include/uapi/linux/sockios.h:26:18: note: each undeclared identifier is reported only once for each function it appears in
	 #define SIOCINQ  FIONREAD
			  ^~~~~~~~
	io_uring/uring_cmd.c:171:32: note: in expansion of macro ‘SIOCINQ’
	   ret = sk->sk_prot->ioctl(sk, SIOCINQ, &arg);
					^~~~~~~
	./include/uapi/linux/sockios.h:27:18: error: ‘TIOCOUTQ’ undeclared (first use in this function); did you mean ‘SIOCOUTQ’?
	 #define SIOCOUTQ TIOCOUTQ        /* output queue size (not sent + not acked) */
			  ^~~~~~~~
	io_uring/uring_cmd.c:176:32: note: in expansion of macro ‘SIOCOUTQ’
	   ret = sk->sk_prot->ioctl(sk, SIOCOUTQ, &arg);
					^~~~~~~~
	make[2]: *** [scripts/Makefile.build:252: io_uring/uring_cmd.o] Error 1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ