Bug 217175 - arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction
Summary: arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable in...
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: other_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-11 08:13 UTC by Ray
Modified: 2023-03-18 22:54 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Ray 2023-03-11 08:13:52 UTC
objtool: sysvec_reboot()+0x4e: unreachable instruction

This one is new.  After patch   5.15.98 > 95.15.99
looks kinda scary, skip this one ?

asus KGPE-D16 pair opt 6380's 256gb
gcc (GCC) 5.5.0
root@14.2 ~ $ ls /var/log/packages/ | grep binut                                                                     
binutils-2.26-x86_64-3
Slack 14.2

root@14.2 linux-5.15.99.wd1tr2.14.2 $ cat ../mk
#!/bin/bash
#
 make -s clean && make -s -j 32 all && make -s modules_install

root@14.2 linux-5.15.99.wd1tr2.14.2 $ time ../mk
arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction
real    7m34.941s
user    170m34.621s
sys     16m14.860s
root@14.2 linux-5.15.99.wd1tr2.14.2 $
Comment 1 Artem S. Tashkinov 2023-03-11 12:56:08 UTC
Could you please bisect?

https://docs.kernel.org/admin-guide/bug-bisect.html
Comment 2 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-03-12 07:45:48 UTC
(In reply to Artem S. Tashkinov from comment #1)
> Could you please bisect?

No need to, this afaics was reported and bisected here already: 
https://lore.kernel.org/all/4ce8fe57-53eb-4a83-a468-ebfc98fed496@linaro.org/
Comment 3 Ray 2023-03-12 12:35:37 UTC
root@14.2 kernel $ cp -dlR linux-5.15.98.16r2 linux-5.15.99.16r2
root@14.2 linux-5.15.98.16r2 $ make -s clean && make -s -j 32 all
root@14.2 linux-5.15.98.16r2 $ ## Clean no warnings, current working kernel
root@14.2 linux-5.15.99.16r2 $ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/incr/patch-5.15.98-99.xz
root@14.2 linux-5.15.99.16r2 $ xz -d patch-5.15.98-99.xz                                                            
root@14.2 linux-5.15.99.16r2 $ patch -p1 -s < patch-5.15.98-99
root@14.2 linux-5.15.99.16r2 $ make menuconfig

( Do nothing except save .config and exit )

root@14.2 linux-5.15.99.16r2 $ make -s clean && make -s -j 32 all
arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction

root@14.2 linux-5.15.99.16r2 $ cp .config ../.config.5.15.99
root@14.2 linux-5.15.99.16r2 $ make distclean

root@14.2 linux-5.15.99.16r2 $ grep -Rls sysvec_reboot *
arch/x86/include/asm/idtentry.h
arch/x86/kernel/smp.c
arch/x86/kernel/idt.c
patch-5.15.98-99

##  so sysvec_reboot referenced smp.c idt.c and the patch file

  idtentry.h refs are declarations, don't think prob could be there.

  idtentry.h       5.15.98
#ifdef CONFIG_SMP
DECLARE_IDTENTRY(RESCHEDULE_VECTOR,                     sysvec_reschedule_ipi);
DECLARE_IDTENTRY_SYSVEC(IRQ_MOVE_CLEANUP_VECTOR,        sysvec_irq_move_cleanup);
DECLARE_IDTENTRY_SYSVEC(REBOOT_VECTOR,                  sysvec_reboot);
DECLARE_IDTENTRY_SYSVEC(CALL_FUNCTION_SINGLE_VECTOR,    sysvec_call_function_single);
DECLARE_IDTENTRY_SYSVEC(CALL_FUNCTION_VECTOR,           sysvec_call_function);
#endif

                   5.15.99
#ifdef CONFIG_SMP
DECLARE_IDTENTRY(RESCHEDULE_VECTOR,                     sysvec_reschedule_ipi);
DECLARE_IDTENTRY_SYSVEC(IRQ_MOVE_CLEANUP_VECTOR,        sysvec_irq_move_cleanup);
DECLARE_IDTENTRY_SYSVEC(REBOOT_VECTOR,                  sysvec_reboot);
DECLARE_IDTENTRY_SYSVEC(CALL_FUNCTION_SINGLE_VECTOR,    sysvec_call_function_single);
DECLARE_IDTENTRY_SYSVEC(CALL_FUNCTION_VECTOR,           sysvec_call_function);
#endif
------------------------------------------

  * The APIC and SMP idt entries -  idt.c  \\\\   5.15.98 = 99 identical,  no change

static const __initconst struct idt_data apic_idts[] = {
#ifdef CONFIG_SMP
        INTG(RESCHEDULE_VECTOR,                 asm_sysvec_reschedule_ipi),
        INTG(CALL_FUNCTION_VECTOR,              asm_sysvec_call_function),
        INTG(CALL_FUNCTION_SINGLE_VECTOR,       asm_sysvec_call_function_single),
        INTG(IRQ_MOVE_CLEANUP_VECTOR,           asm_sysvec_irq_move_cleanup),
        INTG(REBOOT_VECTOR,                     asm_sysvec_reboot),
#endif

--------------------------------------------

 smp.c - - -  5.15.98

 * this function calls the 'stop' function on all other CPUs in the system.
 */
DEFINE_IDTENTRY_SYSVEC(sysvec_reboot)
{
        ack_APIC_irq();
        cpu_emergency_vmxoff();
        stop_this_cpu(NULL);
}

 - - - - - 5.15.99

 * this function calls the 'stop' function on all other CPUs in the system.
 */
DEFINE_IDTENTRY_SYSVEC(sysvec_reboot)
{
        ack_APIC_irq();
        cpu_emergency_disable_virtualization();
        stop_this_cpu(NULL);
}

------------------------------------------------------

root@14.2 linux-5.15.99.16r2 $ grep -Rls cpu_emergency_disable_virtualization *
arch/x86/include/asm/reboot.h
arch/x86/kernel/smp.c
arch/x86/kernel/reboot.c
arch/x86/kernel/crash.c
patch-5.15.98-99
root@14.2 linux-5.15.99.16r2 $

 refs to that new function are not in things that would be missing
 from any classical kernel cfg . ( i think ) .

 Only coding ive ever done is Z80 assy back in 1978-1982  and dont know what
 binutils is complaining about, unreachable address ?  missing symbol during link ?

 
root@14.2 linux-5.15.99.16r2 $ make -s clean && make -s -j 32 all              
Makefile:669: include/config/auto.conf: No such file or directory
Makefile:724: include/config/auto.conf.cmd: No such file or directory
arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction

looks like the make distclean dorked the kernel tree .
 . i replaced the .config and ran make menuconfig before hand  .
 . looks like ill need to remove those
 binary arifacts distclean leaves behind again

so rm  tools/objtool/fixdep 
   rm  tools/objtool/objtool
   rm  scripts/basic/fixdep

root@14.2 linux-5.15.99.16r2 $ make distclean
root@14.2 linux-5.15.99.16r2 $ cp ../config.5.15.99 .config                                                             
root@14.2 linux-5.15.99.16r2 $ make menuconfig
root@14.2 linux-5.15.99.16r2 $ make -s -j 32 all
Makefile:669: include/config/auto.conf: No such file or directory
Makefile:724: include/config/auto.conf.cmd: No such file or directory

 I didnt touch those . . make distclean did that . .

 This kernel tree had old things that worked,

 ( sorta,  distclean should not leave behind fixdep 2 places or
 that objtool binary,   they break the tree when shared with
 multiple distributions, mrproper / distclean should make
 that possible yes? )

 things broken that should not be broken on a LTS kernel . .

 I wish i knew enough that i could be more helpful in fixing it.
 Have been compiling my own kernels and running only my own
 compiled kernels since 1995, Am at least familiar with doing that.

 Willing to try many things in the hope that i will learn something
 during my feeble attempt to be helpful. 

root@14.2 kernel $ rm -r linux-5.15.99.16r2
root@14.2 kernel $ cp -dlR linux-5.15.98.16r2 linux-5.15.99.16r2

root@14.2 kernel $ cd linux-5.15.99.16r2
root@14.2 linux-5.15.99.16r2 $ patch -s -p1 < ../patch-5.15.98-99
root@14.2 linux-5.15.99.16r2 $ cp ../config.5.15.99 .config
root@14.2 linux-5.15.99.16r2 $ make menuconfig

root@14.2 linux-5.15.99.16r2 $ make -s -j 32 all
arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction

 In the early days screens full of warnings was a normal thing .
 Hope we arn't going back to that ;=)

 unreachable instructions can be interpreted as serious as
 a null pointer, hope that don't happen during a diskcache flush.

 Perhaps that error is restricted to KVM virtual machines,
 looks like it might.

 Im not competent enough, nor have ny proper brain-map of kernel internals.

 Old 340-108 Nvidia driver went nuts against the new ABI in newer
 Xorg and ruined one of my KGPE-D16 numa server boards.

 Wish there was a target for my ire on that one. 

 Cheers !
 Raymond
Comment 4 Ray 2023-03-12 13:08:08 UTC
(In reply to The Linux kernel's regression tracker (Thorsten Leemhuis) from comment #2)
> (In reply to Artem S. Tashkinov from comment #1)
> > Could you please bisect?
> 
> No need to, this afaics was reported and bisected here already: 
> https://lore.kernel.org/all/4ce8fe57-53eb-4a83-a468-ebfc98fed496@linaro.org/

 fix not in 100 or 101 patch, but looks like it may come soon.

 Thx

 Now if we can just find a fix for nvidia 340-108 hard locking
 and burning 16x slots in our fancy numa server boards

 Yeah i know,,  don't make it hurt any less . ;=)

 Cheers!
 Raymond
Comment 5 Ray 2023-03-12 13:39:05 UTC
root@14.2 linux-5.15.101.16r2 $ patch -p1 -s < ../patch-5.15.99-100                                                     
root@14.2 linux-5.15.101.16r2 $ patch -p1 -s < ../patch-5.15.100-101                                                    
root@14.2 linux-5.15.101.16r2 $ make menuconfig
root@14.2 linux-5.15.101.16r2 $ make -s -j 32 all                                                           
arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction

Nope . . not yet . .
Comment 6 Ray 2023-03-12 14:10:56 UTC
In 
https://lore.kernel.org/all/20220412062945.857488242@linuxfoundation.org/

"  Both cases are due to a call_on_stack() calling a __noreturn function.
Since that's an inline asm, GCC can't do anything about the
instructions after the CALL. Therefore put in an explicit
ASM_REACHABLE annotation to make sure objtool and gcc are consistently
confused about control flow. "

diff --git a/arch/x86/include/asm/irq_stack.h b/arch/x86/include/asm/irq_stack.h
index 8d55bd11848c..e087cd7837c3 100644
--- a/arch/x86/include/asm/irq_stack.h
+++ b/arch/x86/include/asm/irq_stack.h
@@ -99,7 +99,8 @@
 }
 
 #define ASM_CALL_ARG0							\
-	"call %P[__func]				\n"
+	"call %P[__func]				\n"		\
+	ASM_REACHABLE
 
 #define ASM_CALL_ARG1							\
 	"movq	%[arg1], %%rdi				\n"		\
-- 
2.35.1

Not suggesting anyone apply this patch, might be incomplete
But useful explanation as to why.
Comment 7 Ray 2023-03-12 18:12:22 UTC
 Already the state of irq_stack.h  md Sep 21

#define ASM_CALL_ARG0                                                   \
        "call %P[__func]                                \n"             \
        ASM_REACHABLE
Comment 8 Ray 2023-03-12 19:53:27 UTC
arch/x86/kernel/reboot.c

void cpu_emergency_disable_virtualization(void)
{
        cpu_emergency_vmxoff();
        cpu_emergency_svm_disable();
}

root@14.2 linux-5.15.101.16r2 $ grep -Rls cpu_emergency_vmxoff *                                                        
arch/x86/include/asm/virtext.h
arch/x86/kernel/reboot.c
root@14.2 linux-5.15.101.16r2 $ grep -Rls cpu_emergency_svm_disable *                                                   
arch/x86/include/asm/virtext.h
arch/x86/kernel/reboot.c
root@14.2 linux-5.15.101.16r2 $

 Turning off KVM et al. in cfg  doesn't make it go away

 I notice this kind of glitch has a special case hack in 
 tools/objtool/check.c
 Perhaps list has to grow another loc.

         * Unfortunately these have to be hard coded because the noreturn
         * attribute isn't provided in ELF data.
         */
        static const char * const global_noreturns[] = {
                "__stack_chk_fail",
                "panic",
                "do_exit",
                "do_task_dead",
                "make_task_dead",
                "__module_put_and_exit",
                "complete_and_exit",
                "__reiserfs_panic",
                "lbug_with_loc",
                "fortify_panic",
                "usercopy_abort",
                "machine_real_restart",
                "rewind_stack_and_make_dead",
                "kunit_try_catch_throw",
                "xen_start_kernel",
                "cpu_bringup_and_idle",
                "stop_this_cpu",
        };

So here am I showing off my incompetence to the planet, I must have no shame at all.
..
Comment 9 Ray 2023-03-12 21:21:12 UTC
Ohh wait . . 

rm  scripts/basic/fixdep
rm  tools/objtool/objtool
rm  scripts/basic/fixdep

How would objtool get the update if it never gets remade ?
that causes problems in other contexts

Should get remade, if check.c got an update eh ?
 stop_this_cpu, was added to tools/objtool/check.c
 static const char * const global_noreturns
 with the 5.15.99 patch

root@14.2 linux-5.15.101.16r2 $ make distclean
root@14.2 linux-5.15.101.16r2 $ cp ../config.5.15.99 .config
root@14.2 linux-5.15.101.16r2 $ make menuconfig                                                                           
root@14.2 linux-5.15.101.16r2 $ time make -s -j 32 all                   
Makefile:669: include/config/auto.conf: No such file or directory
Makefile:724: include/config/auto.conf.cmd: No such file or directory

make distclean dorked the kernel tree again didn't it .
you fellas should fix that, shouldn't leave those 3 files
above behind either, they often cause problems out
here in the dirt where things are not so tidy.

root@14.2 kernel $ rm -r linux-5.15.101.16r2                                              
root@14.2 kernel $ cp -dlR linux-5.15.99.16r2 linux-5.15.101.16r2
root@14.2 kernel $ cd linux-5.15.101.16r2
root@14.2 linux-5.15.101.16r2 $ rm  tools/objtool/fixdep                                               
root@14.2 linux-5.15.101.16r2 $ rm  tools/objtool/objtool                                                                 
root@14.2 linux-5.15.101.16r2 $ rm  scripts/basic/fixdep
root@14.2 linux-5.15.101.16r2 $ patch -p1 -s < patch-5.15.99-100                                                          
root@14.2 linux-5.15.101.16r2 $ patch -p1 -s < patch-5.15.100-101
root@14.2 linux-5.15.101.16r2 $ cp ../config.5.15.99 .config                                                              
root@14.2 linux-5.15.101.16r2 $ make menuconfig

( remind me to do a diff on the before/after .config files, 
 new stuff showed up perhaps ?, wouldn't it be nice to know what
these were without running a diff on them ? ( or searching thru
 10,000 items in menuconfig ) because by default it turns those
 on, and sometimes, not helpful. )

 no guts, no glory.
root@14.2 linux-5.15.101.16r2 $ time make -s -j 32 all

# powersave mode, but 1.4g X 32 cores is still purty quick.

Me showing off, while i wait . . .

root@14.2 ~ $ ibstatus | grep link
        link_layer:      Ethernet
        link_layer:      InfiniBand
        link_layer:      InfiniBand
root@14.2 ~ $ numactl -H | grep cpus                                                                                    
node 0 cpus: 0 1 2 3 4 5 6 7
node 1 cpus: 8 9 10 11 12 13 14 15
node 2 cpus: 16 17 18 19 20 21 22 23
node 3 cpus: 24 25 26 27 28 29 30 31
root@14.2 ~ $ numactl -H | grep size 
node 0 size: 64350 MB
node 1 size: 64510 MB
node 2 size: 64510 MB
node 3 size: 64491 MB
root@14.2 ~ $       

arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction

real    6m54.220s
user    160m14.187s
sys     17m13.788s
root@14.2 linux-5.15.101.16r2 $

Well this is so way above my paygrade, but perhaps I was some use,
 most likely as an object of laughter.

Cheers!!
Raymond
Comment 10 Ray 2023-03-12 22:57:24 UTC
root@14.2 kernel $ diff linux-5.15.96.16r2/.config \                                                                      
>                       linux-5.15.101.16r2/.config

3c3
< # Linux/x86 5.15.98 Kernel Configuration
---
> # Linux/x86 5.15.101 Kernel Configuration
383c383
< # CONFIG_MICROCODE_OLD_INTERFACE is not set
---
> # CONFIG_MICROCODE_LATE_LOADING is not set
root@14.2 kernel $

Nuttin dere
Comment 11 Ray 2023-03-12 23:52:27 UTC
Just for grins, I have a new -current slack running in chroot

( incompatible with nvidia, will melt server board slots !! )
 ( now i understand why so many hate that outfit )

Lets try with more modern tool chain

root@14.2 kernel $ cp -dlR linux-5.15.101.16r2 linux-5.15.101.xxx


16r4[root@15.0+:/kernel/linux-5.15.101.xxx]# rm  tools/objtool/fixdep 
16r4[root@15.0+:/kernel/linux-5.15.101.xxx]# rm  tools/objtool/objtool
16r4[root@15.0+:/kernel/linux-5.15.101.xxx]# rm  scripts/basic/fixdep

This is the exact context where those files cause problems, distclean
is also broken so . .

16r4[root@15.0+:/kernel/linux-5.15.101.xxx]# PS1="16r4 \u@$dist: \W \$ "
16r4 root@15.0+: linux-5.15.101.xxx $ make clean ; make menuconfig
16r4 root@15.0+: kernel $ diff linux-5.15.101.16r2/.config \
                               linux-5.15.101.xxx/.config | less

Plenty new stuff but nothing problematic so

16r4 root@15.0+: linux-5.15.101.xxx $ time make -s -j32 all

Love these old monster boards tho, run 18 other distros in chroot "containers"
these old things carry loads like a freight train . keep them away from nvidia.


arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction


Ohh the hell you say . . .


In file included from arch/x86/boot/a20.c:14:
In function 'rdfs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:62:16:
arch/x86/boot/boot.h:126:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  126 |         asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
      |         ^~~
In function 'wrfs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:65:3:
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  140 |         asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "ri" (v));
      |         ^~~
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
In function 'rdgs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:67:8:
arch/x86/boot/boot.h:158:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  158 |         asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
      |         ^~~
In function 'wrfs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:72:2:
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  140 |         asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "ri" (v));
      |         ^~~
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
In function 'copy_boot_params',
    inlined from 'main' at arch/x86/boot/main.c:137:2:
arch/x86/boot/main.c:42:19: warning: array subscript 0 is outside array bounds of 'const struct old_cmdline[0]' [-Warray-bounds]
   42 |             oldcmd->cl_magic == OLD_CL_MAGIC) {
      |             ~~~~~~^~~~~~~~~~
arch/x86/boot/main.c:49:27: warning: array subscript 0 is outside array bounds of 'const struct old_cmdline[0]' [-Warray-bounds]
   49 |                 if (oldcmd->cl_offset < boot_params.hdr.setup_move_size)
      |                     ~~~~~~^~~~~~~~~~~
In file included from arch/x86/boot/video-bios.c:16:
In function 'rdfs16',
    inlined from 'bios_probe' at arch/x86/boot/video-bios.c:108:11:
arch/x86/boot/boot.h:120:9: warning: array subscript 0 is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds]
  120 |         asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
      |         ^~~
In function 'rdfs8',
    inlined from 'bios_probe' at arch/x86/boot/video-bios.c:109:11:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~
In file included from arch/x86/boot/video.c:16:
In function 'rdfs16',
    inlined from 'store_mode_params.part.0' at arch/x86/boot/video.c:83:14:
arch/x86/boot/boot.h:120:9: warning: array subscript 0 is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds]
  120 |         asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
      |         ^~~
In function 'rdfs16',
    inlined from 'store_mode_params.part.0' at arch/x86/boot/video.c:86:6:
arch/x86/boot/boot.h:120:9: warning: array subscript 0 is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds]
  120 |         asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
      |         ^~~
In function 'rdfs8',
    inlined from 'store_mode_params.part.0' at arch/x86/boot/video.c:87:38:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~
In file included from arch/x86/boot/video-mode.c:16:
In function 'rdfs8',
    inlined from 'vga_recalc_vertical' at arch/x86/boot/video-mode.c:123:14,
    inlined from 'set_mode' at arch/x86/boot/video-mode.c:163:3:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~
In function 'rdfs8',
    inlined from 'vga_recalc_vertical' at arch/x86/boot/video-mode.c:124:29,
    inlined from 'set_mode' at arch/x86/boot/video-mode.c:163:3:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~

real    8m12.117s
user    200m22.615s
sys     19m4.485s
16r4 root@15.0+: linux-5.15.101.xxx $
Comment 12 Ray 2023-03-13 00:37:02 UTC
16r4 root@15.0+: linux-5.15.101.xxx $ gcc --version
gcc (GCC) 12.2.0

16r4 root@15.0+: linux-6.1.15.16r4 $ ls /var/log/packages/ | grep binut
binutils-2.40-x86_64-1

Because we need a "control group" of some kind . .

16r4 root@15.0+: linux-6.1.15.16r4 $ make -s clean ; time make -s -j 32 all
real    9m10.703s
user    225m27.176s
sys     22m2.039s
16r4 root@15.0+: linux-6.1.15.16r4 $ 

Clean pass

Could something more than the pair of fixdep's and objtool be lurking
in that tree ?   distclean is broken so . .

Otherwise, someone drank too much last night, and pissed the bed.

Let us try the same thing with a hard link tree of 5.15.96

Another control group . . same pre-prep for the change in libraries
and tool chain

16r4 root@15.0+: linux-6.1.15.16r4 $ make clean
16r4 root@15.0+: linux-6.1.15.16r4 $ cd ..
16r4 root@15.0+: kernel $ cp -dlR linux-5.15.96.16r2 linux-5.15.96.xxx
16r4 root@15.0+: linux-5.15.96.xxx $ rm  scripts/basic/fixdep
16r4 root@15.0+: linux-5.15.96.xxx $ rm  tools/objtool/objtool
16r4 root@15.0+: linux-5.15.96.xxx $ rm  tools/objtool/fixdep
16r4 root@15.0+: linux-5.15.96.xxx $ make clean ; make menuconfig
16r4 root@15.0+: linux-5.15.96.xxx $ time make -s -j 32 all


 Ohh wow . .


In function 'copy_boot_params',
    inlined from 'main' at arch/x86/boot/main.c:137:2:
arch/x86/boot/main.c:42:19: warning: array subscript 0 is outside array bounds of 'const struct old_cmdline[0]' [-Warray-bounds]
   42 |             oldcmd->cl_magic == OLD_CL_MAGIC) {
      |             ~~~~~~^~~~~~~~~~
arch/x86/boot/main.c:49:27: warning: array subscript 0 is outside array bounds of 'const struct old_cmdline[0]' [-Warray-bounds]
   49 |                 if (oldcmd->cl_offset < boot_params.hdr.setup_move_size)
      |                     ~~~~~~^~~~~~~~~~~
In file included from arch/x86/boot/a20.c:14:
In function 'rdfs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:62:16:
arch/x86/boot/boot.h:126:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  126 |         asm volatile("movl %%fs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
      |         ^~~
In function 'wrfs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:65:3:
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  140 |         asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "ri" (v));
      |         ^~~
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
In function 'rdgs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:67:8:
arch/x86/boot/boot.h:158:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  158 |         asm volatile("movl %%gs:%1,%0" : "=r" (v) : "m" (*(u32 *)addr));
      |         ^~~
In function 'wrfs32',
    inlined from 'a20_test' at arch/x86/boot/a20.c:72:2:
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
  140 |         asm volatile("movl %1,%%fs:%0" : "+m" (*(u32 *)addr) : "ri" (v));
      |         ^~~
arch/x86/boot/boot.h:140:9: warning: array subscript 0 is outside array bounds of 'u32[0]' {aka 'unsigned int[]'} [-Warray-bounds]
In file included from arch/x86/boot/video-bios.c:16:
In function 'rdfs16',
    inlined from 'bios_probe' at arch/x86/boot/video-bios.c:108:11:
arch/x86/boot/boot.h:120:9: warning: array subscript 0 is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds]
  120 |         asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
      |         ^~~
In function 'rdfs8',
    inlined from 'bios_probe' at arch/x86/boot/video-bios.c:109:11:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~
In file included from arch/x86/boot/video.c:16:
In function 'rdfs16',
    inlined from 'store_mode_params.part.0' at arch/x86/boot/video.c:83:14:
arch/x86/boot/boot.h:120:9: warning: array subscript 0 is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds]
  120 |         asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
      |         ^~~
In function 'rdfs16',
    inlined from 'store_mode_params.part.0' at arch/x86/boot/video.c:86:6:
arch/x86/boot/boot.h:120:9: warning: array subscript 0 is outside array bounds of 'u16[0]' {aka 'short unsigned int[]'} [-Warray-bounds]
  120 |         asm volatile("movw %%fs:%1,%0" : "=r" (v) : "m" (*(u16 *)addr));
      |         ^~~
In function 'rdfs8',
    inlined from 'store_mode_params.part.0' at arch/x86/boot/video.c:87:38:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~
In file included from arch/x86/boot/video-mode.c:16:
In function 'rdfs8',
    inlined from 'vga_recalc_vertical' at arch/x86/boot/video-mode.c:123:14,
    inlined from 'set_mode' at arch/x86/boot/video-mode.c:163:3:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~
In function 'rdfs8',
    inlined from 'vga_recalc_vertical' at arch/x86/boot/video-mode.c:124:29,
    inlined from 'set_mode' at arch/x86/boot/video-mode.c:163:3:
arch/x86/boot/boot.h:114:9: warning: array subscript 0 is outside array bounds of 'u8[0]' {aka 'unsigned char[]'} [-Warray-bounds]
  114 |         asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(u8 *)addr));
      |         ^~~

real    8m20.581s
user    200m23.398s
sys     19m15.431s
16r4 root@15.0+: linux-5.15.96.xxx $
Comment 13 Ray 2023-03-13 01:32:36 UTC
Slack 15.0

16r3[root@:/kernel/linux-5.15.96.xxx]# gcc --version
gcc (GCC) 11.2.0

16r3[root@:/kernel/linux-5.15.96.xxx]# ls /var/log/packages/ | grep binut
binutils-2.37-x86_64-1

16r3[root@:/kernel/linux-5.15.96.xxx]# make clean
16r3[root@:/kernel/linux-5.15.96.xxx]# rm tools/objtool/fixdep 
16r3[root@:/kernel/linux-5.15.96.xxx]# rm tools/objtool/objtool
16r3[root@:/kernel/linux-5.15.96.xxx]# rm scripts/basic/fixdep
16r3[root@:/kernel/linux-5.15.96.xxx]# make menuconfig
16r3[root@:/kernel/linux-5.15.96.xxx]# time make -s -j 32 all

real    8m16.291s
user    197m44.858s
sys     22m18.752s
16r3[root@:/kernel/linux-5.15.96.xxx]# 

Clean pass,, same tree that barfed  with gcc 12.2

 Ok  new compiler no bueno 5.15.xx  (slack-current compiler used to work, but)

 since way back august 22 eh ? Yeah, that compiler used to be fine with 5.15
 This has happened fairly recently.

/home/data2/slackware/slackware64-current
Sun Aug 21 18:58:29 UTC 2022
d/gcc-12.2.0-x86_64-1.txz:  Upgraded.
Sat Jun 11 01:56:19 UTC 2022
d/gcc-12.1.0-x86_64-1.txz:  Upgraded.
Wed Apr 27 21:43:51 UTC 2022
d/gcc-11.3.0-x86_64-1.txz:  Upgraded.

I make hard link trees for each os  so i dont need to deal with
fixdep and objtool,,, that distclean wont clean when you share them.

I used to run nvidia 340-108 with kernel 6.1.x & slack-current

--  still works with 
root@14.2 ~ $ uname -a                                                         
Linux n64 5.15.96.16r2 #12 SMP Mon Feb 27 00:13:09 -00 2023 x86_64 AMD Opteron(tm) Processor 6380 --   and an older Xorg server

I would also apply patches for the kernels for the other bootable
root systems that otherwise run as chroot containers.

For illustration

root@14.2 ~ $ lilo
Added 5.15.101.16r2  *
Added 5.15.98.16r2
Added 5.15.96.16r2
Added 4710.16r2r
Added 4.9.337.16r7
Added 4710.16r7d
Added 6.1.15.16r4
Added 6.1.11.16r4
Added 6.1.14.16r3
Added 5.15.96.16r3
root@14.2 ~ $ 

Then the slot melting nuke
 (many hard locks backing up on kernel versions before the final melt )

 I ended up on my old slack 14.1 root volume and kernel 4.7.10
 before i found a working rather than hard locking (and slot melting)
 root volume apparently because the nvidia bomb had been backported
 down stream into the LTS kernels.

 the old 4.7.10  didnt get any of those, so it was still working
 
 combo of Xorg ABI change, latest kernel backport fixes, abandoned nvidia
 driver will melt your motherboards . .  beware.

 Anyhow . . looks like you fellas have your own mess to clean up.

 Cheers!
.
Comment 14 Ray 2023-03-13 02:00:15 UTC
 No , not going to risk my remaining numa serverboards to find when
 the slot melting nvidia nuke arrived.

 I have enough nvs 290' 300' dual monitor cards in operation
 to fill up a bucket, for us otherwise poor folk we will be
 using them quite a while longer . .

 It means we wont be updating upgrading anything except nonbootable
 containers, because otherwise kernel.org is full of slot melting
 nukes where nvidia in concerned. good idea, stay away from that
 company.  go with whats supported in kernel, and don't march
 close to the front of the column either, stay at the back,
 its safer back there.
Comment 15 Ray 2023-03-13 02:23:10 UTC
root@14.2 boot $ lilo
Added 5.15.96.16r2  *
Added 4710.16r2r
Added 4710.16r7d
Added 6.1.11.16r4
Added 5.15.96.16r3
root@14.2 boot $    

Shorter safer list me thinks . .
Comment 16 Ray 2023-03-13 04:11:17 UTC
ref https://nvidia.if-not-true-then-false.com/patcher/

   70165522 Dec 19  2019 NVIDIA-Linux-x86_64-340.108.run
  101937099 Nov 10 03:23 NVIDIA-x86_64-340.108-kernel-5.15.run
  101937664 May  7  2022 NVIDIA-x86_64-340.108-kernel-5.17.run
  101938042 Jul  6  2022 NVIDIA-x86_64-340.108-kernel-5.18.run
  101939210 Oct 27 23:04 NVIDIA-x86_64-340.108-kernel-6.0.run

 Those all worked before the nvidia nuke arrived

 N5LAX-Ray — 03/03/2023 9:45 PM
 new kernel  binab

 Ahh nuke arrival day . .
 11131760 Mar  3 20:08 v6.1.15.16r4   nuke kernel . .

 11134608 Feb 10 04:33 v6.1.11.16r4
 11106160 Feb 27 00:32 v6.1.14.16r3

 Was prob an update from 6.1.11, many kernels get built only
 to be replaced with newer patch before they ever get used.
 so 6.1.11. might be safe, but cant risk it anyway.

 so we done wit all dat aint we.
Comment 17 Ray 2023-03-18 22:54:09 UTC
root@14.2 linux-5.15.103.16r2 $ time ../mk
arch/x86/kernel/smp.o: warning: objtool: sysvec_reboot()+0x4e: unreachable instruction

Still there in patch 5 15 103

I get the impresion this warning is basically harmless

Look at all the others on their plate . .

The nvidia nuke bomb that was backported melts pcie slots
.. not quite so harmless . .

Beware nvidia . .

Note You need to log in before you can comment on or make changes to this bug.