Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-28 Thread hpa
On June 28, 2018 1:33:24 PM PDT, Andy Lutomirski wrote: >On Wed, Jun 27, 2018 at 11:22 AM, wrote: >> On June 27, 2018 11:19:12 AM PDT, Andy Lutomirski >wrote: >>>On Fri, Jun 22, 2018 at 11:47 AM, Andy Lutomirski > >>>wrote: > On Jun 22, 2018, at 11:29 AM, H. Peter Anvin >>> w

Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-28 Thread Andy Lutomirski
On Wed, Jun 27, 2018 at 11:22 AM, wrote: > On June 27, 2018 11:19:12 AM PDT, Andy Lutomirski wrote: >>On Fri, Jun 22, 2018 at 11:47 AM, Andy Lutomirski >>wrote: >>> >>> >>> On Jun 22, 2018, at 11:29 AM, H. Peter Anvin >> wrote: > On 06/22/18 07:24, Andy Lutomirski wrote: > >>>

Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-27 Thread hpa
On June 27, 2018 11:22:14 AM PDT, h...@zytor.com wrote: >On June 27, 2018 11:19:12 AM PDT, Andy Lutomirski >wrote: >>On Fri, Jun 22, 2018 at 11:47 AM, Andy Lutomirski > >>wrote: >>> >>> >>> On Jun 22, 2018, at 11:29 AM, H. Peter Anvin >> wrote: > On 06/22/18 07:24, Andy Lutomirski wr

Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-27 Thread hpa
On June 27, 2018 11:19:12 AM PDT, Andy Lutomirski wrote: >On Fri, Jun 22, 2018 at 11:47 AM, Andy Lutomirski >wrote: >> >> >> >>> On Jun 22, 2018, at 11:29 AM, H. Peter Anvin > wrote: >>> On 06/22/18 07:24, Andy Lutomirski wrote: That RPL3 part is false. The following program does:

Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-27 Thread Andy Lutomirski
On Fri, Jun 22, 2018 at 11:47 AM, Andy Lutomirski wrote: > > > >> On Jun 22, 2018, at 11:29 AM, H. Peter Anvin wrote: >> >>> On 06/22/18 07:24, Andy Lutomirski wrote: >>> >>> That RPL3 part is false. The following program does: >>> >>> #include >>> >>> int main() >>> { >>>unsigned short sel

Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-22 Thread Andy Lutomirski
> On Jun 22, 2018, at 11:29 AM, H. Peter Anvin wrote: > >> On 06/22/18 07:24, Andy Lutomirski wrote: >> >> That RPL3 part is false. The following program does: >> >> #include >> >> int main() >> { >>unsigned short sel; >>asm volatile ("mov %%ss, %0" : "=rm" (sel)); >>sel &= ~

Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-22 Thread H. Peter Anvin
On 06/22/18 07:24, Andy Lutomirski wrote: > > That RPL3 part is false. The following program does: > > #include > > int main() > { > unsigned short sel; > asm volatile ("mov %%ss, %0" : "=rm" (sel)); > sel &= ~3; > printf("Will write 0x%hx to GS\n", sel); > asm volatile ("m

Re: [PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-22 Thread Andy Lutomirski
On Thu, Jun 21, 2018 at 2:18 PM H. Peter Anvin, Intel wrote: > > From: "H. Peter Anvin" > > It is not only %ds and %es which contain cached user descriptor > information, %fs and %gs do as well. > > To make sure we don't do something stupid that will affect processes > which wouldn't want this re

[PATCH v3 1/7] x86/ldt: refresh %fs and %gs in refresh_ldt_segments()

2018-06-21 Thread H. Peter Anvin, Intel
From: "H. Peter Anvin" It is not only %ds and %es which contain cached user descriptor information, %fs and %gs do as well. To make sure we don't do something stupid that will affect processes which wouldn't want this requalification, be more restrictive about which selector numbers will be requ