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: <20210112154512.GB1185705@infradead.org>
Date:   Tue, 12 Jan 2021 15:45:12 +0000
From:   Christoph Hellwig <hch@...radead.org>
To:     "Ahmed S. Darwish" <a.darwish@...utronix.de>
Cc:     "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        John Garry <john.garry@...wei.com>,
        Jason Yan <yanaijie@...wei.com>,
        Daniel Wagner <dwagner@...e.de>,
        Artur Paszkiewicz <artur.paszkiewicz@...el.com>,
        Jack Wang <jinpu.wang@...ud.ionos.com>,
        linux-scsi@...r.kernel.org, intel-linux-scu@...el.com,
        LKML <linux-kernel@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        "Sebastian A. Siewior" <bigeasy@...utronix.de>
Subject: Re: [PATCH v2 03/19] scsi: libsas: Introduce a _gfp() variant of
 event notifiers

On Tue, Jan 12, 2021 at 12:06:31PM +0100, Ahmed S. Darwish wrote:
> sas_alloc_event() uses in_interrupt() to decide which allocation should
> be used.
> 
> The usage of in_interrupt() in drivers is phased out and Linus clearly
> requested that code which changes behaviour depending on context should
> either be separated or the context be conveyed in an argument passed by
> the caller, which usually knows the context.
> 
> The in_interrupt() check is also only partially correct, because it
> fails to choose the correct code path when just preemption or interrupts
> are disabled. For example, as in the following call chain:

What is the problem with simply adding a gfp_t argument to the existing
calls?  The end result of this series looks fine, but the way we get
there looks extremely cumbersome.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ