Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* linux-next: build failure after merge of the keys tree
@ 2019-08-29  5:31 Stephen Rothwell
  2019-09-02  6:19 ` Stephen Rothwell
  2019-09-02 16:01 ` David Howells
  0 siblings, 2 replies; 14+ messages in thread
From: Stephen Rothwell @ 2019-08-29  5:31 UTC (permalink / raw)
  To: David Howells
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

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.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-08-29  5:31 linux-next: build failure after merge of the keys tree Stephen Rothwell
@ 2019-09-02  6:19 ` Stephen Rothwell
  2019-09-02 16:01 ` David Howells
  1 sibling, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2019-09-02  6:19 UTC (permalink / raw)
  To: David Howells
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 2699 bytes --]

Hi all,

On Thu, 29 Aug 2019 15:31:16 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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.

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 <sfr@canb.auug.org.au>
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.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 include/linux/usb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/usb.h b/include/linux/usb.h
index a7d5fce46569..11438058f4fa 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -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;
 
 /*-------------------------------------------------------------------------*/
 
-- 
2.23.0.rc1

I then discovered that I needed to install libkeyutils-dev :-( but it
built OK after that.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-08-29  5:31 linux-next: build failure after merge of the keys tree Stephen Rothwell
  2019-09-02  6:19 ` Stephen Rothwell
@ 2019-09-02 16:01 ` David Howells
  2019-09-02 23:07   ` Stephen Rothwell
  2019-09-02 23:20   ` David Howells
  1 sibling, 2 replies; 14+ messages in thread
From: David Howells @ 2019-09-02 16:01 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: dhowells, Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> 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) {}

> +#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.

> 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-09-02 16:01 ` David Howells
@ 2019-09-02 23:07   ` Stephen Rothwell
  2019-09-02 23:21     ` Stephen Rothwell
  2019-09-02 23:53     ` David Howells
  2019-09-02 23:20   ` David Howells
  1 sibling, 2 replies; 14+ messages in thread
From: Stephen Rothwell @ 2019-09-02 23:07 UTC (permalink / raw)
  To: David Howells
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 1388 bytes --]

Hi David,

On Mon, 02 Sep 2019 17:01:19 +0100 David Howells <dhowells@redhat.com> wrote:
>
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > 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) {}

But not published, yet?

> > +#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.

> 
> > 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.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-09-02 16:01 ` David Howells
  2019-09-02 23:07   ` Stephen Rothwell
@ 2019-09-02 23:20   ` David Howells
  2019-09-02 23:39     ` Stephen Rothwell
  2019-09-02 23:51     ` David Howells
  1 sibling, 2 replies; 14+ messages in thread
From: David Howells @ 2019-09-02 23:20 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: dhowells, Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> > 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.

> > > 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.

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-09-02 23:07   ` Stephen Rothwell
@ 2019-09-02 23:21     ` Stephen Rothwell
  2019-09-02 23:53     ` David Howells
  1 sibling, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2019-09-02 23:21 UTC (permalink / raw)
  To: David Howells
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 514 bytes --]

Hi David,

On Tue, 3 Sep 2019 09:07:22 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > > 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.

Of course, this breaks our crossbuilds :-(

e.g. S390 allyesconfig build:

/usr/bin/ld: cannot find -lkeyutils

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-09-02 23:20   ` David Howells
@ 2019-09-02 23:39     ` Stephen Rothwell
  2019-09-02 23:51     ` David Howells
  1 sibling, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2019-09-02 23:39 UTC (permalink / raw)
  To: David Howells
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

Hi David,

On Tue, 03 Sep 2019 00:20:08 +0100 David Howells <dhowells@redhat.com> 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?
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-09-02 23:20   ` David Howells
  2019-09-02 23:39     ` Stephen Rothwell
@ 2019-09-02 23:51     ` David Howells
  1 sibling, 0 replies; 14+ messages in thread
From: David Howells @ 2019-09-02 23:51 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: dhowells, Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

Stephen Rothwell <sfr@canb.auug.org.au> 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?

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-09-02 23:07   ` Stephen Rothwell
  2019-09-02 23:21     ` Stephen Rothwell
@ 2019-09-02 23:53     ` David Howells
  2019-09-03  0:29       ` Stephen Rothwell
  1 sibling, 1 reply; 14+ messages in thread
From: David Howells @ 2019-09-02 23:53 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: dhowells, Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> > I was doing an x86_64 allmodconfig 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2019-09-02 23:53     ` David Howells
@ 2019-09-03  0:29       ` Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2019-09-03  0:29 UTC (permalink / raw)
  To: David Howells
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Greg Kroah-Hartman, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

Hi David,

On Tue, 03 Sep 2019 00:53:14 +0100 David Howells <dhowells@redhat.com> wrote:
>
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > > I was doing an x86_64 allmodconfig 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?

Well, this is the only samples failure in the current build ...

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* linux-next: build failure after merge of the keys tree
@ 2019-08-16  5:04 Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2019-08-16  5:04 UTC (permalink / raw)
  To: David Howells, Alasdair G Kergon, Mike Snitzer
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Jaskaran Khurana

[-- Attachment #1: Type: text/plain, Size: 1737 bytes --]

Hi all,

After merging the keys tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/md/dm-verity-verify-sig.c: In function 'verity_verify_get_sig_from_key':
drivers/md/dm-verity-verify-sig.c:38:8: error: too few arguments to function 'request_key'
  key = request_key(&key_type_user,
        ^~~~~~~~~~~
In file included from include/keys/user-type.h:11,
                 from drivers/md/dm-verity-verify-sig.c:10:
include/linux/key.h:318:27: note: declared here
 static inline struct key *request_key(struct key_type *type,
                           ^~~~~~~~~~~

Caused by commit

  f802f2b3a991 ("keys: Replace uid/gid/perm permissions checking with an ACL")

interacting with commit

  644332ceab35 ("dm verity: add root hash pkcs#7 signature verification")

from the device-mapper tree.

I applied the following merge resolution patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 16 Aug 2019 15:00:15 +1000
Subject: [PATCH] dm verity: merge fix for "keys: Replace uid/gid/perm
 permissions checking with an ACL"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/md/dm-verity-verify-sig.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-verity-verify-sig.c b/drivers/md/dm-verity-verify-sig.c
index 614e43db93aa..2ca162d43fe6 100644
--- a/drivers/md/dm-verity-verify-sig.c
+++ b/drivers/md/dm-verity-verify-sig.c
@@ -36,7 +36,7 @@ static int verity_verify_get_sig_from_key(const char *key_desc,
 	int ret = 0;
 
 	key = request_key(&key_type_user,
-			key_desc, NULL);
+			key_desc, NULL, NULL);
 	if (IS_ERR(key))
 		return PTR_ERR(key);
 
-- 
2.20.1

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: linux-next: build failure after merge of the keys tree
  2017-11-13  2:08 Stephen Rothwell
@ 2017-11-13 11:21 ` David Howells
  0 siblings, 0 replies; 14+ messages in thread
From: David Howells @ 2017-11-13 11:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: dhowells, Linux-Next Mailing List, Linux Kernel Mailing List

I've dropped the keyrings ACL patches from the branch for now.  I'll revisit
them after the merge window.

David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* linux-next: build failure after merge of the keys tree
@ 2017-11-13  2:08 Stephen Rothwell
  2017-11-13 11:21 ` David Howells
  0 siblings, 1 reply; 14+ messages in thread
From: Stephen Rothwell @ 2017-11-13  2:08 UTC (permalink / raw)
  To: David Howells; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi David,

After merging the keys tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

drivers/md/dm-crypt.c: In function 'crypt_set_keyring_key':
drivers/md/dm-crypt.c:2022:8: error: too few arguments to function 'request_key'
  key = request_key(key_string[0] == 'l' ? &key_type_logon : &key_type_user,   
        ^
In file included from drivers/md/dm-crypt.c:15:0:
include/linux/key.h:268:20: note: declared here
 extern struct key *request_key(struct key_type *type,
                    ^

Caused by commit

  b059d2a56c53 ("KEYS: Replace uid/gid/perm permissions checking with an ACL")

I have used the keys tree from next-20171110 for today.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 14+ messages in thread

* linux-next: build failure after merge of the keys tree
@ 2017-04-04  3:39 Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2017-04-04  3:39 UTC (permalink / raw)
  To: David Howells
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Mat Martineau

Hi David,

After merging the keys tree, today's linux-next build (x86_64
allmodconfig) failed like this:

security/integrity/digsig.c: In function 'integrity_init_keyring':
security/integrity/digsig.c:46:30: error: passing argument 7 of 'keyring_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
 #define restrict_link_to_ima restrict_link_by_builtin_and_secondary_trusted
                              ^
security/integrity/digsig.c:95:9: note: in expansion of macro 'restrict_link_to_ima'
         restrict_link_to_ima, NULL);
         ^
In file included from include/linux/cred.h:17:0,
                 from security/integrity/digsig.c:18:
include/linux/key.h:311:20: note: expected 'struct key_restriction *' but argument is of type 'int (*)(struct key *, const struct key_type *, const union key_payload *, struct key *)'
 extern struct key *keyring_alloc(const char *description, kuid_t uid, kgid_t gid,
                    ^

Caused by commits

  aaf66c883813 ("KEYS: Split role of the keyring pointer for keyring restrict functions")
  c5faca6b4a58 ("KEYS: Use structure to capture key restriction function and data")

I have used the version from next-20170403 for today.

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, back to index

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-29  5:31 linux-next: build failure after merge of the keys tree Stephen Rothwell
2019-09-02  6:19 ` Stephen Rothwell
2019-09-02 16:01 ` David Howells
2019-09-02 23:07   ` Stephen Rothwell
2019-09-02 23:21     ` Stephen Rothwell
2019-09-02 23:53     ` David Howells
2019-09-03  0:29       ` Stephen Rothwell
2019-09-02 23:20   ` David Howells
2019-09-02 23:39     ` Stephen Rothwell
2019-09-02 23:51     ` David Howells
  -- strict thread matches above, loose matches on Subject: below --
2019-08-16  5:04 Stephen Rothwell
2017-11-13  2:08 Stephen Rothwell
2017-11-13 11:21 ` David Howells
2017-04-04  3:39 Stephen Rothwell

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org linux-next@archiver.kernel.org
	public-inbox-index linux-next


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/ public-inbox