linux-next: build warning after merge of the tip tree
Subsystems (2)
Hi all,
After merging the tip tree, today's linux-next build (x86_64 allmodconfig) produced this warning:
vmlinux.o: warning: objtool: mce_setup()+0x22: call to memset() leaves .noinstr.text section
vmlinux.o: warning: objtool: do_machine_check()+0x51: call to mce_gather_info() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter()+0x0: call to rcu_dynticks_task_trace_enter() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit()+0xe: call to rcu_dynticks_task_trace_exit() leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_nmi_enter()+0x36: call to __kasan_check_read() leaves .noinstr.text section
I don't know what produced these warnings.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 7 lines · Stephen Rothwell
Hi all,
After merging the tip tree, today's linux-next build (
x86_64allmodconfig) produced this warning:vmlinux.o: warning: objtool: mce_setup()+0x22: call to
memset()leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x51: call tomce_gather_info()leaves .noinstr.text section
Those are pre-existing and Boris is lokoing into them, these however, are new:
Quoted 2 lines
vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter()+0x0: call to
rcu_dynticks_task_trace_enter()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit()+0xe: call torcu_dynticks_task_trace_exit()leaves .noinstr.text section
These are from 7d0c9c50c5a1 ("rcu-tasks: Avoid IPIing userspace/idle tasks if kernel is so built").
The below seems to help.
Quoted 1 line
vmlinux.o: warning: objtool: rcu_nmi_enter()+0x36: call to
__kasan_check_read()leaves .noinstr.text section
That's 2be57f732889 ("rcu: Weaken ->dynticks accesses and updates"), doing:
- return !(arch_atomic_read(&this_cpu_ptr(&rcu_data)->dynticks) & 0x1);
+ return !(atomic_read(this_cpu_ptr(&rcu_data.dynticks)) & 0x1);
and causing instrumentation to be inserted where none is acceptable. Flipping that back to arch_atomic_read() makes it go away as expected.
---
kernel/rcu/tree_plugin.h +4 -4
@@ -1479,7 +1479,7 @@ static void rcu_bind_gp_kthread(void) }/* Record the current task on dyntick-idle entry. */ -static void noinstr rcu_dynticks_task_enter(void) +static __always_inline void rcu_dynticks_task_enter(void) {#if defined(CONFIG_TASKS_RCU ) && defined(CONFIG_NO_HZ_FULL )WRITE_ONCE (current->rcu_tasks_idle_cpu,smp_processor_id ());
@@ -1487,7 +1487,7 @@ static void noinstr rcu_dynticks_task_enter(void) }/* Record no current task on dyntick-idle exit. */ -static void noinstr rcu_dynticks_task_exit(void) +static __always_inline void rcu_dynticks_task_exit(void) {#if defined(CONFIG_TASKS_RCU ) && defined(CONFIG_NO_HZ_FULL )WRITE_ONCE (current->rcu_tasks_idle_cpu,-1 );
@@ -1495,7 +1495,7 @@ static void noinstr rcu_dynticks_task_exit(void) }/* Turn on heavyweight RCU tasks trace readers on idle/user entry. */ -static void rcu_dynticks_task_trace_enter (void ) +static __always_inline void rcu_dynticks_task_trace_enter(void) {#ifdef CONFIG_TASKS_TRACE_RCU if (IS_ENABLED (CONFIG_TASKS_TRACE_RCU_READ_MB ))
@@ -1504,7 +1504,7 @@ static void rcu_dynticks_task_trace_enter(void) }/* Turn off heavyweight RCU tasks trace readers on idle/user exit. */ -static void rcu_dynticks_task_trace_exit (void ) +static __always_inline void rcu_dynticks_task_trace_exit(void) {#ifdef CONFIG_TASKS_TRACE_RCU if (IS_ENABLED (CONFIG_TASKS_TRACE_RCU_READ_MB ))
Quoted 28 lines · Peter Zijlstra
Quoted 7 lines · Stephen Rothwell
Hi all,
After merging the tip tree, today's linux-next build (
x86_64allmodconfig) produced this warning:vmlinux.o: warning: objtool: mce_setup()+0x22: call to
memset()leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x51: call tomce_gather_info()leaves .noinstr.text sectionThose are pre-existing and Boris is lokoing into them, these however, are new:
Quoted 2 lines
vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter()+0x0: call to
rcu_dynticks_task_trace_enter()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit()+0xe: call torcu_dynticks_task_trace_exit()leaves .noinstr.text sectionThese are from
7d0c9c50c5a1("rcu-tasks: Avoid IPIing userspace/idle tasks if kernel is so built").The below seems to help.
Quoted 1 line
vmlinux.o: warning: objtool: rcu_nmi_enter()+0x36: call to
__kasan_check_read()leaves .noinstr.text sectionThat's
2be57f732889("rcu: Weaken ->dynticks accesses and updates"), doing:(quoted diff) +1
-1- return !(arch_atomic_read(&this_cpu_ptr(&rcu_data)->dynticks) & 0x1); + return !(atomic_read(this_cpu_ptr(&rcu_data.dynticks)) & 0x1);
Quoted 2 lines
and causing instrumentation to be inserted where none is acceptable. Flipping that back to
arch_atomic_read()makes it go away as expected.
The 2be57f732889 commit went in during the v5.15 merge window and the 7d0c9c50c5a1 went into v5.8, but perhaps Linus won't be averse to taking a fix for an older bug along with the regression. ;-)
Given no Signed-off-by, I am guessing that you would like to push this separately. If so:
Quoted 42 lines
---
kernel/rcu/tree_plugin.h +4
-4@@ -1479,7 +1479,7 @@ static void rcu_bind_gp_kthread(void) }/* Record the current task on dyntick-idle entry. */ -static void noinstr rcu_dynticks_task_enter(void) +static __always_inline void rcu_dynticks_task_enter(void) {#if defined(CONFIG_TASKS_RCU ) && defined(CONFIG_NO_HZ_FULL )WRITE_ONCE (current->rcu_tasks_idle_cpu,smp_processor_id ());@@ -1487,7 +1487,7 @@ static void noinstr rcu_dynticks_task_enter(void) }/* Record no current task on dyntick-idle exit. */ -static void noinstr rcu_dynticks_task_exit(void) +static __always_inline void rcu_dynticks_task_exit(void) {#if defined(CONFIG_TASKS_RCU ) && defined(CONFIG_NO_HZ_FULL )WRITE_ONCE (current->rcu_tasks_idle_cpu,-1 );@@ -1495,7 +1495,7 @@ static void noinstr rcu_dynticks_task_exit(void) }/* Turn on heavyweight RCU tasks trace readers on idle/user entry. */ -static void rcu_dynticks_task_trace_enter (void ) +static __always_inline void rcu_dynticks_task_trace_enter(void) {#ifdef CONFIG_TASKS_TRACE_RCU if (IS_ENABLED (CONFIG_TASKS_TRACE_RCU_READ_MB ))@@ -1504,7 +1504,7 @@ static void rcu_dynticks_task_trace_enter(void) }/* Turn off heavyweight RCU tasks trace readers on idle/user exit. */ -static void rcu_dynticks_task_trace_exit (void ) +static __always_inline void rcu_dynticks_task_trace_exit(void) {#ifdef CONFIG_TASKS_TRACE_RCU if (IS_ENABLED (CONFIG_TASKS_TRACE_RCU_READ_MB ))
Hi all,
Quoted 10 lines · On Fri, 17 Sep 2021 10:23:48 +0200 Peter Zijlstra <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
After merging the tip tree, today's linux-next build (
x86_64allmodconfig) produced this warning:vmlinux.o: warning: objtool: mce_setup()+0x22: call to
memset()leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x51: call tomce_gather_info()leaves .noinstr.text sectionThose are pre-existing and Boris is lokoing into them
I am still seeing the above 2 warnings and also now:
vmlinux.o: warning: objtool: xen_get_debugreg()+0xb: call to HYPERVISOR_get_debugreg() leaves .noinstr.text section vmlinux.o: warning: objtool: xen_set_debugreg()+0x15: call to HYPERVISOR_set_debugreg.isra.0() leaves .noinstr.text section
Presumably caused by
f4afb713e5c3 ("x86/xen: Make get_debugreg() noinstr") 7361fac0465b ("x86/xen: Make set_debugreg() noinstr")
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 9 lines · On Fri, 17 Sep 2021 11:58:59 +1000 Stephen Rothwell <[email protected]>…
After merging the tip tree, today's linux-next build (
x86_64allmodconfig) produced this warning:vmlinux.o: warning: objtool: mce_setup()+0x22: call to
memset()leaves .noinstr.text section
vmlinux.o: warning: objtool: do_machine_check()+0x51: call tomce_gather_info()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter()+0x0: call torcu_dynticks_task_trace_enter()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit()+0xe: call torcu_dynticks_task_trace_exit()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_nmi_enter()+0x36: call to__kasan_check_read()leaves .noinstr.text section
Today, we added these:
vmlinux.o: warning: objtool: xen_irq_disable()+0xa: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: xen_irq_enable()+0xb: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: check_preemption_disabled()+0x81: call to is_percpu_thread() leaves .noinstr.text section
and the rcu_nmi_enter one changed to:
vmlinux.o: warning: objtool: rcu_nmi_enter()+0x5d: call to __kasan_check_read() leaves .noinstr.text section
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 14 lines · On Mon, 20 Sep 2021 11:38:09 +1000 Stephen Rothwell <[email protected]>…
Quoted 9 lines · On Fri, 17 Sep 2021 11:58:59 +1000 Stephen Rothwell <[email protected]>…
After merging the tip tree, today's linux-next build (
x86_64allmodconfig) produced this warning:vmlinux.o: warning: objtool: mce_setup()+0x22: call to
memset()leaves .noinstr.text section
vmlinux.o: warning: objtool: do_machine_check()+0x51: call tomce_gather_info()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter()+0x0: call torcu_dynticks_task_trace_enter()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit()+0xe: call torcu_dynticks_task_trace_exit()leaves .noinstr.text section vmlinux.o: warning: objtool: rcu_nmi_enter()+0x36: call to__kasan_check_read()leaves .noinstr.text sectionToday, we added these:
Quoted 7 lines
vmlinux.o: warning: objtool: xen_irq_disable()+0xa: call to
preempt_count_add()leaves .noinstr.text section vmlinux.o: warning: objtool: xen_irq_enable()+0xb: call topreempt_count_add()leaves .noinstr.text section vmlinux.o: warning: objtool: check_preemption_disabled()+0x81: call tois_percpu_thread()leaves .noinstr.text sectionand the
rcu_nmi_enterone changed to:vmlinux.o: warning: objtool: rcu_nmi_enter()+0x5d: call to
__kasan_check_read()leaves .noinstr.text section
Currently, I am getting these:
vmlinux.o: warning: objtool: xen_irq_disable()+0xa: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: xen_irq_enable()+0xb: call to preempt_count_add() leaves .noinstr.text section vmlinux.o: warning: objtool: mce_setup()+0x22: call to memset() leaves .noinstr.text section vmlinux.o: warning: objtool: do_machine_check()+0x99: call to mce_gather_info() leaves .noinstr.text section
(the rcu ones are gone once I merge the rcu tree)
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 2 lines · Stephen Rothwell
vmlinux.o: warning: objtool: xen_irq_disable()+0xa: call to
preempt_count_add()leaves .noinstr.text section vmlinux.o: warning: objtool: xen_irq_enable()+0xb: call topreempt_count_add()leaves .noinstr.text section
https://lkml.kernel.org/r/[email protected]
Juergen, where are we with those patches?
Quoted 8 lines · Peter Zijlstra
Quoted 2 lines · Stephen Rothwell
vmlinux.o: warning: objtool: xen_irq_disable()+0xa: call to
preempt_count_add()leaves .noinstr.text section vmlinux.o: warning: objtool: xen_irq_enable()+0xb: call topreempt_count_add()leaves .noinstr.text sectionhttps://lkml.kernel.org/r/[email protected]
Juergen, where are we with those patches?
Queued for 5.16.
Juergen