lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tuacomps.ffs@tglx>
Date:   Fri, 29 Apr 2022 00:41:03 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Prakash Sangappa <prakash.sangappa@...cle.com>
Cc:     Davidlohr Bueso <dave@...olabs.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "manfred@...orfullife.com" <manfred@...orfullife.com>
Subject: Re: [PATCH v3] ipc: Update semtimedop() to use hrtimer

On Thu, Apr 28 2022 at 22:23, Prakash Sangappa wrote:
>> On Apr 28, 2022, at 3:02 PM, Thomas Gleixner <tglx@...utronix.de> wrote:
>> On Thu, Apr 28 2022 at 13:50, Davidlohr Bueso wrote:
>>> On Thu, 28 Apr 2022, Prakash Sangappa wrote:
>>>> -		if (timeout)
>>>> -			jiffies_left = schedule_timeout(jiffies_left);
>>>> -		else
>>>> -			schedule();
>>>> +		timed_out = !schedule_hrtimeout_range(exp,
>>>> +				current->timer_slack_ns, HRTIMER_MODE_ABS);
>>> 
>>> I'm wondering if the slack parameter instead of passing the timer_slack_ns
>>> value immediately, we should do a rt_task() check and pass zero if so.
>> 
>> We should have a wrapper function which takes care of that instead of
>> having checks all over the place.
>
> Ok  it can be an inline function in sched.h which returns appropriate 
> slack time. Use that in  futex_wait() and sigtimedwait() also in addition to 
> semtimedop() & mqueue codepath?

No. What I meant is a function which handles this internally, not an inline
function which has to be invoked on various call sites.

> Should that be a separate patch?

Definitely. That's an orthogonal problem.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ