From: Willy Tarreau <w@1wt.eu>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
gnomes@lxorguk.ukuu.org.uk, torvalds@linux-foundation.org
Subject: Re: [PATCH RFC 1/4] x86/thread_info: add TIF_NOPTI to disable PTI per task
Date: Mon, 8 Jan 2018 18:03:56 +0100 [thread overview]
Message-ID: <20180108170356.GD10913@1wt.eu> (raw)
In-Reply-To: <alpine.DEB.2.20.1801081756120.1735@nanos>
On Mon, Jan 08, 2018 at 05:57:11PM +0100, Thomas Gleixner wrote:
> On Mon, 8 Jan 2018, Willy Tarreau wrote:
>
> > This flag indicates that the task will not use isolated page tables.
> >
> > Signed-off-by: Willy Tarreau <w@1wt.eu>
> > ---
> > arch/x86/include/asm/thread_info.h | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
> > index 0022333..2f92cf1 100644
> > --- a/arch/x86/include/asm/thread_info.h
> > +++ b/arch/x86/include/asm/thread_info.h
> > @@ -126,6 +126,14 @@ struct thread_info {
> > #define _TIF_X32 (1 << TIF_X32)
> > #define _TIF_FSCHECK (1 << TIF_FSCHECK)
> >
> > +/* The following flags only exist on x86-64. We can't use the shift anymore
>
> Please do not use this horrible comment syle
You mean, the fact that there is no '/*' alone on the first line or
anything else ?
> And what's wrong with (1UL << 32)?
It fails when inherited in assembly parts. Initially the test was based
on "testq $(_TIF_NOPTI), reg" and 1UL doesn't parse there, which is why
I had to abandon it. In the latest patch I dropped "testq" for "bt" so
I didn't need the mask anymore and it wouldn't be a problem... until
someone wants to use it again.
> > + * due to C using signed ints by default and asm using unsigned longs.
> > + */
> > +#ifdef CONFIG_X86_64
> > +# define TIF_NOPTI 32 /* disable PTI for this task */
>
> No tail comments please.
OK but I did exactly like is done for all other flags above :-/
Thanks,
Willy
next prev parent reply other threads:[~2018-01-08 17:04 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-08 16:12 [PATCH RFC 0/4] Per-task PTI activation Willy Tarreau
2018-01-08 16:12 ` [PATCH RFC 1/4] x86/thread_info: add TIF_NOPTI to disable PTI per task Willy Tarreau
2018-01-08 16:57 ` Thomas Gleixner
2018-01-08 17:03 ` Willy Tarreau [this message]
2018-01-08 17:14 ` Ingo Molnar
2018-01-08 16:12 ` [PATCH RFC 2/4] x86/arch_prctl: add ARCH_GET_NOPTI and ARCH_SET_NOPTI to enable/disable PTI Willy Tarreau
2018-01-08 16:49 ` Peter Zijlstra
2018-01-08 16:56 ` Willy Tarreau
2018-01-08 17:02 ` Thomas Gleixner
2018-01-08 17:10 ` Willy Tarreau
2018-01-08 17:17 ` Ingo Molnar
2018-01-08 17:26 ` Thomas Gleixner
2018-01-08 17:46 ` Ingo Molnar
2018-01-08 17:05 ` Ingo Molnar
2018-01-08 17:19 ` Peter Zijlstra
2018-01-08 17:26 ` Ingo Molnar
2018-01-08 17:50 ` Borislav Petkov
2018-01-08 17:54 ` Linus Torvalds
2018-01-08 18:22 ` Willy Tarreau
2018-01-08 20:49 ` Thomas Gleixner
2018-01-08 21:03 ` Willy Tarreau
2018-01-08 20:35 ` Willy Tarreau
2018-01-08 16:12 ` [PATCH RFC 3/4] x86/pti: don't mark the user PGD with _PAGE_NX Willy Tarreau
2018-01-08 17:03 ` Dave Hansen
2018-01-08 17:17 ` Willy Tarreau
2018-01-08 17:23 ` Dave Hansen
2018-01-08 17:30 ` Peter Zijlstra
2018-01-08 17:49 ` Willy Tarreau
2018-01-08 17:21 ` Ingo Molnar
2018-01-08 23:05 ` Andy Lutomirski
2018-01-08 23:09 ` Kees Cook
2018-01-09 4:22 ` Willy Tarreau
2018-01-08 17:05 ` Thomas Gleixner
2018-01-08 17:28 ` Dave Hansen
2018-01-08 17:50 ` Ingo Molnar
2018-01-08 18:25 ` Alan Cox
2018-01-08 18:35 ` Ingo Molnar
2018-01-08 18:35 ` Linus Torvalds
2018-01-08 18:44 ` Dave Hansen
2018-01-08 16:12 ` [PATCH RFC 4/4] x86/entry/pti: don't switch PGD on tasks holding flag TIF_NOPTI Willy Tarreau
2018-01-08 17:11 ` Ingo Molnar
2018-01-08 17:20 ` Dave Hansen
2018-01-08 18:12 ` Willy Tarreau
2018-01-08 23:01 ` Andy Lutomirski
2018-01-08 16:59 ` [PATCH RFC 0/4] Per-task PTI activation Dave Hansen
2018-01-08 17:06 ` Willy Tarreau
2018-01-08 17:17 ` Dave Hansen
2018-01-08 17:13 ` Ingo Molnar
2018-01-09 15:31 ` Eric W. Biederman
2018-01-09 16:02 ` Willy Tarreau
2018-01-09 18:11 ` Zhi Wang
2018-01-09 21:07 ` Eric W. Biederman
2018-01-09 21:57 ` Willy Tarreau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180108170356.GD10913@1wt.eu \
--to=w@1wt.eu \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox