All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits'
@ 2015-12-04 16:18 kbuild test robot
  2015-12-04 23:14 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2015-12-04 16:18 UTC (permalink / raw)
  To: Daniel Cashman
  Cc: kbuild-all, Mark Brown, Andrew Morton, Linux Memory Management List

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   dcccebc04ddba852aad354270986d508e8f011c0
commit: a8f025e63718534d6a9224a0b069b772ef21cb5d [4174/4356] arm: mm: support ARCH_MMAP_RND_BITS
config: arm-vf610m4_defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout a8f025e63718534d6a9224a0b069b772ef21cb5d
        # save the attached .config to linux build tree
        make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> kernel/built-in.o:(.data+0x754): undefined reference to `mmap_rnd_bits'
>> kernel/built-in.o:(.data+0x76c): undefined reference to `mmap_rnd_bits_min'
>> kernel/built-in.o:(.data+0x770): undefined reference to `mmap_rnd_bits_max'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 7195 bytes --]

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

* Re: [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits'
  2015-12-04 16:18 [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits' kbuild test robot
@ 2015-12-04 23:14 ` Andrew Morton
  2015-12-04 23:19   ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2015-12-04 23:14 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Daniel Cashman, kbuild-all, Mark Brown, Linux Memory Management List

On Sat, 5 Dec 2015 00:18:47 +0800 kbuild test robot <fengguang.wu@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   dcccebc04ddba852aad354270986d508e8f011c0
> commit: a8f025e63718534d6a9224a0b069b772ef21cb5d [4174/4356] arm: mm: support ARCH_MMAP_RND_BITS
> config: arm-vf610m4_defconfig (attached as .config)
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout a8f025e63718534d6a9224a0b069b772ef21cb5d
>         # save the attached .config to linux build tree
>         make.cross ARCH=arm 
> 
> All errors (new ones prefixed by >>):
> 
> >> kernel/built-in.o:(.data+0x754): undefined reference to `mmap_rnd_bits'
> >> kernel/built-in.o:(.data+0x76c): undefined reference to `mmap_rnd_bits_min'
> >> kernel/built-in.o:(.data+0x770): undefined reference to `mmap_rnd_bits_max'

OK, the patches are pretty broken when HAVE_ARCH_MMAP_RND_BITS=n.  I
guess a pile of new ifdefs need adding for this case.

There's also the matter of CONFIG_MMU=n.  mm/mmap.o doesn't get
included in the build in this case, so that will also break things.  I
suggest that can be fixed by making HAVE_ARCH_MMAP_RND_BITS and
HAVE_ARCH_MMAP_RND_COMPAT_BITS depend on MMU.  That should fix things
up when combined with the new ifdef-sprinkling.

This stuff is going to break quite a lot of test builds so I think I'll
consolidate the patches then drop 'em for now.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits'
  2015-12-04 23:14 ` Andrew Morton
@ 2015-12-04 23:19   ` Andrew Morton
  2015-12-05  0:56     ` Daniel Cashman
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2015-12-04 23:19 UTC (permalink / raw)
  To: kbuild test robot, Daniel Cashman, kbuild-all, Mark Brown,
	Linux Memory Management List

On Fri, 4 Dec 2015 15:14:24 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:

> There's also the matter of CONFIG_MMU=n.

ah, Arnd already fixed this one.  I guess I'll retain the patches
for now.



From: Arnd Bergmann <arnd@arndb.de>
Subject: ARM: avoid ARCH_MMAP_RND_BITS for NOMMU

ARM kernels with MMU disabled fail to build because of CONFIG_ARCH_MMAP_RND_BITS:

kernel/built-in.o:(.data+0x754): undefined reference to `mmap_rnd_bits'
kernel/built-in.o:(.data+0x76c): undefined reference to `mmap_rnd_bits_min'
kernel/built-in.o:(.data+0x770): undefined reference to `mmap_rnd_bits_max'

This changes the newly added line to only select this allow for
MMU-enabled kernels.

Fixes: 14570b3fd31a ("arm: mm: support ARCH_MMAP_RND_BITS")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Daniel Cashman <dcashman@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/arm/Kconfig~arm-mm-support-arch_mmap_rnd_bits-fix arch/arm/Kconfig
--- a/arch/arm/Kconfig~arm-mm-support-arch_mmap_rnd_bits-fix
+++ a/arch/arm/Kconfig
@@ -35,7 +35,7 @@ config ARM
 	select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
 	select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32
 	select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32
-	select HAVE_ARCH_MMAP_RND_BITS
+	select HAVE_ARCH_MMAP_RND_BITS if MMU
 	select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT)
 	select HAVE_ARCH_TRACEHOOK
 	select HAVE_BPF_JIT
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits'
  2015-12-04 23:19   ` Andrew Morton
@ 2015-12-05  0:56     ` Daniel Cashman
  2015-12-05  1:01       ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Cashman @ 2015-12-05  0:56 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kbuild test robot, kbuild-all, Mark Brown, Linux Memory Management List

Yes, patch-set v5 addressed the MMU case.  As for
HAVE_ARCH_MMAP_RND_BITS=n, I deliberately made it such that once an
arch implements the feature it selects it in its Kconfig, so we
shouldn't have the situation where an arch relies on an mmap_rnd_bits*
in its mmap.c, but doesn't find one defined.

At present, I am planning to change the arm64/Kconfing to get rid of
the "if MMU" portion, per Will Deacon's request, adjust the min bit
value, and add a comment.  I've left the question of whether or not
the value should be the number of randomized bits (current situation)
or the size of the address space chunk affected up to akpm@.  Please
let me know what else should be done in v6 to keep these in.

Thank You,
Dan

On Fri, Dec 4, 2015 at 3:19 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 4 Dec 2015 15:14:24 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
>> There's also the matter of CONFIG_MMU=n.
>
> ah, Arnd already fixed this one.  I guess I'll retain the patches
> for now.
>
>
>
> From: Arnd Bergmann <arnd@arndb.de>
> Subject: ARM: avoid ARCH_MMAP_RND_BITS for NOMMU
>
> ARM kernels with MMU disabled fail to build because of CONFIG_ARCH_MMAP_RND_BITS:
>
> kernel/built-in.o:(.data+0x754): undefined reference to `mmap_rnd_bits'
> kernel/built-in.o:(.data+0x76c): undefined reference to `mmap_rnd_bits_min'
> kernel/built-in.o:(.data+0x770): undefined reference to `mmap_rnd_bits_max'
>
> This changes the newly added line to only select this allow for
> MMU-enabled kernels.
>
> Fixes: 14570b3fd31a ("arm: mm: support ARCH_MMAP_RND_BITS")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Daniel Cashman <dcashman@google.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>  arch/arm/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN arch/arm/Kconfig~arm-mm-support-arch_mmap_rnd_bits-fix arch/arm/Kconfig
> --- a/arch/arm/Kconfig~arm-mm-support-arch_mmap_rnd_bits-fix
> +++ a/arch/arm/Kconfig
> @@ -35,7 +35,7 @@ config ARM
>         select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6
>         select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL && !CPU_ENDIAN_BE32
>         select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32
> -       select HAVE_ARCH_MMAP_RND_BITS
> +       select HAVE_ARCH_MMAP_RND_BITS if MMU
>         select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT)
>         select HAVE_ARCH_TRACEHOOK
>         select HAVE_BPF_JIT
> _
>



-- 
Dan Cashman

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits'
  2015-12-05  0:56     ` Daniel Cashman
@ 2015-12-05  1:01       ` Andrew Morton
  2015-12-05  1:46         ` Daniel Cashman
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2015-12-05  1:01 UTC (permalink / raw)
  To: Daniel Cashman
  Cc: kbuild test robot, kbuild-all, Mark Brown, Linux Memory Management List

On Fri, 4 Dec 2015 16:56:19 -0800 Daniel Cashman <dcashman@google.com> wrote:

> I've left the question of whether or not
> the value should be the number of randomized bits (current situation)
> or the size of the address space chunk affected up to akpm@.

Does it matter much?  It can always be changed later if it proves to be
a problem.

> Please let me know what else should be done in v6 to keep these in.

It sounds like all we need to do at present is to fix this build error?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits'
  2015-12-05  1:01       ` Andrew Morton
@ 2015-12-05  1:46         ` Daniel Cashman
  2015-12-07 18:13           ` Daniel Cashman
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Cashman @ 2015-12-05  1:46 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kbuild test robot, kbuild-all, Mark Brown,
	Linux Memory Management List, dcashman

> > I've left the question of whether or not
> > the value should be the number of randomized bits (current situation)
> > or the size of the address space chunk affected up to akpm@.
>
> Does it matter much?  It can always be changed later if it proves to be
> a problem.

Motivation for the suggestions was to get rid of the page size
consideration in setting default min/max Kconfig values to reduce line
count, otherwise both options are about equivalent.

> > Please let me know what else should be done in v6 to keep these in.
>
> It sounds like all we need to do at present is to fix this build error?

My apologies, I thought this was the one related to CONFIG_MMU=n.
I've reproduced locally and will look into this on Monday.

Thank You,
Dan

On Fri, Dec 4, 2015 at 5:01 PM, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 4 Dec 2015 16:56:19 -0800 Daniel Cashman <dcashman@google.com> wrote:
>
>> I've left the question of whether or not
>> the value should be the number of randomized bits (current situation)
>> or the size of the address space chunk affected up to akpm@.
>
> Does it matter much?  It can always be changed later if it proves to be
> a problem.
>
>> Please let me know what else should be done in v6 to keep these in.
>
> It sounds like all we need to do at present is to fix this build error?



-- 
Dan Cashman

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits'
  2015-12-05  1:46         ` Daniel Cashman
@ 2015-12-07 18:13           ` Daniel Cashman
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Cashman @ 2015-12-07 18:13 UTC (permalink / raw)
  To: Daniel Cashman, Andrew Morton
  Cc: kbuild test robot, kbuild-all, Mark Brown, Linux Memory Management List

On 12/04/2015 05:46 PM, Daniel Cashman wrote:
>>> Please let me know what else should be done in v6 to keep these in.
>>
>> It sounds like all we need to do at present is to fix this build error?
> 
> My apologies, I thought this was the one related to CONFIG_MMU=n.
> I've reproduced locally and will look into this on Monday.
> 

Actually, I just cloned linux-next and am not seeing this when
cross-compiling arm with the provided config unless "if MMU" is removed.
 So perhaps it was the same error and my local state was strange?

At present, I plan to prepare v6 to make some minor arm64 Kconfig
changes and corrects the ifdef missing character.

Thank You,
Dan

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2015-12-07 18:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 16:18 [linux-next:master 4174/4356] kernel/built-in.o:undefined reference to `mmap_rnd_bits' kbuild test robot
2015-12-04 23:14 ` Andrew Morton
2015-12-04 23:19   ` Andrew Morton
2015-12-05  0:56     ` Daniel Cashman
2015-12-05  1:01       ` Andrew Morton
2015-12-05  1:46         ` Daniel Cashman
2015-12-07 18:13           ` Daniel Cashman

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.