Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932699AbbG0XuK (ORCPT ); Mon, 27 Jul 2015 19:50:10 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:34397 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754921AbbG0XuH (ORCPT ); Mon, 27 Jul 2015 19:50:07 -0400 MIME-Version: 1.0 In-Reply-To: References: <1438019319-19731-1-git-send-email-uros_bizjak1@t-2.net> <55B680D8.5070702@zytor.com> <55B696B2.3000702@kernel.org> <55B69CED.8050709@zytor.com> From: Andy Lutomirski Date: Mon, 27 Jul 2015 16:49:46 -0700 Message-ID: Subject: Re: ASM flags in general To: "H. Peter Anvin" Cc: Andy Lutomirski , Uros Bizjak , "linux-kernel@vger.kernel.org" , X86 ML , Uros Bizjak , Ingo Molnar Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1478 Lines: 52 On Mon, Jul 27, 2015 at 4:46 PM, H. Peter Anvin 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 > wrote: >> >> On Mon, Jul 27, 2015 at 4:22 PM, H. Peter Anvin 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/