Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp3027274rdb; Tue, 13 Feb 2024 05:00:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGa0ngykZKrXi/DCYyVvMshtqUcqV8CaaFv5t9+nvX7/xISlzrCXWdE89mV9WUjfmJwvJ+8 X-Received: by 2002:a17:903:22c7:b0:1d9:c080:868c with SMTP id y7-20020a17090322c700b001d9c080868cmr12751555plg.11.1707829255026; Tue, 13 Feb 2024 05:00:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707829255; cv=pass; d=google.com; s=arc-20160816; b=b3M/DIXWiMYAxm1N9SSA+amP2xRj2k0P5JkOdxDc09gLcbElhEzrLlOnTixK46Ny2K 7y+eiVwjFnAAHuWR9hi8wGqkuCW5Lp7TYwIeba54UV9+mcSAEzGfjYk7FiCgbViAElPy gVzcq+ccpgfn+gq96NRV4G41Juj+OlGqRISL+hOG9nWXip6xGRPymhuRsrMT6bYP6uMg Nyu+SdunbDqjYMul87np1Bn/HUHwNOXJnTIMFzUmKBP3VhGBb0zp0e22flK3nzwEAyzI chhAaBg972ppv7WZFUM5k+wyp3R1eMZeaur0hEkM9AD+Tufb830IHvdNucmrJPxliKFq qhdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=g4agJ1A7KZIyEQouGbFZaSxgaZc9xYgjCUppDYmRrYw=; fh=XflQONanbIwsYXAHeS7u6vFsM8ygYX3SFiMHUluI45g=; b=iIskFkMK7R/QH0EQ18QW3BjF9Pk7p62Z+88ARRokCwtAnsw8nhXROB6SQ5E2jzlDxj PofQoWuBVcRjybHniXK+sMXwIUnzIpTvh29Y7NXJk6Fa++LecYkH0fiSP5rY9H/zVycr E+flAuSccoY1XiXsgtbu+BBLe8e+gcxqgyir97BOtkD2l81EcFihUYd1oRb6bx2Lgde1 3I1nn/imrvswsRUnfIoJE+LEMou//NfHioKsduCVsL8BkBVwfs6mp3cqa0iNjRtTDk3S dMPaGihDRpnsqRnbjKX/oZNi1Ds00GngYlsl1MApLVRCl60lcjfAY4DXkl3IBcg9oO5J FbTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lodjaTz+; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-63545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCXi8gCmQedgH7fKrmSFeBlIr11hpCQcCPzo/FCNgX5l3wYPN32zb6ljKYUi3rmv2ZOm98POxQIA25MUJek6tuF1a+Izg8KcZzCNuds5Eg== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id mc7-20020a1709032b0700b001da2b5252dasi1176033plb.319.2024.02.13.05.00.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 05:00:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lodjaTz+; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-63545-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63545-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D5091B24A52 for ; Tue, 13 Feb 2024 12:59:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 501044F5FC; Tue, 13 Feb 2024 12:58:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lodjaTz+" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1C33482CA; Tue, 13 Feb 2024 12:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707829125; cv=none; b=XIuT/Xpenle8X1ZehEYutsleS/mZOhHud5WlknYijO03LpxBZC5PKK+0ATktcJVcFYQFh0DdW3/2u2xVCufGT8oEl05jJ7Ui+4CaGgXEScxsxessjqvr1JHI0eUAo7cPErYXLOUTdvs2GTIg5Bw6aLBNYwy1XpwrAbO79BstiD0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707829125; c=relaxed/simple; bh=umx89uCbZMhhKzQRBvjpXYMdKTEly2WVpnghTGFsbPo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dgvnZmP1oUJw4P0zCn6CIFqMAZjKJwvYMQqmMyfKbMWmGCZVx7rqfM6itpDHoaFxuSt7NbonXUFkVLuD/excmlFHXDvLb0qXP7/EOZ/WwegO0gind3sOnxXt153MJ6SA9hoyx7yv7P6/2ONC2wD1VC1YeEJFuWqXacKvqnZBnV8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lodjaTz+; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a3d002bc6f7so66002266b.3; Tue, 13 Feb 2024 04:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707829122; x=1708433922; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=g4agJ1A7KZIyEQouGbFZaSxgaZc9xYgjCUppDYmRrYw=; b=lodjaTz+ughA3q7ZV2t6Vnc/KHKQ6y/4GX2Bd0cphMtrjhg3j+ZWN8FAi+iGRlJZGS dJJKx17mahhSj5NjSHNi1SoOIZmUrWEA2je+27SRgpNnOoBmcyw5ayDJ68V0f5ZEuLgx /naDUB/vPJ7LwRqbbJ1l2TTr3eHdkpGCfkh+TEkQAYNHEjT+vhHsGrO6jlLtaN4J1SAU 3xB5KRnQS/jApGmaH2uvh9Ry5po60R/qj8cyxLlPGiWWOxDqEE8uT2hsvfHhKM8EjV4C odiDovP/U2MeKHDKLBuNPCA6IapQTyk6L0x2u+h4rOlBNLJBGmSr2XJ91xuxhc7riMGr GcUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707829122; x=1708433922; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=g4agJ1A7KZIyEQouGbFZaSxgaZc9xYgjCUppDYmRrYw=; b=GNZfS/+oBA1qnPd3nYDW8yVI1ygzwJRdfkWMEEow34cM+gRh1pB2nqxh6B5g0eTUmp jwvEcLwTYttTdWVWbc8I54uwGp63MrTDXGhnyTYNFJaup/0dtD4ZMby62OPb28ObJZ0F Irsuy1S2WcePEYXTkYBdKvgvX5WmJwE5tnwqlHLRxAiHa5OQb3noQee/Uh+AJUiFKc4O /IsG7bOhnCGLdJN/k1ixAqL5IzcQxgnYFiRM3ALvEgSVWp5vyF36zW1w8qtDtxrpulNN b0SPZmcwIN6irbx534XUYhX6QPxp5aBssbclKlw8LPheZtiVZ71bTV/kTCeFtggARILv rmSw== X-Gm-Message-State: AOJu0Yy+dtUw/yvF8VHA9vqri1vED/PIZOx27BtP/tXDu/Re0Ov1Zi7W 1rcuTxiu7mBh595lTHeCYFyOYYI2VK6aDX+iyRzck3Z9ESDheeJoK6+4vlSsZQydjA== X-Received: by 2002:a17:906:5f86:b0:a36:f314:d8be with SMTP id a6-20020a1709065f8600b00a36f314d8bemr6544824eju.38.1707829122035; Tue, 13 Feb 2024 04:58:42 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW8GmVWpVtXsv9CUGlgzj9xI5iu34FvcBpV3uY1aOPlxcvXc+l3iWpei19GntcgFFyJIg2eg7P6LnYOufUi2XZcFkCkXD3BSw3RWQv60Qn5r/uEtnk1rJEhwmPWmK7IoRsQdPF18sCyHtt0m/09EbqN0KyTZYU++MkE7E0J4Hd08q0jlw2xmMF1bPJzSXtuUt+sayp5fR/ZXOzO+ioJELvmcu20PDMAgyIsjqsho9ZbYV1fzIWfgP+dAZoFn8cu1nMGcwv2Oi82XHAJa3ZpM/tyRpUXmdmUBAIpysqGsCzhWbmiqhPnWHf1KoSyXSQxzFcmvtNGR2/RF1ivkSR7reT44XXl9/iSjUBuq0rmxYY7+75GWVKdYCb/lhjEJeV1UjS+exhDKGBihw== Received: from andrea ([31.189.95.98]) by smtp.gmail.com with ESMTPSA id st10-20020a170907c08a00b00a3c5e6515d0sm1267324ejc.24.2024.02.13.04.58.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 04:58:41 -0800 (PST) Date: Tue, 13 Feb 2024 13:58:37 +0100 From: Andrea Parri To: Samuel Holland Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , Daniel Borkmann , Jason Baron , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , bpf@vger.kernel.org, Alexandre Ghiti , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= Subject: Re: [PATCH 0/7] riscv: Various text patching improvements Message-ID: References: <20240212025529.1971876-1-samuel.holland@sifive.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240212025529.1971876-1-samuel.holland@sifive.com> Hi Samuel, On Sun, Feb 11, 2024 at 06:55:11PM -0800, Samuel Holland wrote: > Here are a few changes to minimize calls to stop_machine() and > flush_icache_*() in the various text patching functions, as well as > to simplify the code. > > > Samuel Holland (7): > riscv: jump_label: Batch icache maintenance > riscv: jump_label: Simplify assembly syntax > riscv: kprobes: Use patch_text_nosync() for insn slots > riscv: Simplify text patching loops > riscv: Pass patch_text() the length in bytes > riscv: Use offset_in_page() in text patching functions > riscv: Remove extra variable in patch_text_nosync() This does look like a nice clean-up. Just curious (a "teach me"-like question), how did you test these changes? kselftests, micro-benchmarks, other? BTW, I recall a parallel work from Alex and Bjorn [1] that might have some minor conflict with these changes; + both of them to Cc: for further sync. Andrea [1] https://lore.kernel.org/lkml/20240206204607.527195-1-alexghiti@rivosinc.com/