Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1358949 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2016-03-16 13:30 +0100 |
| Last post | 2016-03-29 14:30 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] x86/cpu: Do the feature test first in enable_sep_cpu() Borislav Petkov <bp@alien8.de> - 2016-03-16 13:30 +0100
Re: [PATCH] x86/cpu: Do the feature test first in enable_sep_cpu() Andy Lutomirski <luto@amacapital.net> - 2016-03-18 02:50 +0100
[tip:x86/asm] x86/cpu: Do the feature test first in enable_sep_cpu() tip-bot for Borislav Petkov <tipbot@zytor.com> - 2016-03-29 14:30 +0200
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2016-03-16 13:30 +0100 |
| Subject | [PATCH] x86/cpu: Do the feature test first in enable_sep_cpu() |
| Message-ID | <rdiKm-rP-15@gated-at.bofh.it> |
From: Borislav Petkov <bp@suse.de> ... before assigning local vars. Kill out label too and simplify. No functionality change. Signed-off-by: Borislav Petkov <bp@suse.de> --- arch/x86/kernel/cpu/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 249461f95851..63658d23d3dd 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1030,12 +1030,12 @@ void enable_sep_cpu(void) struct tss_struct *tss; int cpu; + if (!boot_cpu_has(X86_FEATURE_SEP)) + return; + cpu = get_cpu(); tss = &per_cpu(cpu_tss, cpu); - if (!boot_cpu_has(X86_FEATURE_SEP)) - goto out; - /* * We cache MSR_IA32_SYSENTER_CS's value in the TSS's ss1 field -- * see the big comment in struct x86_hw_tss's definition. @@ -1050,7 +1050,6 @@ void enable_sep_cpu(void) wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0); -out: put_cpu(); } #endif -- 2.7.3
[toc] | [next] | [standalone]
| From | Andy Lutomirski <luto@amacapital.net> |
|---|---|
| Date | 2016-03-18 02:50 +0100 |
| Message-ID | <rdRI6-7c5-1@gated-at.bofh.it> |
| In reply to | #1358949 |
On Wed, Mar 16, 2016 at 5:19 AM, Borislav Petkov <bp@alien8.de> wrote: > From: Borislav Petkov <bp@suse.de> > > ... before assigning local vars. Kill out label too and simplify. > > No functionality change. Acked-by: Andy Lutomirski <luto@kernel.org> > > Signed-off-by: Borislav Petkov <bp@suse.de> > --- > arch/x86/kernel/cpu/common.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > index 249461f95851..63658d23d3dd 100644 > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -1030,12 +1030,12 @@ void enable_sep_cpu(void) > struct tss_struct *tss; > int cpu; > > + if (!boot_cpu_has(X86_FEATURE_SEP)) > + return; > + > cpu = get_cpu(); > tss = &per_cpu(cpu_tss, cpu); > > - if (!boot_cpu_has(X86_FEATURE_SEP)) > - goto out; > - > /* > * We cache MSR_IA32_SYSENTER_CS's value in the TSS's ss1 field -- > * see the big comment in struct x86_hw_tss's definition. > @@ -1050,7 +1050,6 @@ void enable_sep_cpu(void) > > wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0); > > -out: > put_cpu(); > } > #endif > -- > 2.7.3 > -- Andy Lutomirski AMA Capital Management, LLC
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Borislav Petkov <tipbot@zytor.com> |
|---|---|
| Date | 2016-03-29 14:30 +0200 |
| Subject | [tip:x86/asm] x86/cpu: Do the feature test first in enable_sep_cpu() |
| Message-ID | <ri0Wv-69T-25@gated-at.bofh.it> |
| In reply to | #1358949 |
Commit-ID: b3edfda4382ffaef5e5c1cffb25a33b3b9ef4546 Gitweb: http://git.kernel.org/tip/b3edfda4382ffaef5e5c1cffb25a33b3b9ef4546 Author: Borislav Petkov <bp@suse.de> AuthorDate: Wed, 16 Mar 2016 13:19:29 +0100 Committer: Ingo Molnar <mingo@kernel.org> CommitDate: Tue, 29 Mar 2016 12:57:12 +0200 x86/cpu: Do the feature test first in enable_sep_cpu() ... before assigning local vars. Kill out label too and simplify. No functionality change. Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Andy Lutomirski <luto@kernel.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1458130769-24963-1-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/x86/kernel/cpu/common.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 8394b3d..7fea407 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1076,12 +1076,12 @@ void enable_sep_cpu(void) struct tss_struct *tss; int cpu; + if (!boot_cpu_has(X86_FEATURE_SEP)) + return; + cpu = get_cpu(); tss = &per_cpu(cpu_tss, cpu); - if (!boot_cpu_has(X86_FEATURE_SEP)) - goto out; - /* * We cache MSR_IA32_SYSENTER_CS's value in the TSS's ss1 field -- * see the big comment in struct x86_hw_tss's definition. @@ -1096,7 +1096,6 @@ void enable_sep_cpu(void) wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long)entry_SYSENTER_32, 0); -out: put_cpu(); } #endif
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web