Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400141 > unrolled thread

Re: [PATCH] x86/arch_prctl/64: restore accidentally removed put_cpu in ARCH_SET_GS

Started byAndy Lutomirski <luto@kernel.org>
First post2016-05-12 17:20 +0200
Last post2016-05-13 14:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] x86/arch_prctl/64: restore accidentally removed put_cpu  in ARCH_SET_GS Andy Lutomirski <luto@kernel.org> - 2016-05-12 17:20 +0200
    Re: [PATCH] x86/arch_prctl/64: restore accidentally removed put_cpu  in ARCH_SET_GS Ingo Molnar <mingo@kernel.org> - 2016-05-13 14:00 +0200

#1400141 — Re: [PATCH] x86/arch_prctl/64: restore accidentally removed put_cpu in ARCH_SET_GS

FromAndy Lutomirski <luto@kernel.org>
Date2016-05-12 17:20 +0200
SubjectRe: [PATCH] x86/arch_prctl/64: restore accidentally removed put_cpu in ARCH_SET_GS
Message-ID<ry0z8-8l-11@gated-at.bofh.it>
On Tue, May 10, 2016 at 1:56 PM, Mateusz Guzik <mguzik@redhat.com> wrote:
> This fixes 731e33e39a5b95ad770 "Remove FSBASE/GSBASE < 4G optimization"
>
> Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
> ---
>  arch/x86/kernel/process_64.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
> index 4285f6a..6b16c36 100644
> --- a/arch/x86/kernel/process_64.c
> +++ b/arch/x86/kernel/process_64.c
> @@ -541,6 +541,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
>                         load_gs_index(0);
>                         ret = wrmsrl_safe(MSR_KERNEL_GS_BASE, addr);
>                 }
> +               put_cpu();
>                 break;
>         case ARCH_SET_FS:
>                 /* Not strictly needed for fs, but do it for symmetry
> --
> 1.8.3.1
>

Ingo, can you apply this before the merge window opens?

I just noticed that you weren't cc'd, so I'll repeat my ack:

Acked-by: Andy Lutomirski <luto@kernel.org>

And I'll ask, since IIRC you wrote it: would it make sense to augment
lockdep_sys_exit to see if preemption got left disabled?

Thanks,
Andy

[toc] | [next] | [standalone]


#1400731

FromIngo Molnar <mingo@kernel.org>
Date2016-05-13 14:00 +0200
Message-ID<ryjV8-2yY-21@gated-at.bofh.it>
In reply to#1400141
* Andy Lutomirski <luto@kernel.org> wrote:

> On Tue, May 10, 2016 at 1:56 PM, Mateusz Guzik <mguzik@redhat.com> wrote:
> > This fixes 731e33e39a5b95ad770 "Remove FSBASE/GSBASE < 4G optimization"
> >
> > Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
> > ---
> >  arch/x86/kernel/process_64.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
> > index 4285f6a..6b16c36 100644
> > --- a/arch/x86/kernel/process_64.c
> > +++ b/arch/x86/kernel/process_64.c
> > @@ -541,6 +541,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
> >                         load_gs_index(0);
> >                         ret = wrmsrl_safe(MSR_KERNEL_GS_BASE, addr);
> >                 }
> > +               put_cpu();
> >                 break;
> >         case ARCH_SET_FS:
> >                 /* Not strictly needed for fs, but do it for symmetry
> > --
> > 1.8.3.1
> >
> 
> Ingo, can you apply this before the merge window opens?

Yeah, done, applied it to tip:x86/asm.

> I just noticed that you weren't cc'd, so I'll repeat my ack:
> 
> Acked-by: Andy Lutomirski <luto@kernel.org>
> 
> And I'll ask, since IIRC you wrote it: would it make sense to augment
> lockdep_sys_exit to see if preemption got left disabled?

Yeah, absolutely. I'm quite sure early lockdep versions did such a check.

Thanks,

	Ingo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web