linux-next: build failure after merge of the keys tree
Subsystems (2)
Hi all,
After merging the keys tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
Caused by commit
ef9cc255c953 ("usb: Add USB subsystem notifications")
# CONFIG_USB_NOTIFICATIONS is not set
I have used the keys tree from next-20190828 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 5 lines · On Thu, 29 Aug 2019 15:31:16 +1000 Stephen Rothwell <[email protected]>…
After merging the keys tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
Quoted 7 lines
Caused by commit
ef9cc255c953("usb: Add USB subsystem notifications")#
CONFIG_USB_NOTIFICATIONSis not setI have used the keys tree from next-20190828 for today.
I only realised this morning that I forgot to include the error log (sorry):
In file included from include/linux/usb/phy.h:15,
from include/linux/usb/otg.h:14,
from include/linux/usb/tegra_usb_phy.h:21,
from arch/arm/mach-tegra/tegra.c:27:include/linux/usb.h:2026:34: error: parameter 2 ('subtype') has incomplete type
2026 | enum usb_notification_type subtype,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
include/linux/usb.h:2025:20: error: function declaration isn't a prototype [-Werror=strict-prototypes]
2025 | static inline void post_usb_device_notification(const struct usb_device *udev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/usb.h:2029:38: error: parameter 2 ('subtype') has incomplete type
2029 | enum usb_notification_type subtype,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
include/linux/usb.h:2028:20: error: function declaration isn't a prototype [-Werror=strict-prototypes]
2028 | static inline void post_usb_bus_notification(const struct usb_bus *ubus,
| ^~~~~~~~~~~~~~~~~~~~~~~~~(several more like this)
Today I have included the following fix patch:
From: Stephen Rothwell <[email protected]>
Date: Mon, 2 Sep 2019 16:01:59 +1000
Subject: [PATCH] usb: include watch_queue.h for needed enum
The forward declararion doesn't seem to work (at laste for the !CONFIG_USB_NOTIFICATIONS case.
--- include/linux/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/usb.h +1 -1
@@ -4,6 +4,7 @@#include <linux/mod_devicetable.h> #include <linux/usb/ch9.h> +#include <linux/watch_queue.h> #define USB_MAJOR 180#define USB_DEVICE_MAJOR 189
@@ -26,7 +27,6 @@struct usb_device ;struct usb_driver ;struct wusb_dev ; -enum usb_notification_type ;/*-------------------------------------------------------------------------*/
Signature · 7 lines
2.23.0.rc1 I then discovered that I needed to install libkeyutils-dev :-( but it built OK after that. -- Cheers, Stephen Rothwell
Quoted 2 lines · Stephen Rothwell
The forward declararion doesn't seem to work (at laste for the !CONFIG_USB_NOTIFICATIONS case.
In the !CONFIG_USB_NOTIFICATIONS case, the argument is to a stub inline function. Even though the argument isn't actually used, it can't be an undefined type - and, I'm guessing, an undefined size, meaning the compiler doesn't know how many registers/how much stack space it would occupy before getting to the error argument.
I have a fix for this in my tree that just makes it an unsigned int in the disabled case:
static inline void post_usb_device_notification(const struct usb_device *udev,
unsigned int subtype, u32 error) {}Quoted 1 line
+#include <
linux/watch_queue.h>
I was trying to avoid that if I could to avoid introducing the possibility of circular deps, but that might not be a problem in this case.
Quoted 2 lines
I then discovered that I needed to install libkeyutils-dev :-( but it built OK after that.
? The kernel shouldn't require that to build.
David
Hi David,
Quoted 12 lines · On Mon, 02 Sep 2019 17:01:19 +0100 David Howells <[email protected]> wrote:
Quoted 2 lines · Stephen Rothwell
The forward declararion doesn't seem to work (at laste for the !CONFIG_USB_NOTIFICATIONS case.
In the !CONFIG_USB_NOTIFICATIONS case, the argument is to a stub inline function. Even though the argument isn't actually used, it can't be an undefined type - and, I'm guessing, an undefined size, meaning the compiler doesn't know how many registers/how much stack space it would occupy before getting to the error argument.
Quoted 5 lines
I have a fix for this in my tree that just makes it an unsigned int in the disabled case:
static inline void post_usb_device_notification(const struct
usb_device*udev,unsigned int subtype, u32 error) {}
But not published, yet?
Quoted 4 lines
Quoted 1 line
+#include <
linux/watch_queue.h>I was trying to avoid that if I could to avoid introducing the possibility of circular deps, but that might not be a problem in this case.
Seems to be OK for x86_64 allmodconfig at least.
Quoted 5 lines
Quoted 3 lines
I then discovered that I needed to install libkeyutils-dev :-( but it built OK after that.
? The kernel shouldn't require that to build.
I was doing an x86_64 allmodconfig build which seems to build (all of?) the samples.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 4 lines · Stephen Rothwell
Quoted 2 lines
static inline void post_usb_device_notification(const struct
usb_device*udev,unsigned int subtype, u32 error) {}But not published, yet?
I was hoping to get the smack patch reviewed by Casey first, but I can publish anyway.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I then discovered that I needed to install libkeyutils-dev :-( but it built OK after that.
? The kernel shouldn't require that to build.
I was doing an
x86_64allmodconfig build which seems to build (all of?) the samples.
Ah, yes - the sample demonstrates the key/keyring notifications as well as USB and block notifications and requires a constant from the keyutils-devel package. Maybe I should get it from the kernel UAPI headers instead, but that risks generating a collision.
David
Hi David,
Quoted 5 lines · On Tue, 03 Sep 2019 00:20:08 +0100 David Howells <[email protected]> wrote:
Ah, yes - the sample demonstrates the key/keyring notifications as well as USB and block notifications and requires a constant from the keyutils-devel package. Maybe I should get it from the kernel UAPI headers instead, but that risks generating a collision.
What sort of collision?
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 6 lines · Stephen Rothwell
Quoted 4 lines
Ah, yes - the sample demonstrates the key/keyring notifications as well as USB and block notifications and requires a constant from the keyutils-devel package. Maybe I should get it from the kernel UAPI headers instead, but that risks generating a collision.
What sort of collision?
Accidentally including both a userspace header file and a kernel UAPI header file with the constants colliding.
Anyway, I've pushed a new version of keys-next and also keyutils if you're employing the testsuite from that at all.
David
Hi David,
Quoted 8 lines · On Tue, 3 Sep 2019 09:07:22 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 5 lines
Quoted 3 lines
I then discovered that I needed to install libkeyutils-dev :-( but it built OK after that.
? The kernel shouldn't require that to build.
I was doing an
x86_64allmodconfig build which seems to build (all of?) the samples.
Of course, this breaks our crossbuilds :-(
e.g. S390 allyesconfig build:
/usr/bin/ld: cannot find -lkeyutils
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 8 lines · Stephen Rothwell
Quoted 2 lines
I was doing an
x86_64allmodconfig build which seems to build (all of?) the samples.Of course, this breaks our crossbuilds :-(
e.g. S390 allyesconfig build:
/usr/bin/ld: cannot find -lkeyutils
Is it a requirement that stuff in samples/ should be able to build without resorting to external userspace headers? Or, at least, those outside of the C library?
David
Hi David,
Quoted 8 lines · On Tue, 03 Sep 2019 00:53:14 +0100 David Howells <[email protected]> wrote:
Quoted 5 lines · Stephen Rothwell
Quoted 2 lines
I was doing an
x86_64allmodconfig build which seems to build (all of?) the samples.Of course, this breaks our crossbuilds :-(
Quoted 7 lines
Quoted 3 lines
e.g. S390 allyesconfig build:
/usr/bin/ld: cannot find -lkeyutilsIs it a requirement that stuff in
samples/should be able to build without resorting to external userspace headers? Or, at least, those outside of the C library?
Well, this is the only samples failure in the current build ...
Signature · 2 lines
Cheers, Stephen Rothwell