[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrXx=c4HVFkLxyVxDtPBDq8ERO4ds34+t4Cjphj4KijHYg@mail.gmail.com>
Date: Mon, 27 Jul 2015 16:49:46 -0700
From: Andy Lutomirski <luto@...capital.net>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Andy Lutomirski <luto@...nel.org>,
Uros Bizjak <uros_bizjak1@....net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
X86 ML <x86@...nel.org>, Uros Bizjak <ubizjak@...il.com>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: ASM flags in general
On Mon, Jul 27, 2015 at 4:46 PM, H. Peter Anvin <hpa@...or.com> wrote:
> Sure, but that is different than getting rid of the _ex forms.
>
If we did that and got rid of the _ex forms, though, then the code
that matters (the no-fault case) would just be a bunch of movs, right?
That's basically the same as the current _ex code.
--Andy
> On July 27, 2015 4:36:26 PM PDT, Andy Lutomirski <luto@...capital.net>
> wrote:
>>
>> On Mon, Jul 27, 2015 at 4:22 PM, H. Peter Anvin <hpa@...or.com> wrote:
>>>
>>> For that to work, gcc would have to know about the extable.
>>
>>
>> It could, I think:
>>
>> asm goto (
>> "1: mov ...\n\t"
>> _ASM_EXTABLE(1b, %l2) /* or whatever index it is */
>> : ... : ... : ... : efault);
>>
>> return 0;
>>
>> efault:
>> return -EFAULT;
>>
>> I think that wrmsr_safe could get this treatment with current GCC.
>> put_user plausibly could, too, if we were willing to mark it volatile
>> and accept that we're lying a little bit about the lack of an output
>> constraint. get_user would need GCC to understand output constraints
>> for real.
>>
>> --Andy
>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists