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>] [day] [month] [year] [list]
Message-Id: <20200814125142.1131183-1-t.martitz@avm.de>
Date:   Fri, 14 Aug 2020 14:51:42 +0200
From:   Thomas Martitz <t.martitz@....de>
To:     3chas3@...il.com
Cc:     tsbogend@...ha.franken.de, chris@...kel.net,
        linux-kernel@...r.kernel.org, Thomas Martitz <t.martitz@....de>
Subject: [PATCH] uapi: remove a few asm/ioctl.h includes

We found the following warnings when build userspace for our MIPS-based boards:

include/asm-generic/ioctl.h:65: warning: "_IOC" redefined

It appears that asm/ioctl.h does not play well when compiling against musl libc.
Since almost all other uapi headers that wrap _IOC() and friends do *not*
include asm/ioctl.h itself, lets follow this route for sickios.h and atmioc.h.

The userspace is required to include <sys/ioctl.h> anyway when it wants
to call ioctl() for any macro provided by the affected headers.
---
 arch/mips/include/uapi/asm/sockios.h   | 2 --
 arch/xtensa/include/uapi/asm/sockios.h | 2 --
 include/uapi/linux/atmioc.h            | 3 ---
 3 files changed, 7 deletions(-)

diff --git a/arch/mips/include/uapi/asm/sockios.h b/arch/mips/include/uapi/asm/sockios.h
index 66f60234f290b..a96f3ea5430f5 100644
--- a/arch/mips/include/uapi/asm/sockios.h
+++ b/arch/mips/include/uapi/asm/sockios.h
@@ -11,8 +11,6 @@
 #ifndef _ASM_SOCKIOS_H
 #define _ASM_SOCKIOS_H
 
-#include <asm/ioctl.h>
-
 /* Socket-level I/O control calls. */
 #define FIOGETOWN	_IOR('f', 123, int)
 #define FIOSETOWN	_IOW('f', 124, int)
diff --git a/arch/xtensa/include/uapi/asm/sockios.h b/arch/xtensa/include/uapi/asm/sockios.h
index 1a1f58f4b75a2..71d05c88b8178 100644
--- a/arch/xtensa/include/uapi/asm/sockios.h
+++ b/arch/xtensa/include/uapi/asm/sockios.h
@@ -15,8 +15,6 @@
 #ifndef _XTENSA_SOCKIOS_H
 #define _XTENSA_SOCKIOS_H
 
-#include <asm/ioctl.h>
-
 /* Socket-level I/O control calls. */
 
 #define FIOGETOWN	_IOR('f', 123, int)
diff --git a/include/uapi/linux/atmioc.h b/include/uapi/linux/atmioc.h
index cd7655e40c77a..36a51ca18ea3c 100644
--- a/include/uapi/linux/atmioc.h
+++ b/include/uapi/linux/atmioc.h
@@ -13,9 +13,6 @@
 #ifndef _LINUX_ATMIOC_H
 #define _LINUX_ATMIOC_H
 
-#include <asm/ioctl.h>
-		/* everybody including atmioc.h will also need _IO{,R,W,WR} */
-
 #define ATMIOC_PHYCOM	  0x00 /* PHY device common ioctls, globally unique */
 #define ATMIOC_PHYCOM_END 0x0f
 #define ATMIOC_PHYTYP	  0x10 /* PHY dev type ioctls, unique per PHY type */
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ