From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 99F60C04AAC for ; Mon, 20 May 2019 16:08:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 78C8121726 for ; Mon, 20 May 2019 16:08:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392547AbfETQIu (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSkqI-0002kW-F7 for linux-um@lists.infradead.org; Mon, 20 May 2019 16:08:51 +0000 Date: Mon, 20 May 2019 12:08:47 -0400 From: Steven Rostedt 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> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Anton Ivanov Cc: Peter Zijlstra , Jiri Kosina , Jeff Dike , linux-um@lists.infradead.org, LKML , Andy Lutomirski , Richard Weinberger , Josh Poimboeuf , Linus Torvalds 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 _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um