Linux Trace Kernel
 help / color / mirror / Atom feed
From: Sahil <sahilcdq0@gmail.com>
To: Stafford Horne <shorne@gmail.com>
Cc: jonas@southpole.se, stefan.kristiansson@saunalahti.fi,
	naveen@kernel.org, davem@davemloft.net, mhiramat@kernel.org,
	pjw@kernel.org, wangruikang@iscas.ac.cn, namcao@linutronix.de,
	kees@kernel.org, linux-openrisc@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] openrisc: Add unit tests for KProbes on branch instructions
Date: Wed, 18 Nov 2026 16:56:41 +0530	[thread overview]
Message-ID: <fe93e84a-1876-4416-b3cc-547b9816c865@gmail.com> (raw)
In-Reply-To: <avkQctt0CKt3YcsH@antec>

On 11/15/26 7:22 AM, Stafford Horne wrote:
> On Fri, Nov 13, 2026 at 10:45:03PM +0530, Sahil wrote:
>> On 11/8/26 1:33 PM, Stafford Horne wrote:
>>> On Tue, Oct 27, 2026 at 01:42:39AM +0530, Sahil Siddiq wrote:
>>>> Tests already exist lib/tests to verify the generic functionality of
>>>> KProbes. Add unit tests to verify that KProbes work on instructions
>>>> that require simulation in the OpenRISC ISA, and that the corresponding
>>>> delay slots are handled correctly.
>>>>
>>>> Signed-off-by: Sahil Siddiq <sahilcdq0@gmail.com>
>>>> [...]
>>>> +
>>>> +SYM_FUNC_START(test_kprobes_j)
>>>> +test_kprobes_j_addr1:
>>>> +	l.addi	r11,r0,0
>>>> +	l.j	2f
>>>> +	l.nop
>>>
>>> Just a tiny comment here about indenting the delay slots.
>>
>> Got it, I'll indent this.
>>
>>> You could also use the delayslots here, for example:
>>>
>>> 	l.j	2f
>>> 	 l.addi	r11,r0,0
>>
>> I initially thought of that too. But then I thought by keeping l.addi
>> before l.j, I would also be able to test this for the case when
>> there are no delay slots. I can reshuffle the instructions if that
>> test isn't required. Please let me know what your thoughts are.
> 
> I don't think it matters either way since these are tests.  But, it would be good
> to note that in a comment at the top of the files where you want to maintain
> that convention.
> 
> However, thinking a bit further that may be hard to enforce down the line just
> for a handful of files.  We should assume the kernel code uses delayslots.

I agree. Since "head.S" and "entry.S" already use delay slots, I don't think the
kernel will work with a CPU config that has delay slots disabled. Also, there
should now be no need to have a static key for "delay_slot".

> 
> -Stafford
> 

Thanks,
Sahil


  reply	other threads:[~2026-11-18 11:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260930202744.50489-1-sahilcdq0@gmail.com>
2026-10-26 20:12 ` [PATCH v3 0/4] openrisc: Add support for KProbes and Kretprobes Sahil Siddiq
2026-11-13  9:04   ` Masami Hiramatsu (Google)
2026-11-13 17:22     ` Sahil
2026-10-26 20:12 ` [PATCH v3 1/4] openrisc: Add utilities and clean up simulation of instructions Sahil Siddiq
2026-11-07  6:45   ` Stafford Horne
2026-11-13 17:11     ` Sahil
2026-11-15  1:13       ` Stafford Horne
2026-11-18 11:32         ` Sahil
2026-10-26 20:12 ` [PATCH v3 2/4] openrisc: Add KProbes Sahil Siddiq
2026-10-26 20:26   ` Sahil
2026-10-26 20:35   ` sashiko-bot
2026-11-08  7:46   ` Stafford Horne
2026-11-13 17:13     ` Sahil
2026-11-15  1:44       ` Stafford Horne
2026-11-18  5:51         ` Sahil
2026-10-26 20:12 ` [PATCH v3 3/4] openrisc: Add unit tests for KProbes on branch instructions Sahil Siddiq
2026-10-26 20:26   ` sashiko-bot
2026-11-08  8:03   ` Stafford Horne
2026-11-13 17:15     ` Sahil
2026-11-15  1:52       ` Stafford Horne
2026-11-18 11:26         ` Sahil [this message]
2026-10-26 20:12 ` [PATCH v3 4/4] openrisc: Add Kretprobes Sahil Siddiq
2026-10-26 20:28   ` sashiko-bot
2026-11-08  7:58   ` Stafford Horne
2026-11-13 17:16     ` Sahil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe93e84a-1876-4416-b3cc-547b9816c865@gmail.com \
    --to=sahilcdq0@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jonas@southpole.se \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-openrisc@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=namcao@linutronix.de \
    --cc=naveen@kernel.org \
    --cc=pjw@kernel.org \
    --cc=shorne@gmail.com \
    --cc=stefan.kristiansson@saunalahti.fi \
    --cc=wangruikang@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox