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: <7449914a-1ae3-9ea8-b60b-f0314999b790@redhat.com>
Date:   Wed, 12 Jul 2023 21:09:25 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Michal Hocko <mhocko@...e.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-doc@...r.kernel.org, Oscar Salvador <osalvador@...e.de>,
        Jonathan Corbet <corbet@....net>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v1] mm/memory_hotplug: document the signal_pending() check
 in offline_pages()

On 11.07.23 22:47, Michal Hocko wrote:
> On Tue 11-07-23 19:40:50, David Hildenbrand wrote:
>> Let's update the documentation that any signal is sufficient, and
>> add a comment that not only checking for fatal signals is historical
>> baggage: changing it now could break existing user space. although
>> unlikely.
>>
>> For example, when an app provides a custom SIGALRM handler and triggers
>> memory offlining, the timeout cmd would no longer stop memory offlining,
>> because SIGALRM would no longer be considered a fatal signal.
> 
> Yes, and it is likely goot to mention here that this is an antipattern
> for many other kernel operations like IO (e.g. write) but it is a long
> term behavior that somebody might depend on and it is safer to reflect
> the documentation to the realitity rather than other way around (which
> would be imho better).
> 

You mean adding something like

"Note that using signal_pending() instead of fatal_signal_pending() is 
an anti-pattern, but slowly deprecating that behavior to eventually 
change it in the far future is probably not worth the effort. If this 
ever becomes relevant for user-space, we might want to rethink."


Thanks!

-- 
Cheers,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ