Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932581AbbG0Xgu (ORCPT ); Mon, 27 Jul 2015 19:36:50 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:34741 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755395AbbG0Xgr (ORCPT ); Mon, 27 Jul 2015 19:36:47 -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:36:26 -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: 857 Lines: 27 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 -- 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/