Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp713016ybf; Fri, 28 Feb 2020 06:18:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwK8wYawo5v6OxfLLmDTaZbOI6WAY6A7F0CGs9j2ui2B7LyUhfGKVzOZ3Lmqo807HAMx/nq X-Received: by 2002:a05:6808:aac:: with SMTP id r12mr3321765oij.59.1582899536765; Fri, 28 Feb 2020 06:18:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582899536; cv=none; d=google.com; s=arc-20160816; b=XGhQC4mfByYyasTbFxvJiGjdQWhx5hfUVfnp8PGp41sQsSMszDLbSwmN4UpXqF46Rg VBUQU5RoFmukRGAKN6c6ZK1/vSyyuq87C1beNFkUkEoU+fnWKVfiC6ILCR5E9zMXb623 vThMHUO53MBGuYdLGkBTVrGOzbvDd9n4MdPIlFTBgqTMhf9WTRokGEZlGzdCtaS2W0di v/GmhYMYcqaWtw4aIBkgejIwP7RwgdFbZVNtVYjOooT2ZWFIT6kR3cWrMo95+cRcgxZ5 kSm4NkzxxvnUe3JHzHcS7aCyoDSEuRmwjaHdwoO0CrNtGGEvSM1rVb8oWr/tmdjc+FF4 pJTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=QheRWC14WCNH87Y3GIla4GvhigmDkyO9fR6q2bLBYYg=; b=ZPunSKwq4u+ys1XeJCKdtLvZaDMGWttgDN4G5Xy4hxoQ44eKp6UBf9FaiPga3n9PFz voMV9vy+dvxggXwZY3YJ9dmQHaTSjIINN3oDnXdYLiSMmpyvJfhGq1hlIa58GVIgBfi0 S2+E0llZ6Of+Kb5tjWNLVTCOnpyseM3mouAD1MIRXbQxH8KZ2szTrNmZTgj30nUWA2gt yOny4ANev7pO4+wGVi5ZYY0OL2CThZN3h7qfNOibhWjow/3O9uLft+meRg73xJEuXtG+ J5OnlrBk86KGkWJU1Ky3jlX9MAD/lS2IEI0rb05AbAoUZVIwNxNLJGVQcHCz/njVGrF6 fs3Q== 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 q195si2041522oic.83.2020.02.28.06.18.43; Fri, 28 Feb 2020 06:18:56 -0800 (PST) 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 S1726900AbgB1OSS (ORCPT + 99 others); Fri, 28 Feb 2020 09:18:18 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:36836 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725796AbgB1OSS (ORCPT ); Fri, 28 Feb 2020 09:18:18 -0500 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j7gSo-0000Ne-V5; Fri, 28 Feb 2020 15:18:03 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 911D0104097; Fri, 28 Feb 2020 15:18:02 +0100 (CET) From: Thomas Gleixner To: Alexandre Chartre , LKML Cc: x86@kernel.org, Steven Rostedt , Brian Gerst , Juergen Gross , Paolo Bonzini , Arnd Bergmann Subject: Re: [patch 07/24] x86/traps: Prepare for using DEFINE_IDTENTRY In-Reply-To: References: <20200225221606.511535280@linutronix.de> <20200225222648.880108780@linutronix.de> Date: Fri, 28 Feb 2020 15:18:02 +0100 Message-ID: <8736auhk2t.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexandre Chartre writes: > On 2/25/20 11:16 PM, Thomas Gleixner wrote: >> Prepare for using IDTENTRY to define the C exception/trap entry points. It >> would be possible to glue this into the existing macro maze, but it's >> simpler and better to read at the end to just make them distinct. Provide >> a trivial inline helper to read the trap address. >> >> Signed-off-by: Thomas Gleixner >> --- >> arch/x86/kernel/traps.c | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> --- a/arch/x86/kernel/traps.c >> +++ b/arch/x86/kernel/traps.c >> @@ -274,6 +274,11 @@ static void do_error_trap(struct pt_regs >> } >> } >> >> +static inline void __user *error_get_trap_addr(struct pt_regs *regs) >> +{ >> + return (void __user *)uprobe_get_trap_addr(regs); >> +} >> + >> #define IP ((void __user *)uprobe_get_trap_addr(regs)) > > And you will eventually get rid of this IP macro, right? The whole macro maze will be gone at the end.