Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4725742yba; Mon, 20 May 2019 02:39:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMVXJ5k+OEoHI/4LwiP2Idfaw9BgzM8PtBALlsfIUiqIxRA+soqEITrQwcs/q//By6b17x X-Received: by 2002:a62:2e46:: with SMTP id u67mr80524546pfu.206.1558345187453; Mon, 20 May 2019 02:39:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558345187; cv=none; d=google.com; s=arc-20160816; b=VGNgGTfF/mDnNrHHc/OsNPYx+wapDjSKx6duoKCQEC/9V2XPLDuQkrMVel0yqR9uFP i2izIWV7qDJTTDKFpci0verW7MVjWHrr5mBB0v8wpmnRUTPUjeo0GXicPJ6fjgT+cYRo ILb+C8BMW13hMj8/msSdhFqoiN/fEQYQY+uDOyx7GI8dImLSRxCGRwYwE6QPVtbM6T6W IECAjX/DaCphQMSxVIteAu612lZpx54erKRuxA0cuPxV9qgE37UQZJ/oLRFEntzd7vHw J1BNZGEoeUT0TC7idQfaJTY5WFDttph+UYoZ0BOwBf7jjWfUftxqz89Iz9cyWBW56Sil LWkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=+pwqUMpMtoOudrGGnfs/Kbz39ymCfRkGbcc/oSIttlw=; b=Z5g0/sL7tk1s03ga/uE0SRxD1w9rLTkx9jV/f+sAuGJXezPqzAGUcb1ORgKWfun/XL hFgGJNMuf9So7DZjZQhQ/o2bo0tZKJ5krktPG41qk0wt54RJLj9F6mJjNhurdn0Tz9nu 9HXP2kW8ofGkx9YnYsaxw2fcVaZCuElpR0N9zOww9F2qblmbjYxyhjRokWMqwjR3jNxR UtPnCEaFKsTJuMUL4zCEeDvbg87lMcsOORpGVYH5pnJH634I0s0YjOjCbXKijk03manT Jw4GG1CkbSUDacBgQjW/Xweip3acKUSaoTBUGxLP0SNnLTKPSXZaA5STYwX9bL2UF+KV MkSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67si7813246pfv.73.2019.05.20.02.39.30; Mon, 20 May 2019 02:39:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731207AbfETIIV (ORCPT + 99 others); Mon, 20 May 2019 04:08:21 -0400 Received: from ivanoab6.miniserver.com ([5.153.251.140]:58424 "EHLO www.kot-begemot.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727720AbfETIIU (ORCPT ); Mon, 20 May 2019 04:08:20 -0400 Received: from [192.168.17.6] (helo=jain.kot-begemot.co.uk) by www.kot-begemot.co.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hSdL2-0002PP-9N; Mon, 20 May 2019 08:08:04 +0000 Received: from jain.kot-begemot.co.uk ([192.168.3.3]) by jain.kot-begemot.co.uk with esmtp (Exim 4.89) (envelope-from ) id 1hSdKz-0007w1-OP; Mon, 20 May 2019 09:08:03 +0100 Subject: Re: [PATCH] x86: Hide the int3_emulate_call/jmp functions from UML To: Steven Rostedt , LKML Cc: Peter Zijlstra , Linus Torvalds , Jiri Kosina , Josh Poimboeuf , Andy Lutomirski , Jeff Dike , Richard Weinberger , linux-um@lists.infradead.org References: <20190511083954.23a60052@gandalf.local.home> From: Anton Ivanov Message-ID: <41bc0b7b-9f51-6a10-6182-811163aa0890@cambridgegreys.com> Date: Mon, 20 May 2019 09:08:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190511083954.23a60052@gandalf.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 X-Spam-Score: -1.0 X-Clacks-Overhead: GNU Terry Pratchett Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/05/2019 13:39, Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > User Mode Linux does not have access to the ip or sp fields of the > pt_regs, and accessing them causes UML to fail to build. Hide the > int3_emulate_jmp() and int3_emulate_call() instructions from UML, as it > doesn't need them anyway. > > Reported-by: kbuild test robot > Signed-off-by: Steven Rostedt (VMware) > --- > > [ I added this to my queue to test too ] > > arch/x86/include/asm/text-patching.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/text-patching.h > b/arch/x86/include/asm/text-patching.h index 05861cc08787..0bbb07eaed6b > 100644 --- a/arch/x86/include/asm/text-patching.h > +++ b/arch/x86/include/asm/text-patching.h > @@ -39,6 +39,7 @@ extern int poke_int3_handler(struct pt_regs *regs); > extern void *text_poke_bp(void *addr, const void *opcode, size_t len, > void *handler); extern int after_bootmem; > > +#ifndef CONFIG_UML_X86 > static inline void int3_emulate_jmp(struct pt_regs *regs, unsigned > long ip) { > regs->ip = ip; > @@ -65,6 +66,7 @@ static inline void int3_emulate_call(struct pt_regs > *regs, unsigned long func) int3_emulate_push(regs, regs->ip - > INT3_INSN_SIZE + CALL_INSN_SIZE); int3_emulate_jmp(regs, func); > } > -#endif > +#endif /* CONFIG_X86_64 */ > +#endif /* !CONFIG_UML_X86 */ > > #endif /* _ASM_X86_TEXT_PATCHING_H */ > The patch has been garbled by an auto-wrap. Can you resend it please. -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/