Received: by 2002:a17:90a:2044:0:0:0:0 with SMTP id n62csp529778pjc; Mon, 20 May 2019 11:19:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfJSwF/vamk70Z65SFux1WvvWnh1mp+9Pgk2UWa4rJ9ELLfkzIqremEMtCn2PdN0TQSOFq X-Received: by 2002:a63:1d02:: with SMTP id d2mr77243658pgd.26.1558376346765; Mon, 20 May 2019 11:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558376346; cv=none; d=google.com; s=arc-20160816; b=d3GhwAKZUpHEJJBTKEOTp4+Ve01Ft/HjTGqEsHB0Et6tEnGYlrf3hZfswQb7t+km1a psLyeMI4PotMaxZ+0lMYOQGA2/8Rkqz4IQfdEYcGlE6JIHMFgnk+hw4BsLZODP8o0iyv gfbCM67+tgBHpnArnlaYTaSmK10AIIOoBc4vcalFO7P/Wz1AEsq/m0AmryBerN1iEhf3 /TtF87U7MdIwVuHXOBj5SpFgYy2btvShNkVVW8XWQ2VW6wz6JDvfqhFXc/dg6tVj0B0W QDLRI+/3gLYhSkL8EMdDOQeKj8QXC+11a+NOzYLyeLmecyLb2oITqNQfNXur2OW6mtEk wDMw== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=KmWbNDWuRq1GfZ2BQiGC89yc9XRvVyMIMdMZL1voh2Q=; b=ucXn5qks8xX7SSmwgzGgziJesnk2lXjdYLx7h4QUwIkMIBSYQ0AFaDEBe2p2RJX+Bh IBBthELpAPcVn/VS3AKG/sHOgaa+3zmon9aQ3D+uwh9FhEljvV6bi59YxKoT2G+gaZN8 +QY/GjuiSFcNenTArFyGqM+aK5uyMzPn3qX1JmytGpCY0dcVKS2z5NzEkh6CIQkJY+c7 ZA8L9JturskwztRc97s4Myq4y8l4LDiWr8VLUMO2gSrpJVAZhEKx29dhMKg/P+wn2tkw SyTSV5zKuRBHyM/5Q90wTtmafYUm4ksn/LRF/CKAuqNkEwYaeAzV64pn4yRSSuE2QKqV LKZw== 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 y5si13454112pgv.390.2019.05.20.11.18.52; Mon, 20 May 2019 11:19:06 -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 S2389184AbfETQIu (ORCPT + 99 others); Mon, 20 May 2019 12:08:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:39190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387513AbfETQIu (ORCPT ); Mon, 20 May 2019 12:08:50 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B1F0E216B7; Mon, 20 May 2019 16:08:48 +0000 (UTC) Date: Mon, 20 May 2019 12:08:47 -0400 From: Steven Rostedt To: Anton Ivanov Cc: LKML , Peter Zijlstra , Linus Torvalds , Jiri Kosina , Josh Poimboeuf , Andy Lutomirski , Jeff Dike , Richard Weinberger , linux-um@lists.infradead.org Subject: Re: [PATCH] x86: Hide the int3_emulate_call/jmp functions from UML Message-ID: <20190520120847.2ca3eac1@gandalf.local.home> In-Reply-To: <41bc0b7b-9f51-6a10-6182-811163aa0890@cambridgegreys.com> References: <20190511083954.23a60052@gandalf.local.home> <41bc0b7b-9f51-6a10-6182-811163aa0890@cambridgegreys.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 20 May 2019 09:08:01 +0100 Anton Ivanov wrote: > 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 ] Looks like when I added this text, claws-mail, decided to line wrap the patch :-p > > > > 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. > Anyway, it's already in Linus's tree. It was required to keep UML compiling with other changes that needed to get into the merge window. -- Steve