[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200924120851.GE56811@linux.intel.com>
Date: Thu, 24 Sep 2020 15:09:01 +0300
From: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To: Borislav Petkov <bp@...en8.de>
Cc: x86@...nel.org, linux-sgx@...r.kernel.org,
linux-kernel@...r.kernel.org,
Sean Christopherson <sean.j.christopherson@...el.com>,
Andy Lutomirski <luto@...capital.net>,
Jethro Beekman <jethro@...tanix.com>,
akpm@...ux-foundation.org, andriy.shevchenko@...ux.intel.com,
asapek@...gle.com, cedric.xing@...el.com, chenalexchen@...gle.com,
conradparker@...gle.com, cyhanish@...gle.com,
dave.hansen@...el.com, haitao.huang@...el.com,
josh@...htriplett.org, kai.huang@...el.com, kai.svahn@...el.com,
kmoy@...gle.com, ludloff@...gle.com, luto@...nel.org,
nhorman@...hat.com, npmccallum@...hat.com, puiterwijk@...hat.com,
rientjes@...gle.com, tglx@...utronix.de, yaozhangx@...gle.com
Subject: Re: [PATCH v38 18/24] x86/vdso: Add support for exception fixup in
vDSO functions
On Thu, Sep 24, 2020 at 12:07:12AM +0200, Borislav Petkov wrote:
> On Tue, Sep 15, 2020 at 02:28:36PM +0300, Jarkko Sakkinen wrote:
> > From: Sean Christopherson <sean.j.christopherson@...el.com>
> >
> > The basic concept and implementation is very similar to the kernel's
> > exception fixup mechanism. The key differences are that the kernel
> > handler is hardcoded and the fixup entry addresses are relative to
> > the overall table as opposed to individual entries.
>
> ...
>
> This gist of this commit message should be also in
> Documentation/x86/sgx.rst
>
> And I already said the same thing during v33 review:
>
> "That is a very good explanation and I would prefer if it would be in a
> sgx-specific README or so instead of it getting lost in git..."
>
> ...
This is not technically SGX specific patch. Is SGX documentation the
correct place for this?
> > diff --git a/arch/x86/entry/vdso/extable.h b/arch/x86/entry/vdso/extable.h
> > new file mode 100644
> > index 000000000000..aafdac396948
> > --- /dev/null
> > +++ b/arch/x86/entry/vdso/extable.h
> > @@ -0,0 +1,29 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +#ifndef __VDSO_EXTABLE_H
> > +#define __VDSO_EXTABLE_H
> > +
> > +/*
> > + * Inject exception fixup for vDSO code. Unlike normal exception fixup,
> > + * vDSO uses a dedicated handler the addresses are relative to the overall
> > + * exception table, not each individual entry.
> > + */
> > +#ifdef __ASSEMBLY__
> > +#define _ASM_VDSO_EXTABLE_HANDLE(from, to) \
> > + ASM_VDSO_EXTABLE_HANDLE from to
> > +
> > +.macro ASM_VDSO_EXTABLE_HANDLE from:req to:req
> > + .pushsection __ex_table, "a"
> > + .long (\from) - __ex_table
> > + .long (\to) - __ex_table
> > + .popsection
> > +.endm
> > +#else
> > +#define _ASM_VDSO_EXTABLE_HANDLE(from, to) \
> > + ".pushsection __ex_table, \"a\"\n" \
> > + ".long (" #from ") - __ex_table\n" \
> > + ".long (" #to ") - __ex_table\n" \
> > + ".popsection\n"
> > +#endif
> > +
> > +#endif /* __VDSO_EXTABLE_H */
> > +
>
> Also from last time:
>
> .git/rebase-apply/patch:122: new blank line at EOF.
> +
>From checkpatch I only get:
ERROR: Macros with complex values should be enclosed in parentheses
#193: FILE: arch/x86/entry/vdso/extable.h:11:
+#define _ASM_VDSO_EXTABLE_HANDLE(from, to) \
+ ASM_VDSO_EXTABLE_HANDLE from to
ERROR: need consistent spacing around '*' (ctx:WxV)
#244: FILE: arch/x86/entry/vdso/vdso2c.h:8:
+static void BITSFUNC(copy)(FILE *outfile, const unsigned char *data, size_t len)
^
ERROR: need consistent spacing around '*' (ctx:WxV)
#263: FILE: arch/x86/entry/vdso/vdso2c.h:27:
+ FILE *outfile, ELF(Shdr) *sec, const char *name)
I did fix it now. Thanks.
> --
> Regards/Gruss,
> Boris.
>
> https://people.kernel.org/tglx/notes-about-netiquette
/Jarkko
Powered by blists - more mailing lists