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]
Date:   Wed, 17 Nov 2021 08:50:33 +0100
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Davidlohr Bueso <dave@...olabs.net>
Cc:     martin.petersen@...cle.com, jejb@...ux.ibm.com, hare@...e.de,
        tglx@...utronix.de, linux-scsi@...r.kernel.org,
        linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH 2/3] scsi/fcoe: Add a local_lock to fcoe_percpu

On 2021-11-16 18:59:55 [-0800], Davidlohr Bueso wrote:
> fcoe_get_paged_crc_eof() relies on the caller having preemption
> disabled to ensure the per-CPU fcoe_percpu context remains valid
> throughout the call. This is done by either holding spinlocks
> (such as bnx2fc_global_lock or qedf_global_lock) or the get_cpu()
> from fcoe_alloc_paged_crc_eof(). This last one breaks PREEMPT_RT
> semantics as there can be memory allocation and end up sleeping
> in atomic contexts.
> 
> Introduce a local_lock_t to struct fcoe_percpu that will keep the
> non-RT case the same, mapping to preempt_disable/enable, while
> RT will use a per-CPU spinlock allowing the region to be preemptible
> but still maintain CPU locality. The other users of fcoe_percpu
> are already safe in this regard and do not require local_lock()ing.
> 
> Signed-off-by: Davidlohr Bueso <dbueso@...e.de>

Acked-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ