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: <3ac7427b-4f17-480e-99ae-f00e5c00e678@csgroup.eu>
Date: Thu, 31 Jul 2025 16:41:10 +0200
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>, gregkh@...uxfoundation.org,
 Christian Zigotzky <chzigotzky@...osoft.de>
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
 Nicolas Pitre <nico@...xnic.net>,
 "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: [PATCH 07/33] tty: vt: use _IO() to define ioctl numbers



Le 31/07/2025 à 16:35, Christophe Leroy a écrit :
> Hi Jiri,
> 
> Le 11/06/2025 à 12:02, Jiri Slaby (SUSE) a écrit :
>> _IO*() is the proper way of defining ioctl numbers. All these vt numbers
>> were synthetically built up the same way the _IO() macro does.
>>
>> So instead of implicit hex numbers, use _IO() properly.
>>
>> To not change the pre-existing numbers, use only _IO() (and not _IOR()
>> or _IOW()). The latter would change the numbers indeed.
> 
> On powerpc your assumption is wrong, because _IOC_NONE is not 0:
> 
> $ git grep _IOC_NONE arch/powerpc/
> arch/powerpc/include/uapi/asm/ioctl.h:#define _IOC_NONE 1U
> 
> Therefore the value changes even with _IO(), leading to failure of Xorg 
> as reported by Christian.
> 

And is likely an issue on the 4 following architectures:

$ git grep _IOC_NONE arch/ | grep 1U
arch/alpha/include/uapi/asm/ioctl.h:#define _IOC_NONE	1U
arch/mips/include/uapi/asm/ioctl.h:#define _IOC_NONE	1U
arch/powerpc/include/uapi/asm/ioctl.h:#define _IOC_NONE	1U
arch/sparc/include/uapi/asm/ioctl.h:#define _IOC_NONE        1U


Christophe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ