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] [day] [month] [year] [list]
Date:   Tue, 26 Sep 2023 02:43:07 +0000
From:   Ming Qian <ming.qian@....com>
To:     Peter Zijlstra <peterz@...radead.org>
CC:     "mingo@...hat.com" <mingo@...hat.com>,
        "juri.lelli@...hat.com" <juri.lelli@...hat.com>,
        "vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
        "dietmar.eggemann@....com" <dietmar.eggemann@....com>,
        "rostedt@...dmis.org" <rostedt@...dmis.org>,
        "bsegall@...gle.com" <bsegall@...gle.com>,
        "mgorman@...e.de" <mgorman@...e.de>,
        "bristot@...hat.com" <bristot@...hat.com>,
        "vschneid@...hat.com" <vschneid@...hat.com>,
        Eagle Zhou <eagle.zhou@....com>,
        Tao Jiang <tao.jiang_2@....com>,
        dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [EXT] Re: [PATCH] wait: don't wake up freezable wait by freezing
 fake signal

>From: Peter Zijlstra <peterz@...radead.org>
>Sent: 2023年9月25日 18:08
>To: Ming Qian <ming.qian@....com>
>Cc: mingo@...hat.com; juri.lelli@...hat.com; vincent.guittot@...aro.org;
>dietmar.eggemann@....com; rostedt@...dmis.org; bsegall@...gle.com;
>mgorman@...e.de; bristot@...hat.com; vschneid@...hat.com; Eagle Zhou
><eagle.zhou@....com>; Tao Jiang <tao.jiang_2@....com>; dl-linux-imx
><linux-imx@....com>; linux-kernel@...r.kernel.org; linux-arm-
>kernel@...ts.infradead.org
>Subject: [EXT] Re: [PATCH] wait: don't wake up freezable wait by freezing fake
>signal
>
>Caution: This is an external email. Please take care when clicking links or
>opening attachments. When in doubt, report the message using the 'Report
>this email' button
>
>
>On Tue, Aug 22, 2023 at 03:45:47PM +0800, Ming Qian wrote:
>> kernel may try to wake up task with fake signal when freezing task, if
>> the task is waiting event using wait_event_freezable, it's better to
>> freeze the wait, instead of breaking it.
>>
>> otherwise the caller may need to retry the wait, maybe like below
>> code:
>>
>>       if (rc == -ERESTARTSYS && freezing(current)) {
>>               clear_thread_flag(TIF_SIGPENDING);
>>               goto again;
>>       }
>
>I'm not sure I get it -- is there an actual problem, or are you trying to optimize
>something?

Hi Peter,
    We have a driver that needs to interact with the daemon on nxp IMX8MP-EVK,  Initially we use wait_event_interruptible to wait for a response from the daemon, but in our suspend test, sometimes we met failure which was caused by the waiting interrupted.
    Then we use wait_event_freezable instead, but the problem remains.  The above retry  code should fix the problem, but we think it may be a common issue.
    So we try to improve the wait_event_freezable, then we can pass our suspend test without any rety.

Ming

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ