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  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:   Fri, 4 Feb 2022 20:17:48 -0800
From:   Jakub Kicinski <>
To:     Sebastian Andrzej Siewior <>
        "David S. Miller" <>,
        Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Eric Dumazet <>,
        Jesper Dangaard Brouer <>,
        John Fastabend <>,
        Thomas Gleixner <>,
        Toke Høiland-Jørgensen 
Subject: Re: [PATCH net-next v2 3/3] net: dev: Make rps_lock() disable

On Fri,  4 Feb 2022 21:12:59 +0100 Sebastian Andrzej Siewior wrote:
> Disabling interrupts and in the RPS case locking input_pkt_queue is
> split into local_irq_disable() and optional spin_lock().
> This breaks on PREEMPT_RT because the spinlock_t typed lock can not be
> acquired with disabled interrupts.
> The sections in which the lock is acquired is usually short in a sense that it
> is not causing long und unbounded latiencies. One exception is the
> skb_flow_limit() invocation which may invoke a BPF program (and may
> require sleeping locks).
> By moving local_irq_disable() + spin_lock() into rps_lock(), we can keep
> interrupts disabled on !PREEMPT_RT and enabled on PREEMPT_RT kernels.
> Without RPS on a PREEMPT_RT kernel, the needed synchronisation happens
> as part of local_bh_disable() on the local CPU.
> ____napi_schedule() is only invoked if sd is from the local CPU. Replace
> it with __napi_schedule_irqoff() which already disables interrupts on
> PREEMPT_RT as needed. Move this call to rps_ipi_queued() and rename the
> function to napi_schedule_rps as suggested by Jakub.
> Signed-off-by: Sebastian Andrzej Siewior <>

Reviewed-by: Jakub Kicinski <>

Powered by blists - more mailing lists