From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 References: <20190131192533.34130-1-thgarnie@chromium.org> <20190131192533.34130-3-thgarnie@chromium.org> <20190207121729.GE2414@zn.tnic> <20190207171145.GH2414@zn.tnic> In-Reply-To: <20190207171145.GH2414@zn.tnic> From: Thomas Garnier Date: Thu, 7 Feb 2019 15:55:35 -0800 Message-ID: Subject: Re: [PATCH v6 02/27] x86: Use symbol name in jump table for PIE support Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To: Borislav Petkov Cc: Kernel Hardening , Kristen Carlson Accardi , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , the arch/x86 maintainers , "Peter Zijlstra (Intel)" , Ard Biesheuvel , Nadav Amit , Masahiro Yamada , LKML List-ID: On Thu, Feb 7, 2019 at 9:11 AM Borislav Petkov wrote: > > On Thu, Feb 07, 2019 at 09:04:45AM -0800, Thomas Garnier wrote: > > I assume that's an optimisation done by gcc later. > > So why is that change even needed? Where does it break? > > > The P modifier in the documentation does state that it is used to > > generate PIC code. > > The documentation says: > > "If used for a function, print the PLT suffix and generate PIC code. For > example, emit foo@PLT instead of =E2=80=99foo=E2=80=99 for the function f= oo()." > > when you use %P for a function. Which is not how it is used here. I did more checks about that. I think Ard's patch to make jump label relative actually fixed the issue I had with them. Thanks for spotting this, I will do additional checks and look at removing this change. > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply.