[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMzpN2hz=N5he_t2F0ns_TJ51QQdSc6Pq02pq6JW5PSYR-2zRg@mail.gmail.com>
Date: Wed, 1 Dec 2021 09:21:19 -0500
From: Brian Gerst <brgerst@...il.com>
To: David Laight <David.Laight@...lab.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
"H . Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v2 2/6] x86-64: Convert stack protector to normal percpu variable
On Wed, Dec 1, 2021 at 4:50 AM David Laight <David.Laight@...lab.com> wrote:
>
> From: Brian Gerst
> > Sent: 30 November 2021 20:56
> >
> > Older versions of GCC fixed the location of the stack protector canary
> > at %gs:40. This constraint forced the percpu section to be linked at
> > virtual address 0 so that the canary could be the first data object in
> > the percpu section. Supporting the zero-based percpu section requires
> > additional code to handle relocations for RIP-relative references to
> > percpu data, extra complexity to kallsyms, and workarounds for linker
> > bugs due to the use of absolute symbols.
> >
> > Since version 8.1, GCC has options to configure the location of the
> > canary value. This allows the canary to be turned into a normal
> > percpu variable and removes the constraint that the percpu section
> > be zero-based.
>
> I didn't think the minimum gcc version has been raised as far as 8.1?
The first version of this patchset retained compatibility with older
compilers, but there were objections to the increased code size to
support both versions. x86-32 already dropped support for stack
protector on older compilers, so v2 of this patchset does the same.
The benefit of removing the fixed location version is all of the
supporting code that can be removed when the stack protector becomes a
standard percpu variable.
--
Brian Gerst
Powered by blists - more mailing lists