Re: uprobe splat in PREEMP_RT

Andrii Nakryiko
2025-04-03T16:04:25Z

On Thu, Apr 3, 2025 at 5:28 AM Oleg Nesterov <oleg@redhat.com> wrote:
>
> On 04/03, Sebastian Sewior wrote:
> >
> > On 2025-04-02 16:12:46 [+0200], Oleg Nesterov wrote:
> > > >
> > > > Yes. This would work for here just to skip the check because of all
> > > > details that are hard to express. Therefore I suggested to use
> > > > raw_write_seqcount_begin() instead of write_seqcount_begin() in
> > > > 20250402122158.j_8VoHQ-@linutronix.de. Would that work?
> > >
> > > If this can work, then let me repeat: why can't we turn ->ri_seqcount
> > > into a boolean?
> >
> > I just stumbled here due to the warning. Now that you ask the question,
> > it is used a bool in the current construct. So yes, I also don't see
> > why.
>
> Well, Andrii has already explained why he decided to abuse seqcount_t,
> to avoid the explicti barriers in this code... I won't argue.
>
> So, just in case, I agree that your suggestion to use
> raw_write_seqcount_begin/end should obviously fix the problem.
>

Sounds good, I'll switch to raw_ variants and will point out more
explicitly in the comment that I rely on seqcount barriers and
visibility rules.

> Oleg.
>