[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whk=ygWsxt=1HhndCwjtXdga9sPmkxFGby5PJWRk5yx9Q@mail.gmail.com>
Date: Wed, 25 May 2022 09:02:19 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Bjorn Helgaas <helgaas@...nel.org>,
Jiri Slaby <jirislaby@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Jonathan Corbet <corbet@....net>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
"Michael S . Tsirkin" <mst@...hat.com>, llvm@...ts.linux.dev,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH] Revert "linux/types.h: remove unnecessary __bitwise__"
On Wed, May 25, 2022 at 7:46 AM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> This reverts commit c724c866bb70cb8c607081a26823a1f0ebde4387.
>
> Jiri Slaby reported that c724c866bb70 ("linux/types.h: remove unnecessary
> __bitwise__") broke userspace, including open-iscsi, because it uses
> __bitwise__.
>
> Restore the __bitwise__ definition.
Hmm.
Presumably it's only the uapi case that actually wants to re-instate it.
And I'd rather make that "__bitwise__" case explicitly special, with a
comment about why it exists when the kernel itself doesn't use it.
IOW, rather than the revert, maybe something like the below
(whitespace-damaged) instead?
Jiri, does something like this work for you?
Linus
---
include/uapi/linux/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
index c4dc597f3dcf..308433be33c2 100644
--- a/include/uapi/linux/types.h
+++ b/include/uapi/linux/types.h
@@ -26,6 +26,9 @@
#define __bitwise
#endif
+/* The kernel doesn't use this legacy form, but user space does */
+#define __bitwise__ __bitwise
+
typedef __u16 __bitwise __le16;
typedef __u16 __bitwise __be16;
typedef __u32 __bitwise __le32;
Powered by blists - more mailing lists