lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 27 Feb 2021 16:11:20 +0100
From:   Arnd Bergmann <>
To:     Borislav Petkov <>
Cc:     Nick Desaulniers <>,
        Thomas Gleixner <>,
        Ingo Molnar <>,
        "the arch/x86 maintainers" <>,
        Nathan Chancellor <>,
        Arnd Bergmann <>,
        "H. Peter Anvin" <>,
        "" <>,
        clang-built-linux <>
Subject: Re: [PATCH] x86: mark some mpspec inline functions as __init

On Fri, Feb 26, 2021 at 2:24 PM Arnd Bergmann <> wrote:
> On Fri, Feb 26, 2021 at 9:13 AM Borislav Petkov <> wrote:
> >
> > On Thu, Feb 25, 2021 at 01:58:48PM -0800, Nick Desaulniers wrote:
> > > The config that reproduces it wasn't shared here; I wouldn't be
> > > surprised if this was found via randconfig that enabled some config
> > > that led to excessive code bloat somewhere somehow.
> >
> > I'm sceptical it is the .config. As I said, those single function calls
> > which I could replace by hand - the wrappers simply make the code
> > cleaner. They could just as well be macros FWIW and then the inlining
> > will be practically forced at preprocess time.
> I managed to track down the configurations: This particular function is
> not inlined whenever CONFIG_UBSAN_OBJECT_SIZE is enabled
> and CONFIG_UBSAN_TRAP is disabled, plus obviously any
> configuration option that is needed to build the file.

And I now had another look at the output after reducing the test case
with cvise to:

struct b {
  void *c;
struct {
  struct b d;
} extern e;
int f;

__attribute__((__cold__)) int a();
static inline void early_get_smp_config() {(void) e.d.c; }

int g()
  if (a())
    return 2;
  if (f)
    return f;
  return 0;


Some observations:

- The early_get_smp_config function literally does nothing in the
   reduced test case, but is still not inlined.

- This happens regardless of target architecture

- It happens in a code path of the calling function that is 'cold'
   at this point, which presumably is an indication to clang that
   any functions called from here are also cold, and not worth

- I have found no indication why -fsanitize=object-size should
  make a difference.


Powered by blists - more mailing lists