lists.openwall.net   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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=OsoWoRQ+drUR7c0L_NikmwJvdWCq50oU_TK4aVK0juQ@mail.gmail.com>
Date:   Wed, 28 Aug 2019 15:44:35 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Sedat Dilek <sedat.dilek@...il.com>
Cc:     Miguel Ojeda <miguel.ojeda.sandonis@...il.com>,
        Will Deacon <will@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        naveen.n.rao@...ux.vnet.ibm.com,
        "David S. Miller" <davem@...emloft.net>,
        Paul Burton <paul.burton@...s.com>,
        Clang-Built-Linux ML <clang-built-linux@...glegroups.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 00/14] treewide: prefer __section from compiler_attributes.h

On Wed, Aug 28, 2019 at 3:00 AM Sedat Dilek <sedat.dilek@...il.com> wrote:
>
> On Tue, Aug 27, 2019 at 10:40 PM Nick Desaulniers
> <ndesaulniers@...gle.com> wrote:
> >
> > GCC unescapes escaped string section names while Clang does not. Because
> > __section uses the `#` stringification operator for the section name, it
> > doesn't need to be escaped.
> >
> > This fixes an Oops observed in distro's that use systemd and not
> > net.core.bpf_jit_enable=1, when their kernels are compiled with Clang.
> >
> > Instead, we should:
> > 1. Prefer __section(.section_name_no_quotes).
> > 2. Only use __attribute__((__section(".section"))) when creating the
> > section name via C preprocessor (see the definition of __define_initcall
> > in arch/um/include/shared/init.h).

Case 2 referenced below.

> >
> > This antipattern was found with:
> > $ grep -e __section\(\" -e __section__\(\" -r
> >
>
> Hi Nick,
>
> thanks for the v2 of your patch-series.
>
> I just checked v2 on top of Linux v5.3-rc6...
> arch/um/include/shared/init.h:  __attribute__((__section__(".initcall"
> level ".init"))) = fn
>
> ??? ^^

Right, thanks for checking.  That case is a section dynamically built
via preprocessor, so that's the case I'm referring to in case 2.

>
> > See the discussions in:
> > https://bugs.llvm.org/show_bug.cgi?id=42950
> > https://marc.info/?l=linux-netdev&m=156412960619946&w=2
> >
>
> List CBL issue tracker to discussions:
> https://github.com/ClangBuiltLinux/linux/issues/619

Will do in v3!

-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ