All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Garnier <thgarnie@google.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Jim Mattson <jmattson@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>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@suse.de>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	"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>,
	Peter Zijlstra <peterz@infradead.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	"Luis R . Rodriguez" <mcgrof@kernel.org>
Subject: Re: [PATCH v3 4/4] KVM: VMX: Simplify segment_base
Date: Mon, 20 Feb 2017 09:39:21 -0800	[thread overview]
Message-ID: <CAJcbSZEPHBK5FfbU5uorQVkpVbENG0ZBdiA=acJ10rqtLn+TwQ@mail.gmail.com> (raw)
In-Reply-To: <CAJcbSZHh+q-hSk9XHZuEfE9VWUTdNZHFEbf68=Qk4uPhB2jhoQ@mail.gmail.com>

On Mon, Feb 20, 2017 at 9:28 AM, Thomas Garnier <thgarnie@google.com> wrote:
> On Mon, Feb 20, 2017 at 8:56 AM, Andy Lutomirski <luto@amacapital.net> wrote:
>> On Fri, Feb 17, 2017 at 2:01 PM, Thomas Garnier <thgarnie@google.com> wrote:
>>> On Fri, Feb 17, 2017 at 1:00 PM, Jim Mattson <jmattson@google.com> wrote:
>>>> On Fri, Feb 17, 2017 at 12:11 PM, Thomas Garnier <thgarnie@google.com> wrote:
>>>>> On Fri, Feb 17, 2017 at 9:49 AM, Jim Mattson <jmattson@google.com> wrote:
>>>>>>
>>>>>> Can we use the read-only GDT here? When expanding the virtual address
>>>>>> for 64-bit system descriptors, isn't it sufficient to check (d->s == 0
>>>>>> && d->type != 0)?
>>>>>
>>>>> We can use the readonly GDT but I think doesn't matter one or the
>>>>> other here. We have to check specific types for LDT or TSS, other
>>>>> values describe other entries (cf Intel volume 3, 3.5) (for example 14
>>>>> & 15 on 64-bits are for trap & interrupt gates).
>>>>
>>>> According to volume 3 of the SDM, section 3.5.2:
>>>>
>>>> The following system descriptors expand to 16 bytes:
>>>> — Call gate descriptors (see Section 5.8.3.1, “IA-32e Mode Call Gates”)
>>>> — IDT gate descriptors (see Section 6.14.1, “64-Bit Mode IDT”)
>>>> — LDT and TSS descriptors (see Section 7.2.3, “TSS Descriptor in 64-bit mode”).
>>>>
>>>> All legal system descriptor types (except for 0: Upper 8 bytes of an 16-byte
>>>> descriptor) should get the high 32 bits of the base address from the next 8-byte
>>>> descriptor.
>>>>
>>>
>>> Ok, then I will test an updated version next week.
>>>
>>
>> I'm going to send out some preliminary patches that just get rid of
>> this problem entirely.
>
> Okay, I guess I will have to wait for it to be integrated to
> linux-next then. Or would you rather to it after this patch set is
> added?
>

Read your summary for the patchset of KVM cleanup, I will wait for it
to reach linux-next to rebase and send the new iteration.

Thanks for working on the clean-up.

> --
> Thomas



-- 
Thomas

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Garnier <thgarnie@google.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Jim Mattson <jmattson@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>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@suse.de>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	"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>,
	Peter Zijlstra <peterz@infradead.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	"Luis R . Rodriguez" <mcgrof@kernel.org>,
Subject: Re: [PATCH v3 4/4] KVM: VMX: Simplify segment_base
Date: Mon, 20 Feb 2017 09:39:21 -0800	[thread overview]
Message-ID: <CAJcbSZEPHBK5FfbU5uorQVkpVbENG0ZBdiA=acJ10rqtLn+TwQ@mail.gmail.com> (raw)
In-Reply-To: <CAJcbSZHh+q-hSk9XHZuEfE9VWUTdNZHFEbf68=Qk4uPhB2jhoQ@mail.gmail.com>

On Mon, Feb 20, 2017 at 9:28 AM, Thomas Garnier <thgarnie@google.com> wrote:
> On Mon, Feb 20, 2017 at 8:56 AM, Andy Lutomirski <luto@amacapital.net> wrote:
>> On Fri, Feb 17, 2017 at 2:01 PM, Thomas Garnier <thgarnie@google.com> wrote:
>>> On Fri, Feb 17, 2017 at 1:00 PM, Jim Mattson <jmattson@google.com> wrote:
>>>> On Fri, Feb 17, 2017 at 12:11 PM, Thomas Garnier <thgarnie@google.com> wrote:
>>>>> On Fri, Feb 17, 2017 at 9:49 AM, Jim Mattson <jmattson@google.com> wrote:
>>>>>>
>>>>>> Can we use the read-only GDT here? When expanding the virtual address
>>>>>> for 64-bit system descriptors, isn't it sufficient to check (d->s == 0
>>>>>> && d->type != 0)?
>>>>>
>>>>> We can use the readonly GDT but I think doesn't matter one or the
>>>>> other here. We have to check specific types for LDT or TSS, other
>>>>> values describe other entries (cf Intel volume 3, 3.5) (for example 14
>>>>> & 15 on 64-bits are for trap & interrupt gates).
>>>>
>>>> According to volume 3 of the SDM, section 3.5.2:
>>>>
>>>> The following system descriptors expand to 16 bytes:
>>>> — Call gate descriptors (see Section 5.8.3.1, “IA-32e Mode Call Gates”)
>>>> — IDT gate descriptors (see Section 6.14.1, “64-Bit Mode IDT”)
>>>> — LDT and TSS descriptors (see Section 7.2.3, “TSS Descriptor in 64-bit mode”).
>>>>
>>>> All legal system descriptor types (except for 0: Upper 8 bytes of an 16-byte
>>>> descriptor) should get the high 32 bits of the base address from the next 8-byte
>>>> descriptor.
>>>>
>>>
>>> Ok, then I will test an updated version next week.
>>>
>>
>> I'm going to send out some preliminary patches that just get rid of
>> this problem entirely.
>
> Okay, I guess I will have to wait for it to be integrated to
> linux-next then. Or would you rather to it after this patch set is
> added?
>

Read your summary for the patchset of KVM cleanup, I will wait for it
to reach linux-next to rebase and send the new iteration.

Thanks for working on the clean-up.

> --
> Thomas



-- 
Thomas

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Garnier <thgarnie@google.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: "Jim Mattson" <jmattson@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>,
	"Andy Lutomirski" <luto@kernel.org>,
	"Borislav Petkov" <bp@suse.de>,
	"Paul Gortmaker" <paul.gortmaker@windriver.com>,
	"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>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Luis R . Rodriguez" <mcgrof@kernel.org>,
	"He Chen" <he.chen@linux.intel.com>,
	"Brian Gerst" <brgerst@gmail.com>,
	"Stanislaw Gruszka" <sgruszka@redhat.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Adam Buchbinder" <adam.buchbinder@gmail.com>,
	"Dave Hansen" <dave.hansen@intel.com>,
	"Vitaly Kuznetsov" <vkuznets@redhat.com>,
	"Josh Poimboeuf" <jpoimboe@redhat.com>,
	"Tim Chen" <tim.c.chen@linux.intel.com>,
	"Rik van Riel" <riel@redhat.com>,
	"Andi Kleen" <ak@linux.intel.com>, "Jiri Olsa" <jolsa@redhat.com>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Joerg Roedel" <joro@8bytes.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	kasan-dev <kasan-dev@googlegroups.com>,
	"Linux PM list" <linux-pm@vger.kernel.org>,
	"linux-efi@vger.kernel.org" <linux-efi@vger.kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	lguest@lists.ozlabs.org, "kvm list" <kvm@vger.kernel.org>,
	"Kernel Hardening" <kernel-hardening@lists.openwall.com>
Subject: [kernel-hardening] Re: [PATCH v3 4/4] KVM: VMX: Simplify segment_base
Date: Mon, 20 Feb 2017 09:39:21 -0800	[thread overview]
Message-ID: <CAJcbSZEPHBK5FfbU5uorQVkpVbENG0ZBdiA=acJ10rqtLn+TwQ@mail.gmail.com> (raw)
In-Reply-To: <CAJcbSZHh+q-hSk9XHZuEfE9VWUTdNZHFEbf68=Qk4uPhB2jhoQ@mail.gmail.com>

On Mon, Feb 20, 2017 at 9:28 AM, Thomas Garnier <thgarnie@google.com> wrote:
> On Mon, Feb 20, 2017 at 8:56 AM, Andy Lutomirski <luto@amacapital.net> wrote:
>> On Fri, Feb 17, 2017 at 2:01 PM, Thomas Garnier <thgarnie@google.com> wrote:
>>> On Fri, Feb 17, 2017 at 1:00 PM, Jim Mattson <jmattson@google.com> wrote:
>>>> On Fri, Feb 17, 2017 at 12:11 PM, Thomas Garnier <thgarnie@google.com> wrote:
>>>>> On Fri, Feb 17, 2017 at 9:49 AM, Jim Mattson <jmattson@google.com> wrote:
>>>>>>
>>>>>> Can we use the read-only GDT here? When expanding the virtual address
>>>>>> for 64-bit system descriptors, isn't it sufficient to check (d->s == 0
>>>>>> && d->type != 0)?
>>>>>
>>>>> We can use the readonly GDT but I think doesn't matter one or the
>>>>> other here. We have to check specific types for LDT or TSS, other
>>>>> values describe other entries (cf Intel volume 3, 3.5) (for example 14
>>>>> & 15 on 64-bits are for trap & interrupt gates).
>>>>
>>>> According to volume 3 of the SDM, section 3.5.2:
>>>>
>>>> The following system descriptors expand to 16 bytes:
>>>> — Call gate descriptors (see Section 5.8.3.1, “IA-32e Mode Call Gates”)
>>>> — IDT gate descriptors (see Section 6.14.1, “64-Bit Mode IDT”)
>>>> — LDT and TSS descriptors (see Section 7.2.3, “TSS Descriptor in 64-bit mode”).
>>>>
>>>> All legal system descriptor types (except for 0: Upper 8 bytes of an 16-byte
>>>> descriptor) should get the high 32 bits of the base address from the next 8-byte
>>>> descriptor.
>>>>
>>>
>>> Ok, then I will test an updated version next week.
>>>
>>
>> I'm going to send out some preliminary patches that just get rid of
>> this problem entirely.
>
> Okay, I guess I will have to wait for it to be integrated to
> linux-next then. Or would you rather to it after this patch set is
> added?
>

Read your summary for the patchset of KVM cleanup, I will wait for it
to reach linux-next to rebase and send the new iteration.

Thanks for working on the clean-up.

> --
> Thomas



-- 
Thomas

  parent reply	other threads:[~2017-02-20 17:39 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 19:42 [PATCH v3 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size Thomas Garnier
2017-02-14 19:42 ` [kernel-hardening] " Thomas Garnier
2017-02-14 19:42 ` Thomas Garnier
2017-02-14 19:42 ` Thomas Garnier
2017-02-14 19:42 ` [PATCH v3 2/4] x86: Remap GDT tables in the Fixmap section Thomas Garnier
2017-02-14 19:42   ` [kernel-hardening] " Thomas Garnier
2017-02-14 19:42   ` Thomas Garnier
2017-02-14 19:42   ` Thomas Garnier
2017-02-15 15:37   ` Boris Ostrovsky
2017-02-15 15:37   ` Boris Ostrovsky
2017-02-15 15:37     ` [kernel-hardening] " Boris Ostrovsky
2017-02-15 15:37     ` Boris Ostrovsky
2017-02-15 15:37     ` Boris Ostrovsky
2017-02-15 15:41     ` Thomas Garnier
2017-02-15 15:41       ` [kernel-hardening] " Thomas Garnier
2017-02-15 15:41       ` Thomas Garnier
2017-02-15 15:41     ` Thomas Garnier
2017-02-14 19:42 ` Thomas Garnier
2017-02-14 19:42 ` [PATCH v3 3/4] x86: Make the GDT remapping read-only on 64-bit Thomas Garnier
2017-02-14 19:42 ` Thomas Garnier
2017-02-14 19:42   ` [kernel-hardening] " Thomas Garnier
2017-02-14 19:42   ` Thomas Garnier
2017-02-14 19:42   ` Thomas Garnier
2017-02-14 19:42 ` [PATCH v3 4/4] KVM: VMX: Simplify segment_base Thomas Garnier
2017-02-14 19:42 ` Thomas Garnier
2017-02-14 19:42   ` [kernel-hardening] " Thomas Garnier
2017-02-14 19:42   ` Thomas Garnier
2017-02-14 19:42   ` Thomas Garnier
2017-02-15  3:57   ` Andy Lutomirski
2017-02-15  3:57     ` [kernel-hardening] " Andy Lutomirski
2017-02-15  3:57     ` Andy Lutomirski
2017-02-15 15:44     ` Thomas Garnier
2017-02-15 15:44     ` Thomas Garnier
2017-02-15 15:44       ` [kernel-hardening] " Thomas Garnier
2017-02-15 15:44       ` Thomas Garnier
2017-02-15  3:57   ` Andy Lutomirski
2017-02-17 17:49   ` Jim Mattson
2017-02-17 17:49     ` [kernel-hardening] " Jim Mattson
2017-02-17 17:49     ` Jim Mattson
2017-02-17 20:11     ` Thomas Garnier
2017-02-17 20:11     ` Thomas Garnier
2017-02-17 20:11       ` [kernel-hardening] " Thomas Garnier
2017-02-17 20:11       ` Thomas Garnier
2017-02-17 21:00       ` Jim Mattson
2017-02-17 21:00         ` [kernel-hardening] " Jim Mattson
2017-02-17 21:00         ` Jim Mattson
2017-02-17 22:01         ` Thomas Garnier
2017-02-17 22:01         ` Thomas Garnier
2017-02-17 22:01           ` [kernel-hardening] " Thomas Garnier
2017-02-17 22:01           ` Thomas Garnier
2017-02-20 16:56           ` Andy Lutomirski
2017-02-20 16:56             ` [kernel-hardening] " Andy Lutomirski
2017-02-20 16:56             ` Andy Lutomirski
2017-02-20 17:28             ` Thomas Garnier
2017-02-20 17:28             ` Thomas Garnier
2017-02-20 17:28               ` [kernel-hardening] " Thomas Garnier
2017-02-20 17:28               ` Thomas Garnier
2017-02-20 17:39               ` Thomas Garnier
2017-02-20 17:39               ` Thomas Garnier [this message]
2017-02-20 17:39                 ` [kernel-hardening] " Thomas Garnier
2017-02-20 17:39                 ` Thomas Garnier
2017-02-21  8:03                 ` Ingo Molnar
2017-02-21  8:03                 ` Ingo Molnar
2017-02-21  8:03                   ` [kernel-hardening] " Ingo Molnar
2017-02-21 10:28                   ` Paolo Bonzini
2017-02-21 10:28                   ` Paolo Bonzini
2017-02-21 10:28                     ` [kernel-hardening] " Paolo Bonzini
2017-02-21 10:28                     ` Paolo Bonzini
2017-02-22  6:34                     ` Ingo Molnar
2017-02-22  6:34                       ` [kernel-hardening] " Ingo Molnar
2017-02-22  6:34                       ` Ingo Molnar
2017-02-22  6:34                     ` Ingo Molnar
2017-02-20 16:56           ` Andy Lutomirski
2017-02-17 21:00       ` Jim Mattson
2017-02-17 17:49   ` Jim Mattson
2017-02-15 13:58 ` [PATCH v3 1/4] x86/mm: Adapt MODULES_END based on Fixmap section size Borislav Petkov
2017-02-15 13:58 ` Borislav Petkov
2017-02-15 13:58   ` [kernel-hardening] " Borislav Petkov
2017-02-15 13:58   ` Borislav Petkov
2017-02-15 13:58   ` Borislav Petkov
2017-02-15 15:40   ` Thomas Garnier
2017-02-15 15:40     ` [kernel-hardening] " Thomas Garnier
2017-02-15 15:40     ` Thomas Garnier
2017-02-15 15:49     ` Borislav Petkov
2017-02-15 15:49       ` [kernel-hardening] " Borislav Petkov
2017-02-15 15:49       ` Borislav Petkov
2017-02-15 21:08       ` Borislav Petkov
2017-02-15 21:08       ` Borislav Petkov
2017-02-15 21:08         ` [kernel-hardening] " Borislav Petkov
2017-02-15 21:08         ` Borislav Petkov
2017-02-15 15:49     ` Borislav Petkov
2017-02-15 15:40   ` 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='CAJcbSZEPHBK5FfbU5uorQVkpVbENG0ZBdiA=acJ10rqtLn+TwQ@mail.gmail.com' \
    --to=thgarnie@google.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=borntraeger@de.ibm.com \
    --cc=bp@suse.de \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=jikos@kernel.org \
    --cc=jmattson@google.com \
    --cc=keescook@chromium.org \
    --cc=len.brown@intel.com \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=matt@codeblueprint.co.uk \
    --cc=mcgrof@kernel.org \
    --cc=mingo@redhat.com \
    --cc=paul.gortmaker@windriver.com \
    --cc=pavel@ucw.cz \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.