Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1077112pxb; Fri, 13 Nov 2020 03:43:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxzDOYbX7Hf7mZn3LVdo2PBBJ/jCU1kleN0ntgvv76PtMavQeRdmnr4YGDzoShqDJ9+KW3Z X-Received: by 2002:aa7:ce8d:: with SMTP id y13mr2169173edv.65.1605267782402; Fri, 13 Nov 2020 03:43:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605267782; cv=none; d=google.com; s=arc-20160816; b=iMuOuZsC8LOAcZR+o6CwKauJCKtVte8mDAQUDocvPM8Ovt8D2fm2pilTV/eVwcLCn8 zAnyuoRre5KJVyahrrcNVpwyqHz4v/hZV8ou/2sIs+SzuXIBLTXcKpnVU8ec0JDdGQ1n YN6aRZ8zqQat7u52RBqq86bV7KxMutaMN+XsNCo+/ViDc/h/dJEa+ThydlWiEVdOWsK7 Tc/UZ/3Y23nQdG37UeFC117EZviJzufqHcjuJsJO8sYCRGb1nDjkWjsGTwCc9yDaPvgJ yii274hSW1SABYwMjE4bXM+x/Shm2s3x4Q1sVp1hC+4G92tTIZXeb1BHGUS4vpwMv/OI 6S0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=AdulGaTWpgL+RTzt9MHZiSXk/+qTGLNP6nmuD/teyfU=; b=Q4ouA3e1qembFKDIjbX8ShsA3SdOeHqqTp09QM9m6mE/KIae7LjGhiAMtiX/sDP7pK 3dSlTqP9WjPXbDJcCIdAU8wxc5ZDFrboQC+fUb/V+Opq7+Z/PlzGLzgkbONYbRFmucr5 M4RmpGw6JjfX4B0AT0B7IHdN8TPuet9UzXRXrSWredpP6HxIR0Dah7yw3Y7feRexFNDB h0zz31YKrZDIEKElPokTrByuPnKMuGrH1rseJu1JhmYZWGqMA8tSbuFOIanxtBMTanio A3OJ7ZzCKQDIL80w7wl9HAW4JJoXpon6syQWJ4jZMKv9mejQctZaA//n0LMGejkgY5bn maqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si5459194eje.225.2020.11.13.03.42.33; Fri, 13 Nov 2020 03:43:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726556AbgKMLcL (ORCPT + 99 others); Fri, 13 Nov 2020 06:32:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:56730 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726478AbgKMLbc (ORCPT ); Fri, 13 Nov 2020 06:31:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id EC218ABF4; Fri, 13 Nov 2020 11:31:11 +0000 (UTC) Date: Fri, 13 Nov 2020 12:31:11 +0100 (CET) From: Miroslav Benes To: Steven Rostedt cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Peter Zijlstra , Thomas Gleixner , Masami Hiramatsu , Josh Poimboeuf , Jiri Kosina , live-patching@vger.kernel.org Subject: Re: [PATCH 3/3 v6] livepatch: Use the default ftrace_ops instead of REGS when ARGS is available In-Reply-To: <20201113020254.023201106@goodmis.org> Message-ID: References: <20201113020142.252688534@goodmis.org> <20201113020254.023201106@goodmis.org> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h > index e00fe88146e0..7c9474d52060 100644 > --- a/arch/x86/include/asm/ftrace.h > +++ b/arch/x86/include/asm/ftrace.h > @@ -54,6 +54,9 @@ arch_ftrace_get_regs(struct ftrace_regs *fregs) > return NULL; > return &fregs->regs; > } > + > +#define ftrace_instruction_pointer_set(fregs, ip) \ > + do { (fregs)->regs.ip = (_ip); } while (0) > #endif > > #ifdef CONFIG_DYNAMIC_FTRACE > diff --git a/arch/x86/include/asm/livepatch.h b/arch/x86/include/asm/livepatch.h > index 1fde1ab6559e..59a08d5c6f1d 100644 > --- a/arch/x86/include/asm/livepatch.h > +++ b/arch/x86/include/asm/livepatch.h > @@ -12,9 +12,9 @@ > #include > #include > > -static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip) > +static inline void klp_arch_set_pc(struct ftrace_regs *fregs, unsigned long ip) > { > - regs->ip = ip; > + ftrace_regs_set_ip(fregs, ip); You forgot to update the call site :) Miroslav