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] [day] [month] [year] [list]
Message-ID: <CAK8P3a0vTwtDtxDhfmhzOViUp+DPzuJ_qsQsnVFw4B7oBaudTQ@mail.gmail.com>
Date:   Fri, 12 Jul 2019 22:30:14 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "David (ChunMing) Zhou" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Dmytro Laktyushkin <Dmytro.Laktyushkin@....com>,
        Duke Du <Duke.Du@....com>, Charlene Liu <charlene.liu@....com>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Matthias Kaehlcke <mka@...gle.com>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>
Subject: Re: [PATCH] drm/amd/display: Support clang option for stack alignment

On Fri, Jul 12, 2019 at 8:49 PM 'Nick Desaulniers' via Clang Built
Linux <clang-built-linux@...glegroups.com> wrote:
>
> On Fri, Jul 12, 2019 at 2:37 AM Arnd Bergmann <arnd@...db.de> wrote:
> >
> > As previously fixed for dml in commit 4769278e5c7f ("amdgpu/dc/dml:
> > Support clang option for stack alignment") and calcs in commit
> > cc32ad8f559c ("amdgpu/dc/calcs: Support clang option for stack
> > alignment"), dcn20 uses an option that is not available with clang:
> >
> > clang: error: unknown argument: '-mpreferred-stack-boundary=4'
> > scripts/Makefile.build:281: recipe for target 'drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.o' failed
> >
> > Use the same trick that we have in the other two files.
>
> Maybe time for a macro in Kbuild.include or some such, if we see this
> pattern being repeated?

I'm not actually convinced that the argument does anything useful
at all, if the kernel stack is normally not 16-byte aligned
when we enter the driver, and it clearly is not needed if the stack
is already aligned.

Unless any code calling into the portions that want the alignment
manually aligns the kernel stack pointer, we could just as well
leave it out. The git history does not explain why it was added in the
first place though, so I really have no idea.

I see in the architecture makefiles that i386 kernels are built with
the same flag globally, but other architectures (including x86_64)
use the default stack alignment, which may be different.

      Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ