<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/riscv/kernel/probes, branch linux-6.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-10-10T01:36:45Z</updated>
<entry>
<title>riscv: kprobes: Fix probe address validation</title>
<updated>2025-10-10T01:36:45Z</updated>
<author>
<name>Fabian Vogt</name>
</author>
<published>2025-09-10T15:25:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e68bd803fac49274fde914466fd3b07c4d602c8'/>
<id>urn:sha1:9e68bd803fac49274fde914466fd3b07c4d602c8</id>
<content type='text'>
When adding a kprobe such as "p:probe/tcp_sendmsg _text+15392192",
arch_check_kprobe would start iterating all instructions starting from
_text until the probed address. Not only is this very inefficient, but
literal values in there (e.g. left by function patching) are
misinterpreted in a way that causes a desync.

Fix this by doing it like x86: start the iteration at the closest
preceding symbol instead of the given starting point.

Fixes: 87f48c7ccc73 ("riscv: kprobe: Fixup kernel panic when probing an illegal position")
Signed-off-by: Fabian Vogt &lt;fvogt@suse.de&gt;
Signed-off-by: Marvin Friedrich &lt;marvin.friedrich@suse.com&gt;
Acked-by: Guo Ren &lt;guoren@kernel.org&gt;
Link: https://lore.kernel.org/r/6191817.lOV4Wx5bFT@fvogt-thinkpad
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RV_EXTRACT_ITYPE_IMM</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d4a3cc7f280b2751a6967b25c6d8c1e2740cafd'/>
<id>urn:sha1:4d4a3cc7f280b2751a6967b25c6d8c1e2740cafd</id>
<content type='text'>
Use RV_EXTRACT_ITYPE_IMM, instead of re-implementing it in simulate_jalr().

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/8ae34e966c312ae5cf6c09a35ddc290cce942208.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RV_EXTRACT_UTYPE_IMM</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:18:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7843b48dbf47d7fed4feaeb960244a757bb5d355'/>
<id>urn:sha1:7843b48dbf47d7fed4feaeb960244a757bb5d355</id>
<content type='text'>
Use RV_EXTRACT_UTYPE_IMM, instead of reimplementing it in simulate_auipc().

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/8f0defce9f1f23f1b44bb9750ed083cfc124213c.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RV_EXTRACT_RD_REG</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e33349630220e19264bd133dea8eee5d4e8684c6'/>
<id>urn:sha1:e33349630220e19264bd133dea8eee5d4e8684c6</id>
<content type='text'>
Use RV_EXTRACT_RD_REG, instead of reimplementing its code.

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/b31e5b41df5839a76103348e54dc034c8a43447a.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RVC_EXTRACT_BTYPE_IMM</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:18:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05df05bb04188c1c898f940cb2ef5440f94d5b56'/>
<id>urn:sha1:05df05bb04188c1c898f940cb2ef5440f94d5b56</id>
<content type='text'>
Use RVC_EXTRACT_BTYPE_IMM, instead of reimplementing it in
simulate_c_bnez_beqz().

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/8a8ed970f279fa5f24c90d840c2130e37bc6d16e.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RVC_EXTRACT_C2_RS1_REG</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:17:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=580c11cd0b364c098df86789e230ee54ca3ece46'/>
<id>urn:sha1:580c11cd0b364c098df86789e230ee54ca3ece46</id>
<content type='text'>
Use RVC_EXTRACT_C2_RS1_REG, instead of reimplementing it in
simulate_c_jr_jalr().

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/d56955cd683411c6d2f63d13c78e0572462a3269.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RVC_EXTRACT_JTYPE_IMM</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:17:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=05ede658d435f3969b13220c629cdc626356353f'/>
<id>urn:sha1:05ede658d435f3969b13220c629cdc626356353f</id>
<content type='text'>
Use RVC_EXTRACT_JTYPE_IMM, instead of reimplementing it in simulate_c_j().

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/24497deaab06d6b12cb84923606ec26f67e25424.1747215274.git.namcao@linutronix.de/
[pjw@kernel.org: fixed subject line typo]
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RV_EXTRACT_BTYPE_IMM</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76494817df791a2a6453dd353a4eec3faf57c578'/>
<id>urn:sha1:76494817df791a2a6453dd353a4eec3faf57c578</id>
<content type='text'>
Use RV_EXTRACT_BTYPE_IMM, instead of reimplementing it in
simulate_branch().

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/b441038c991da11a7a48ea7140ab00e3bb119387.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RV_EXTRACT_RS1_REG</title>
<updated>2025-09-17T00:46:44Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:17:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d57676c21ef6f3dd530bcd7f5035a5e0b7699cc6'/>
<id>urn:sha1:d57676c21ef6f3dd530bcd7f5035a5e0b7699cc6</id>
<content type='text'>
Use RV_EXTRACT_RS1_REG instead of reimplementing its code.

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/b441038c991da11a7a48ea7140ab00e3bb119387.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
<entry>
<title>riscv: kprobes: Remove duplication of RV_EXTRACT_JTYPE_IMM</title>
<updated>2025-09-17T00:46:43Z</updated>
<author>
<name>Nam Cao</name>
</author>
<published>2025-05-11T21:17:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f1ea7f04edd918b0e0fd8dc1318b22049a6c716'/>
<id>urn:sha1:8f1ea7f04edd918b0e0fd8dc1318b22049a6c716</id>
<content type='text'>
Use RV_EXTRACT_JTYPE_IMM, instead of reimplementing it in simulate_jal().

Signed-off-by: Nam Cao &lt;namcao@linutronix.de&gt;
Reviewed-by: Alexandre Ghiti &lt;alexghiti@rivosinc.com&gt;
Link: https://lore.kernel.org/linux-riscv/af502036738d381c6bdb96a236d21bab8c343f74.1747215274.git.namcao@linutronix.de/
Signed-off-by: Paul Walmsley &lt;pjw@kernel.org&gt;</content>
</entry>
</feed>
