From nobody Tue Jun 16 18:22:18 2026 Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) (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 518263382FC for ; Wed, 29 Apr 2026 22:35:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777502127; cv=none; b=sDJKuFzTiizaWpT82n201ZCrxCQjP6SMFv6arA7rJe6nEAmbxCE5cFMDA0NeKPY3NFidbEoEkzR93ccBhuCLTANY4M/a5vlR1jErAa2eOMqErN9dfwVDBdOyJiStQf2ODT8U13/OxckGK0mmRoVnTE4L609ms4L+H0Xp9JZwGNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777502127; c=relaxed/simple; bh=AFuGKVleiETKPsJHICMupK/vxE+XoZwboxeo9ANF7Ws=; h=Message-ID:Date:MIME-Version:To:Cc:Subject:From:Content-Type; b=G7a4Sj71UeoCyZfNxnLqkWIhljV/zlRO/LFummttVhjghOoR+gmVOG7qLE5zcvGiBEYyWdw6VA41tcsqMR9tOkBBhLboVEOEJSxYARVPZwba3k9Ce42XevT2ltCReaYfCQ2+D4T8MKobv6w97i4bHxJ6vRPOYadk2RhrKEs7igQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tennr.com; spf=pass smtp.mailfrom=tennr.com; dkim=pass (2048-bit key) header.d=tennr.com header.i=@tennr.com header.b=JM1EZY04; arc=none smtp.client-ip=209.85.160.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=tennr.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tennr.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tennr.com header.i=@tennr.com header.b="JM1EZY04" Received: by mail-qt1-f179.google.com with SMTP id d75a77b69052e-506362ac5f7so1814611cf.1 for ; Wed, 29 Apr 2026 15:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tennr.com; s=google; t=1777502125; x=1778106925; darn=vger.kernel.org; h=content-transfer-encoding:from:content-language:subject:cc:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=M+cM5bDOtup8kbf7WWvIOEk3VUCv6B35KmgW6pLVjks=; b=JM1EZY04f/DMwIC5PZ6kNikIlsV19bLgtfB57f3Z5IAS1XN2NqqCJGeRtw/V2nHUHG XlqJiQtHkQUPoUzgSClccYrKbsI1zvTxVvcfJhabLS7VYfLSJXnIrCIW41r0cTcz5E5D k82RH3xnKrRf2FE7VG7+JpREIYOQQW+vohpH9LrWY8BvudFdJDOfgX94El98Lc5WJw4M m2KVAy0qxuJPM2g+nQQqO5Z/1A0v9/S3ljQnck82OA4GCRPADQiERgqDtNAcaavyh5uv 1S5pEYXaPC+UufoGINlHOD8YQI4V/N57XqDoAb6+EJYlSp/kDQBBQSBm2PmWybak/U1I cLpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777502125; x=1778106925; h=content-transfer-encoding:from:content-language:subject:cc:to :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=M+cM5bDOtup8kbf7WWvIOEk3VUCv6B35KmgW6pLVjks=; b=MW2QJXhXlvk+ivyERZyW+nsVJuCuWRmB+tky6wkc7gQdphjlpbjnEhbWIvdjrOh40k h+02TZrD68xcNjrsb/ocw4rU9DUSVMFmWUpGTfcVaVSxV/gfEYDVbbvKgGTA5AqC24Me Pf5AjHyhigltpZTfwy+NDQfnweWsECYCgUQvO+jkra63Q7p4rtx2YaGnOO+cJ4gd3IZb 5h9vuaQAmiRHge/8xZnNZhGoWWU2lXvLSZLNVeZAuvpVyo4YugAWw3m8S1oc53KTaHqQ t3XHhOi3hnWyU8uZqIkb+HtIGcSxG8wqRgYIA7tHEXvdBQP/RrMHDdcCEMyebWuqEw2R Y0sA== X-Forwarded-Encrypted: i=1; AFNElJ8J7vXWpIZWkwZ76abaSEraVPb9QwieNP4SFe60rMXju5IqzNzRZse3UXTAMOvuq2btwa68Td9fJLragfQ=@vger.kernel.org X-Gm-Message-State: AOJu0Ywy+avohQtenjZ+nMvx9yWjIwfcUurSEunmanOV8Ml3qHsYe9Af TYJHF9g3iCYkpdPyY7cPl7sD8Xi6P4xn6RREmviPJoqIgVKK0Aw0e/mClbgjUNu5pDQ= X-Gm-Gg: AeBDietHpNVa+MFMkBQvFfwvrV9w1z0ggYIJ0j4rhadf2rOyoJ0kKojIPkjwvfBO4jp 9pWTDcyHxUDCuxyV3+M0DJ9hEgYy1vuLCBjzl8VcKehooDzjDWulQoVaugxOVGaHbDqnRC7SLeD FpPYYD8huHzYiZKxcrM19d2CgC2gAob5W9PRVr1nY2qVJ2eGrlL4sNtX5FjDhHYMvM7A7ReCU5I Nsd5Fwocsfj36WPj/fVwxNJe9hzWv90LifZsOxXMQGqm1LsvTNfwp7O11/S0sx7d6j4g9t9rJqS peJaO85YDw760TGmfzZiHaEGGvlTCu9eCPCkyTSPci9RTgN4YPLNECLbQIxtQ8q4RbBzWEHKCVq kxZqFECDg0I7yzmnI8uukZ9crgWx9e9Xor97/obfHt9JZrhkFF4k4uquOHY9AhU3DsNbbu1YKez f0o/TCSDTfegpmmMoVTB+JF3HvCeObNcUpU1Fv1ILCfyAoK0bPo1X40OjE22uV5NIr5+/SFszer kzDDecdrwogIYhQjZdWPspi/KWlit+oAAyZ3zlaXUB7ttwW X-Received: by 2002:ac8:7f08:0:b0:50e:6313:6e13 with SMTP id d75a77b69052e-5102ab34ed8mr5941171cf.5.1777502125036; Wed, 29 Apr 2026 15:35:25 -0700 (PDT) Received: from ?IPV6:2603:7001:e0f0:ecf1:358c:7c1f:bb1b:654d? ([2603:7001:e0f0:ecf1:358c:7c1f:bb1b:654d]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-5101ae985e4sm27897071cf.27.2026.04.29.15.35.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2026 15:35:24 -0700 (PDT) Message-ID: <391d16fb-5f11-45fa-8f3b-1debe095695e@tennr.com> Date: Wed, 29 Apr 2026 18:35:23 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: palmer@dabbelt.com, pjw@kernel.org, aou@eecs.berkeley.edu, alex@ghiti.fr, corbet@lwn.net Cc: linux-riscv@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, avi.radinsky@tennr.com Subject: [PATCH] Documentation: riscv: cmodx: fix typos Content-Language: en-US From: Avi Radinsky Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix typos in the dynamic ftrace section: atmoic -> atomic (twice), pacthable -> patchable, derect -> directed. Signed-off-by: Avi Radinsky Acked-by: Randy Dunlap --- Documentation/arch/riscv/cmodx.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/arch/riscv/cmodx.rst b/Documentation/arch/riscv/= cmodx.rst index 40ba53bed..cbfa812a1 100644 --- a/Documentation/arch/riscv/cmodx.rst +++ b/Documentation/arch/riscv/cmodx.rst @@ -21,13 +21,13 @@ call at each patchable function entry, and patches it d= ynamically at runtime to enable or disable the redirection. In the case of RISC-V, 2 instructions, AUIPC + JALR, are required to compose a function call. However, it is impo= ssible to patch 2 instructions and expect that a concurrent read-side executes th= em -without a race condition. This series makes atmoic code patching possible = in +without a race condition. This series makes atomic code patching possible = in RISC-V ftrace. Kernel preemption makes things even worse as it allows the = old state to persist across the patching process with stop_machine(). =20 In order to get rid of stop_machine() and run dynamic ftrace with full ker= nel preemption, we partially initialize each patchable function entry at boot-= time, -setting the first instruction to AUIPC, and the second to NOP. Now, atmoic +setting the first instruction to AUIPC, and the second to NOP. Now, atomic patching is possible because the kernel only has to update one instruction. According to Ziccif, as long as an instruction is naturally aligned, the I= SA guarantee an atomic update. @@ -36,8 +36,8 @@ By fixing down the first instruction, AUIPC, the range of= the ftrace trampoline is limited to +-2K from the predetermined target, ftrace_caller, due to th= e lack of immediate encoding space in RISC-V. To address the issue, we introduce CALL_OPS, where an 8B naturally align metadata is added in front of each -pacthable function. The metadata is resolved at the first trampoline, then= the -execution can be derect to another custom trampoline. +patchable function. The metadata is resolved at the first trampoline, then= the +execution can be directed to another custom trampoline. =20 CMODX in the User Space ----------------------- --=20 2.43.0