Skip to contentSkip to conversation

Build error for nommu if CONFIG_DEBUG_ATOMIC_SLEEP is selected

DISCUSSION Axel Lin 2 participants 4 messages Oct 18, 2013

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

Hi Michael,

I got below build error for nommu if CONFIG_DEBUG_ATOMIC_SLEEP is selected. Also got the same build error if CONFIG_PROVE_LOCKING is selected.

Seems this issue is introduced by commit 662bbcb2747c2 "mm, sched: Allow uaccess in atomic with pagefault_disable()".

arch/arm/kernel/built-in.o: In function `arch_ptrace':
arch/arm/kernel/ptrace.c:852: undefined reference to might_fault' arch/arm/kernel/built-in.o: In function restore_sigframe':
arch/arm/kernel/signal.c:173: undefined reference to might_fault' arch/arm/kernel/signal.c:174: undefined reference to might_fault' arch/arm/kernel/signal.c:175: undefined reference to might_fault' arch/arm/kernel/signal.c:176: undefined reference to might_fault' arch/arm/kernel/built-in.o:arch/arm/kernel/signal.c:177: more undefined references to `might_fault' follow
make: *** [vmlinux] Error 1

Regards,
Axel

#1 lore raw
Quoted 18 lines · Axel Lin

Hi Michael,

I got below build error for nommu if CONFIG_DEBUG_ATOMIC_SLEEP is selected. Also got the same build error if CONFIG_PROVE_LOCKING is selected.

Seems this issue is introduced by commit 662bbcb2747c2 "mm, sched: Allow uaccess in atomic with pagefault_disable()".

arch/arm/kernel/built-in.o: In function `arch_ptrace':
arch/arm/kernel/ptrace.c:852: undefined reference to might_fault' arch/arm/kernel/built-in.o: In function restore_sigframe':
arch/arm/kernel/signal.c:173: undefined reference to might_fault' arch/arm/kernel/signal.c:174: undefined reference to might_fault' arch/arm/kernel/signal.c:175: undefined reference to might_fault' arch/arm/kernel/signal.c:176: undefined reference to might_fault' arch/arm/kernel/built-in.o:arch/arm/kernel/signal.c:177: more undefined references to `might_fault' follow
make: *** [vmlinux] Error 1

Quoted 2 lines

Regards,
Axel

Can you send/upload your full .config please?

author
#2 lore raw

2013/10/18 Michael S. Tsirkin <[email protected]>:

Quoted 19 lines · Axel Lin
Quoted 18 lines

Hi Michael,

I got below build error for nommu if CONFIG_DEBUG_ATOMIC_SLEEP is selected. Also got the same build error if CONFIG_PROVE_LOCKING is selected.

Seems this issue is introduced by commit 662bbcb2747c2 "mm, sched: Allow uaccess in atomic with pagefault_disable()".

arch/arm/kernel/built-in.o: In function `arch_ptrace':
arch/arm/kernel/ptrace.c:852: undefined reference to might_fault' arch/arm/kernel/built-in.o: In function restore_sigframe':
arch/arm/kernel/signal.c:173: undefined reference to might_fault' arch/arm/kernel/signal.c:174: undefined reference to might_fault' arch/arm/kernel/signal.c:175: undefined reference to might_fault' arch/arm/kernel/signal.c:176: undefined reference to might_fault' arch/arm/kernel/built-in.o:arch/arm/kernel/signal.c:177: more undefined references to `might_fault' follow
make: *** [vmlinux] Error 1

Quoted 4 lines
Quoted 2 lines

Regards,
Axel

Can you send/upload your full .config please?

I patch the kernel to port it for an arm7tdmi SoC. But I think you can easily reproduce it by simply select ARM7TDMI cpu and then enable either CONFIG_DEBUG_ATOMIC_SLEEP or CONFIG_PROVE_LOCKING.

Note, might_fault is implemented in mm/memory.c which is not built if !CONFIG_MMU.

Regards,
Axel

#3 lore raw
Quoted 30 lines · Axel Lin

2013/10/18 Michael S. Tsirkin <[email protected]>:

Quoted 19 lines · Axel Lin
Quoted 18 lines

Hi Michael,

I got below build error for nommu if CONFIG_DEBUG_ATOMIC_SLEEP is selected. Also got the same build error if CONFIG_PROVE_LOCKING is selected.

Seems this issue is introduced by commit 662bbcb2747c2 "mm, sched: Allow uaccess in atomic with pagefault_disable()".

arch/arm/kernel/built-in.o: In function `arch_ptrace':
arch/arm/kernel/ptrace.c:852: undefined reference to might_fault' arch/arm/kernel/built-in.o: In function restore_sigframe':
arch/arm/kernel/signal.c:173: undefined reference to might_fault' arch/arm/kernel/signal.c:174: undefined reference to might_fault' arch/arm/kernel/signal.c:175: undefined reference to might_fault' arch/arm/kernel/signal.c:176: undefined reference to might_fault' arch/arm/kernel/built-in.o:arch/arm/kernel/signal.c:177: more undefined references to `might_fault' follow
make: *** [vmlinux] Error 1

Quoted 4 lines
Quoted 2 lines

Regards,
Axel

Can you send/upload your full .config please?

I patch the kernel to port it for an arm7tdmi SoC. But I think you can easily reproduce it by simply select ARM7TDMI cpu and then enable either CONFIG_DEBUG_ATOMIC_SLEEP or CONFIG_PROVE_LOCKING.

Quoted 5 lines

Note, might_fault is implemented in mm/memory.c which is not built if !CONFIG_MMU.

Regards,
Axel

Shouldn't might_fault return 0 if !CONFIG_MMU?
No mmu->no fault ...