Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6332152pxb; Mon, 8 Nov 2021 06:58:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuCwLyEO/ztUesca3p463GTdUTfdABZnqZX/ZDDlg+uVc6N89lmOn2j56fjp2HLsOwV/go X-Received: by 2002:a05:6e02:170a:: with SMTP id u10mr397319ill.156.1636383531347; Mon, 08 Nov 2021 06:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636383531; cv=none; d=google.com; s=arc-20160816; b=GOzF8+ejfFjl6WvSP8FPhNpEc4gFNWvoxLub1u6xxImVU+XKB3q9dqYcuBg+2kf5xf 3VhDqmUacP1OxrJQ3EH9pDCkzPbDeWE263HDYC8AmgCZywyk4S+7DeWvMYYJQx7j0Vkw S1Qx2GD0x+wQaGwjG7GEyGql4feAM2x3etTgeflWbRKq9NNB3gmpQYwYgxPS/CQWiMCm vUDyZYdHoA1eiOOlKS2oeScPHsPuYyKGod5E1/GL2Iyy/jPoBtpmwLBlAYb2Hr/2o1NM 4nk2z3WQPD98zv76zteSGiZE+vqPh7HARg1i8LQO6ShTRtA7adEHP32uFYFY2HFNO6Jl v17w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5UZuKAmHIrwVcGr41lKYOAKA0vOHUe0ZexZ00mvExQU=; b=usWaqrIMTaIIMKQFR0TLKkMs/H6gCDzEWsCuY+wieQJgtkdsQ34BD7cZZrPfj225uk l5AiQs8FfgC10CVn+/PHnaGbGoNX7FyEodQ5ovIfflrCO9tpZKM7qEYkh5kVpgyiV2t/ W7M/Gn1xtfJM7qKAkW60LOZCo2eAb1YZwU5IfdyNSWGL5nO22Wcuybc0hQ6GoN28CEC4 gGC8LJJozqhVe/J1UQNMU9c4DQYW7+cQVDOre/u6LPFp1M2wId1RXme6QyaUuToRcvhM kCiZTYClzi60pioxNzCOm2ZDUJpzWvVnQgy8zrqrGKb/BFFJdUnXKJAryv+dWR9C5QYs QuDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=D3eL8POb; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n20si4162971jaj.117.2021.11.08.06.58.38; Mon, 08 Nov 2021 06:58:51 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=D3eL8POb; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbhKHKEZ (ORCPT + 99 others); Mon, 8 Nov 2021 05:04:25 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:60350 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238568AbhKHKES (ORCPT ); Mon, 8 Nov 2021 05:04:18 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 33A1E21AFC; Mon, 8 Nov 2021 10:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1636365693; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5UZuKAmHIrwVcGr41lKYOAKA0vOHUe0ZexZ00mvExQU=; b=D3eL8PObhxrU8IE4pU3nDbNQgS4xDX279ndrDe7NVbcOlV4CWeQKYLEcilP1qhzGBDs3uI HmnxAMflpuaiiXUcslsjCPMak5CL4TWeHpLVKyz19GO9CWWroehg4VuHCTyaaSS/gDVgxR wrpGSrPqJ5HNIFgpWfuGeQ6v/SzYcyk= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 11789A3B8B; Mon, 8 Nov 2021 10:01:33 +0000 (UTC) Date: Mon, 8 Nov 2021 11:01:32 +0100 From: Petr Mladek To: Christophe Leroy Cc: Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Joe Lawrence , Steven Rostedt , Ingo Molnar , "Naveen N . Rao" , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, live-patching@vger.kernel.org Subject: Re: [PATCH v1 5/5] powerpc/ftrace: Add support for livepatch to PPC32 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2021-10-28 14:24:05, Christophe Leroy wrote: > This is heavily copied from PPC64. Not much to say about it. > > Livepatch sample modules all work. > > Signed-off-by: Christophe Leroy > --- > diff --git a/arch/powerpc/include/asm/livepatch.h b/arch/powerpc/include/asm/livepatch.h > index 4fe018cc207b..daf24d837241 100644 > --- a/arch/powerpc/include/asm/livepatch.h > +++ b/arch/powerpc/include/asm/livepatch.h > @@ -23,8 +23,8 @@ static inline void klp_arch_set_pc(struct ftrace_regs *fregs, unsigned long ip) > static inline unsigned long klp_get_ftrace_location(unsigned long faddr) > { > /* > - * Live patch works only with -mprofile-kernel on PPC. In this case, > - * the ftrace location is always within the first 16 bytes. > + * Live patch works on PPC32 and only with -mprofile-kernel on PPC64. In > + * both cases, the ftrace location is always within the first 16 bytes. Nit: I had some problems to parse it. I wonder if the following is better: * Live patch works on PPC32 out of box and on PPC64 only with * -mprofile-kernel. In both cases, the ftrace location is always * within the first 16 bytes. > */ > return ftrace_location_range(faddr, faddr + 16); > } Best Regards, Petr