• Borislav Petkov's avatar
    x86/mce: Use arch atomic and bit helpers · f11445ba
    Borislav Petkov authored
    The arch helpers do not have explicit KASAN instrumentation. Use them in
    noinstr code.
    
    Inline a couple more functions with single call sites, while at it:
    
    mce_severity_amd_smca() has a single call-site which is noinstr so force
    the inlining and fix:
    
      vmlinux.o: warning: objtool: mce_severity_amd.constprop.0()+0xca: call to \
    	  mce_severity_amd_smca() leaves .noinstr.text section
    
    Always inline mca_msr_reg():
    
         text    data     bss     dec     hex filename
      16065240        128031326       36405368        180501934       ac23dae vmlinux.before
      16065240        128031294       36405368        180501902       ac23d8e vmlinux.after
    
    and mce_no_way_out() as the latter one is used only once, to fix:
    
      vmlinux.o: warning: objtool: mce_read_aux()+0x53: call to mca_msr_reg() leaves .noinstr.text section
      vmlinux.o: warning: objtool: do_machine_check()+0xc9: call to mce_no_way_out() leaves .noinstr.text section
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Acked-by: default avatarMarco Elver <elver@google.com>
    Link: https://lore.kernel.org/r/20220204083015.17317-4-bp@alien8.de
    f11445ba
severity.c 12.9 KB