All of lore.kernel.org
 help / color / mirror / Atom feed
* Build failures in -next: sys_pkey_mprotect etc. undefined
@ 2016-09-12 14:55 Guenter Roeck
  2016-09-12 14:59   ` Arnd Bergmann
  2016-09-12 20:09 ` Dave Hansen
  0 siblings, 2 replies; 11+ messages in thread
From: Guenter Roeck @ 2016-09-12 14:55 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Thomas Gleixner, Arnd Bergmann, open list:ABI/API, linux-arch,
	linux-kernel

Building h8300:allnoconfig ... failed
Building h8300:h8300h-sim_defconfig ... failed
Building c6x:dsk6455_defconfig ... failed

[ and more builds for the same architectures ]

--------------
Error log:
arch/h8300/kernel/built-in.o:(.data+0x480): undefined reference to `sys_pkey_mprotect'
arch/h8300/kernel/built-in.o:(.data+0x484): undefined reference to `sys_pkey_alloc'
arch/h8300/kernel/built-in.o:(.data+0x488): undefined reference to `sys_pkey_free'

Other architectures (frv, xtensa, score) currently fail to build for other reasons,
so I don't really know if the above are the only ones affected.

Guenter

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
@ 2016-09-12 14:59   ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2016-09-12 14:59 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Dave Hansen, Thomas Gleixner, open list:ABI/API, linux-arch,
	linux-kernel

On Monday, September 12, 2016 7:55:33 AM CEST Guenter Roeck wrote:
> Building h8300:allnoconfig ... failed
> Building h8300:h8300h-sim_defconfig ... failed
> Building c6x:dsk6455_defconfig ... failed
> 
> [ and more builds for the same architectures ]
> 
> --------------
> Error log:
> arch/h8300/kernel/built-in.o:(.data+0x480): undefined reference to `sys_pkey_mprotect'
> arch/h8300/kernel/built-in.o:(.data+0x484): undefined reference to `sys_pkey_alloc'
> arch/h8300/kernel/built-in.o:(.data+0x488): undefined reference to `sys_pkey_free'
> 
> Other architectures (frv, xtensa, score) currently fail to build for other reasons,
> so I don't really know if the above are the only ones affected.
> 
> 

I think the best solution would be to add them to kernel/sys_ni.c so we can
assign syscall numbers for all architectures regardless of whether they use it
or not (most of them will never use these AFAICT).

	Arnd

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
@ 2016-09-12 14:59   ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2016-09-12 14:59 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Dave Hansen, Thomas Gleixner, open list:ABI/API, linux-arch,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Monday, September 12, 2016 7:55:33 AM CEST Guenter Roeck wrote:
> Building h8300:allnoconfig ... failed
> Building h8300:h8300h-sim_defconfig ... failed
> Building c6x:dsk6455_defconfig ... failed
> 
> [ and more builds for the same architectures ]
> 
> --------------
> Error log:
> arch/h8300/kernel/built-in.o:(.data+0x480): undefined reference to `sys_pkey_mprotect'
> arch/h8300/kernel/built-in.o:(.data+0x484): undefined reference to `sys_pkey_alloc'
> arch/h8300/kernel/built-in.o:(.data+0x488): undefined reference to `sys_pkey_free'
> 
> Other architectures (frv, xtensa, score) currently fail to build for other reasons,
> so I don't really know if the above are the only ones affected.
> 
> 

I think the best solution would be to add them to kernel/sys_ni.c so we can
assign syscall numbers for all architectures regardless of whether they use it
or not (most of them will never use these AFAICT).

	Arnd

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
  2016-09-12 14:59   ` Arnd Bergmann
  (?)
@ 2016-09-12 15:03   ` Dave Hansen
  -1 siblings, 0 replies; 11+ messages in thread
From: Dave Hansen @ 2016-09-12 15:03 UTC (permalink / raw)
  To: Arnd Bergmann, Guenter Roeck
  Cc: Thomas Gleixner, open list:ABI/API, linux-arch, linux-kernel

On 09/12/2016 07:59 AM, Arnd Bergmann wrote:
> On Monday, September 12, 2016 7:55:33 AM CEST Guenter Roeck wrote:
>> Building h8300:allnoconfig ... failed
>> Building h8300:h8300h-sim_defconfig ... failed
>> Building c6x:dsk6455_defconfig ... failed
>>
>> [ and more builds for the same architectures ]
>>
>> --------------
>> Error log:
>> arch/h8300/kernel/built-in.o:(.data+0x480): undefined reference to `sys_pkey_mprotect'
>> arch/h8300/kernel/built-in.o:(.data+0x484): undefined reference to `sys_pkey_alloc'
>> arch/h8300/kernel/built-in.o:(.data+0x488): undefined reference to `sys_pkey_free'
>>
>> Other architectures (frv, xtensa, score) currently fail to build for other reasons,
>> so I don't really know if the above are the only ones affected.
> 
> I think the best solution would be to add them to kernel/sys_ni.c so we can
> assign syscall numbers for all architectures regardless of whether they use it
> or not (most of them will never use these AFAICT).

Urg, sorry about the breakage.  I'll see if I can reproduce it and get a
patch out later today that does this.

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
  2016-09-12 14:55 Build failures in -next: sys_pkey_mprotect etc. undefined Guenter Roeck
  2016-09-12 14:59   ` Arnd Bergmann
@ 2016-09-12 20:09 ` Dave Hansen
  2016-09-12 20:28     ` Arnd Bergmann
  2016-09-12 20:32   ` Guenter Roeck
  1 sibling, 2 replies; 11+ messages in thread
From: Dave Hansen @ 2016-09-12 20:09 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Thomas Gleixner, Arnd Bergmann, open list:ABI/API, linux-arch,
	linux-kernel

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

On 09/12/2016 07:55 AM, Guenter Roeck wrote:
> Building h8300:allnoconfig ... failed
> Building h8300:h8300h-sim_defconfig ... failed
> Building c6x:dsk6455_defconfig ... failed
> 
> [ and more builds for the same architectures ]
> 
> --------------
> Error log:
> arch/h8300/kernel/built-in.o:(.data+0x480): undefined reference to
> `sys_pkey_mprotect'
> arch/h8300/kernel/built-in.o:(.data+0x484): undefined reference to
> `sys_pkey_alloc'
> arch/h8300/kernel/built-in.o:(.data+0x488): undefined reference to
> `sys_pkey_free'

So, I've done what Arnd suggested, but I don't have a working
cross-compiler than can do h8300 or c6x.  Could you test the attached
patch and see if it gets things working for you?

Also, do you have a handy place to grab a cross-compiler for h8300
without having to build one?  The kernel.org ones don't seem to work for
h8300.


[-- Attachment #2: fix-pkeys-arch-breakage.patch --]
[-- Type: text/x-patch, Size: 1047 bytes --]


Guenter Roeck reported breakage on the h8300 and c6x architectures
(among others) caused by the new memory protection keys syscalls.
This patch does what Arnd suggested and adds them to
kernel/sys_ni.c.

I don't have a cross-compiler for either of these architectures
handy, and kernel.org doesn't provide one either, so I have not
built this patch.  Testing would be appreciated.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "open list:ABI/API" <linux-api@vger.kernel.org>
Cc: linux-arch@vger.kernel.org

---

 b/kernel/sys_ni.c |    5 +++++
 1 file changed, 5 insertions(+)

diff -puN kernel/sys_ni.c~fix-pkeys-arch-breakage kernel/sys_ni.c
--- a/kernel/sys_ni.c~fix-pkeys-arch-breakage	2016-09-12 12:50:47.801607239 -0700
+++ b/kernel/sys_ni.c	2016-09-12 12:50:47.804607374 -0700
@@ -250,3 +250,8 @@ cond_syscall(sys_execveat);
 
 /* membarrier */
 cond_syscall(sys_membarrier);
+
+/* memory protection keys */
+cond_syscall(sys_pkey_mprotect);
+cond_syscall(sys_pkey_alloc);
+cond_syscall(sys_pkey_free);
_

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
@ 2016-09-12 20:28     ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2016-09-12 20:28 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Guenter Roeck, Thomas Gleixner, open list:ABI/API, linux-arch,
	linux-kernel

On Monday, September 12, 2016 1:09:17 PM CEST Dave Hansen wrote:
> 
> So, I've done what Arnd suggested, but I don't have a working
> cross-compiler than can do h8300 or c6x.  Could you test the attached
> patch and see if it gets things working for you?
> 
> Also, do you have a handy place to grab a cross-compiler for h8300
> without having to build one?  The kernel.org ones don't seem to work for
> h8300.
> 

I haven't tested it, but it looks good to me

Acked-by: Arnd Bergmann <arnd@arndb.de>

FWIW, you should be able to test this with an arm64 cross-compiler
too, many distros ship one.

	Arnd

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
@ 2016-09-12 20:28     ` Arnd Bergmann
  0 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2016-09-12 20:28 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Guenter Roeck, Thomas Gleixner, open list:ABI/API, linux-arch,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Monday, September 12, 2016 1:09:17 PM CEST Dave Hansen wrote:
> 
> So, I've done what Arnd suggested, but I don't have a working
> cross-compiler than can do h8300 or c6x.  Could you test the attached
> patch and see if it gets things working for you?
> 
> Also, do you have a handy place to grab a cross-compiler for h8300
> without having to build one?  The kernel.org ones don't seem to work for
> h8300.
> 

I haven't tested it, but it looks good to me

Acked-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>

FWIW, you should be able to test this with an arm64 cross-compiler
too, many distros ship one.

	Arnd

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
  2016-09-12 20:09 ` Dave Hansen
  2016-09-12 20:28     ` Arnd Bergmann
@ 2016-09-12 20:32   ` Guenter Roeck
  1 sibling, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2016-09-12 20:32 UTC (permalink / raw)
  To: Dave Hansen
  Cc: Thomas Gleixner, Arnd Bergmann, open list:ABI/API, linux-arch,
	linux-kernel

Hi Dave,

On Mon, Sep 12, 2016 at 01:09:17PM -0700, Dave Hansen wrote:
> On 09/12/2016 07:55 AM, Guenter Roeck wrote:
> > Building h8300:allnoconfig ... failed
> > Building h8300:h8300h-sim_defconfig ... failed
> > Building c6x:dsk6455_defconfig ... failed
> > 
> > [ and more builds for the same architectures ]
> > 
> > --------------
> > Error log:
> > arch/h8300/kernel/built-in.o:(.data+0x480): undefined reference to
> > `sys_pkey_mprotect'
> > arch/h8300/kernel/built-in.o:(.data+0x484): undefined reference to
> > `sys_pkey_alloc'
> > arch/h8300/kernel/built-in.o:(.data+0x488): undefined reference to
> > `sys_pkey_free'
> 
> So, I've done what Arnd suggested, but I don't have a working
> cross-compiler than can do h8300 or c6x.  Could you test the attached
> patch and see if it gets things working for you?
> 
Works for both h8300 and c6x. Feel free to add

Tested-by: Guenter Roeck <linux@roeck-us.net>

> Also, do you have a handy place to grab a cross-compiler for h8300
> without having to build one?  The kernel.org ones don't seem to work for
> h8300.
> 
Try http://server.roeck-us.net/toolchains/. Should be position independent.

Guenter

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
  2016-09-12 20:28     ` Arnd Bergmann
  (?)
@ 2016-09-12 20:33     ` Guenter Roeck
  -1 siblings, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2016-09-12 20:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Dave Hansen, Thomas Gleixner, open list:ABI/API, linux-arch,
	linux-kernel

On Mon, Sep 12, 2016 at 10:28:56PM +0200, Arnd Bergmann wrote:
> On Monday, September 12, 2016 1:09:17 PM CEST Dave Hansen wrote:
> > 
> > So, I've done what Arnd suggested, but I don't have a working
> > cross-compiler than can do h8300 or c6x.  Could you test the attached
> > patch and see if it gets things working for you?
> > 
> > Also, do you have a handy place to grab a cross-compiler for h8300
> > without having to build one?  The kernel.org ones don't seem to work for
> > h8300.
> > 
> 
> I haven't tested it, but it looks good to me
> 
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> 
> FWIW, you should be able to test this with an arm64 cross-compiler
> too, many distros ship one.
> 
arm64 builds fine, though, even w/o this patch (at least for me).

Guenter

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
  2016-09-12 20:28     ` Arnd Bergmann
@ 2016-09-12 20:34       ` Dave Hansen
  -1 siblings, 0 replies; 11+ messages in thread
From: Dave Hansen @ 2016-09-12 20:34 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Guenter Roeck, Thomas Gleixner, open list:ABI/API, linux-arch,
	linux-kernel

On 09/12/2016 01:28 PM, Arnd Bergmann wrote:
> FWIW, you should be able to test this with an arm64 cross-compiler
> too, many distros ship one.

arm64 build fine for me with and without the patch.  There must be
something else specific to h8300 and the other broken architectures.

Is there some other part of the configuration that could be hiding the
issue in my arm64 build?

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

* Re: Build failures in -next: sys_pkey_mprotect etc. undefined
@ 2016-09-12 20:34       ` Dave Hansen
  0 siblings, 0 replies; 11+ messages in thread
From: Dave Hansen @ 2016-09-12 20:34 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Guenter Roeck, Thomas Gleixner, open list:ABI/API, linux-arch,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 09/12/2016 01:28 PM, Arnd Bergmann wrote:
> FWIW, you should be able to test this with an arm64 cross-compiler
> too, many distros ship one.

arm64 build fine for me with and without the patch.  There must be
something else specific to h8300 and the other broken architectures.

Is there some other part of the configuration that could be hiding the
issue in my arm64 build?

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

end of thread, other threads:[~2016-09-12 20:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 14:55 Build failures in -next: sys_pkey_mprotect etc. undefined Guenter Roeck
2016-09-12 14:59 ` Arnd Bergmann
2016-09-12 14:59   ` Arnd Bergmann
2016-09-12 15:03   ` Dave Hansen
2016-09-12 20:09 ` Dave Hansen
2016-09-12 20:28   ` Arnd Bergmann
2016-09-12 20:28     ` Arnd Bergmann
2016-09-12 20:33     ` Guenter Roeck
2016-09-12 20:34     ` Dave Hansen
2016-09-12 20:34       ` Dave Hansen
2016-09-12 20:32   ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.