On Thu, Jan 21, 2016 at 03:37:16PM -0800, H. Peter Anvin wrote:
> Maybe a label attribute would help, I don't know.
Here's another version which works, not really better though:
Change is this:
---
+ asm_volatile_goto(ALTERNATIVE("", "jmp %l[t_fixup_ss]",
+
On Thu, Jan 21, 2016 at 03:37:16PM -0800, H. Peter Anvin wrote:
> Maybe a label attribute would help, I don't know.
Here's another version which works, not really better though:
Change is this:
---
+ asm_volatile_goto(ALTERNATIVE("", "jmp %l[t_fixup_ss]",
+
Maybe a label attribute would help, I don't know.
-hpa
On 01/21/16 14:56, Borislav Petkov wrote:
>
> so this is silly: we're basically jumping after the JMP instruction
> itself. So that will be the case on !X86_BUG_SYSRET_SS_ATTRS CPUs.
> Still a two-byte and now even a useless JMP.
>
> The right thing to do would be to generate a NOP simply.
>
On Thu, Jan 21, 2016 at 02:22:28PM -0800, H. Peter Anvin wrote:
> Yes, having t_no as the fallthrough case ought to move the yes code
> out of line.
Dunno, maybe I'm doing something wrong:
I have this change:
---
diff --git a/arch/x86/include/asm/cpufeature.h
On January 21, 2016 2:14:42 PM PST, Borislav Petkov wrote:
>On Wed, Jan 20, 2016 at 02:41:22AM -0800, H. Peter Anvin wrote:
>> Ah. What would be even more of a win would be to rebias
>> static_cpu_has_bug() so that the fallthrough case is the functional
>> one. Easily done by reversing the
On Wed, Jan 20, 2016 at 02:41:22AM -0800, H. Peter Anvin wrote:
> Ah. What would be even more of a win would be to rebias
> static_cpu_has_bug() so that the fallthrough case is the functional
> one. Easily done by reversing the labels.
By reversing you mean this:
---
diff --git
On Wed, Jan 20, 2016 at 02:41:22AM -0800, H. Peter Anvin wrote:
> Ah. What would be even more of a win would be to rebias
> static_cpu_has_bug() so that the fallthrough case is the functional
> one. Easily done by reversing the labels.
By reversing you mean this:
---
diff --git
Maybe a label attribute would help, I don't know.
-hpa
On January 21, 2016 2:14:42 PM PST, Borislav Petkov wrote:
>On Wed, Jan 20, 2016 at 02:41:22AM -0800, H. Peter Anvin wrote:
>> Ah. What would be even more of a win would be to rebias
>> static_cpu_has_bug() so that the fallthrough case is the functional
>> one. Easily done by
On 01/21/16 14:56, Borislav Petkov wrote:
>
> so this is silly: we're basically jumping after the JMP instruction
> itself. So that will be the case on !X86_BUG_SYSRET_SS_ATTRS CPUs.
> Still a two-byte and now even a useless JMP.
>
> The right thing to do would be to generate a NOP simply.
>
On Thu, Jan 21, 2016 at 02:22:28PM -0800, H. Peter Anvin wrote:
> Yes, having t_no as the fallthrough case ought to move the yes code
> out of line.
Dunno, maybe I'm doing something wrong:
I have this change:
---
diff --git a/arch/x86/include/asm/cpufeature.h
On 01/20/16 08:04, Borislav Petkov wrote:
> On Wed, Jan 20, 2016 at 07:09:39AM -0800, H. Peter Anvin wrote:
>> But then you're using testl and get long immediates.
>>
>> (And the parentheses around boot_cpu_data->x86_capability are redundant.)
>
> Right.
>
> Ok, below is what builds here. So no
On Wed, Jan 20, 2016 at 07:09:39AM -0800, H. Peter Anvin wrote:
> But then you're using testl and get long immediates.
>
> (And the parentheses around boot_cpu_data->x86_capability are redundant.)
Right.
Ok, below is what builds here. So no SOBs etc.
All this include hell wankery is so that we
On 01/20/16 07:01, Borislav Petkov wrote:
> On Tue, Jan 19, 2016 at 08:02:01PM -0800, H. Peter Anvin wrote:
>> ... "i" (1 << (bit & 7)),
>> "m" (((const char *)boot_cpu_data->x86_capability)[bit >> 3]) ...
>
> Nice!
>
> I was going to do:
>
> "i" (1 << (bit & 31)),
>
On Tue, Jan 19, 2016 at 08:02:01PM -0800, H. Peter Anvin wrote:
> ... "i" (1 << (bit & 7)),
> "m" (((const char *)boot_cpu_data->x86_capability)[bit >> 3]) ...
Nice!
I was going to do:
"i" (1 << (bit & 31)),
"m"
On Tue, Jan 19, 2016 at 08:02:01PM -0800, H. Peter Anvin wrote:
> ... "i" (1 << (bit & 7)),
> "m" (((const char *)boot_cpu_data->x86_capability)[bit >> 3]) ...
Nice!
I was going to do:
"i" (1 << (bit & 31)),
"m"
On 01/20/16 07:01, Borislav Petkov wrote:
> On Tue, Jan 19, 2016 at 08:02:01PM -0800, H. Peter Anvin wrote:
>> ... "i" (1 << (bit & 7)),
>> "m" (((const char *)boot_cpu_data->x86_capability)[bit >> 3]) ...
>
> Nice!
>
> I was going to do:
>
> "i" (1 << (bit & 31)),
>
On Wed, Jan 20, 2016 at 07:09:39AM -0800, H. Peter Anvin wrote:
> But then you're using testl and get long immediates.
>
> (And the parentheses around boot_cpu_data->x86_capability are redundant.)
Right.
Ok, below is what builds here. So no SOBs etc.
All this include hell wankery is so that we
On 01/20/16 08:04, Borislav Petkov wrote:
> On Wed, Jan 20, 2016 at 07:09:39AM -0800, H. Peter Anvin wrote:
>> But then you're using testl and get long immediates.
>>
>> (And the parentheses around boot_cpu_data->x86_capability are redundant.)
>
> Right.
>
> Ok, below is what builds here. So no
20 matches
Mail list logo