From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Garnier <thgarnie@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Kees Cook <keescook@chromium.org>,
Arjan van de Ven <arjan@linux.intel.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Borislav Petkov <bp@suse.de>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
Jiri Kosina <jikos@kernel.org>,
Matt Fleming <matt@codeblueprint.co.uk>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Fenghua Yu <fenghua.yu@intel.com>,
He Chen <he.chen@linux.intel.com>Br
Subject: Re: [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit
Date: Thu, 2 Feb 2017 08:12:25 +0100 [thread overview]
Message-ID: <20170202071225.GB2368@gmail.com> (raw)
In-Reply-To: <CALCETrU_WPm+HonkiRtaO0kTTqkfAcyhANp22yPGiSAPkNsRGQ@mail.gmail.com>
* Andy Lutomirski <luto@kernel.org> wrote:
> On Wed, Feb 1, 2017 at 1:15 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > * Thomas Garnier <thgarnie@google.com> wrote:
> >
> >> This patch makes the GDT remapped pages read-only to prevent corruption.
> >> This change is done only on 64 bit.
> >
>
>
> >>
> >> - table_base = gdt->address;
> >> + table_base = (unsigned long)get_current_direct_gdt();
> >
> > Instead of spreading these type casts far and wide please introduce another
> > accessor the returns 'unsigned long':
> >
> > get_cpu_gdt_rw_vaddr()
> >
>
> That whole function is an abomination. How about replacing 'unsigned
> long table_base' with 'struct desc_struct *table'? If you're feeling
> really adventurous, *delete* that function and replace all of its
> users with something sane.
Yeah, even better!
Thanks,
Ingo
next prev parent reply other threads:[~2017-02-02 7:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 16:59 [PATCH v2 1/3] x86/mm: Adapt MODULES_END based on Fixmap section size Thomas Garnier
2017-01-26 16:59 ` [PATCH v2 2/3] x86: Remap GDT tables in the Fixmap section Thomas Garnier
2017-01-26 18:52 ` Andy Lutomirski
2017-01-26 19:10 ` Thomas Garnier
2017-01-26 16:59 ` [PATCH v2 3/3] x86: Make the GDT remapping read-only on 64 bit Thomas Garnier
2017-02-01 9:15 ` Ingo Molnar
2017-02-02 5:13 ` Andy Lutomirski
2017-02-02 7:12 ` Ingo Molnar [this message]
2017-02-02 5:14 ` Andy Lutomirski
2017-02-06 22:10 ` Thomas Garnier
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=20170202071225.GB2368@gmail.com \
--to=mingo@kernel.org \
--cc=ard.biesheuvel@linaro.org \
--cc=arjan@linux.intel.com \
--cc=aryabinin@virtuozzo.com \
--cc=boris.ostrovsky@oracle.com \
--cc=borntraeger@de.ibm.com \
--cc=bp@suse.de \
--cc=dvyukov@google.com \
--cc=fenghua.yu@intel.com \
--cc=glider@google.com \
--cc=he.chen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jikos@kernel.org \
--cc=keescook@chromium.org \
--cc=len.brown@intel.com \
--cc=luto@kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@redhat.com \
--cc=paul.gortmaker@windriver.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=thgarnie@google.com \
/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;
as well as URLs for NNTP newsgroup(s).