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, 13 Apr 2021 07:58:14 +0000
From:   "Ong, Boon Leong" <boon.leong.ong@...el.com>
To:     David Miller <davem@...emloft.net>
CC:     "peppe.cavallaro@...com" <peppe.cavallaro@...com>,
        "alexandre.torgue@...com" <alexandre.torgue@...com>,
        "joabreu@...opsys.com" <joabreu@...opsys.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "hawk@...nel.org" <hawk@...nel.org>,
        "john.fastabend@...il.com" <john.fastabend@...il.com>,
        "mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
        "andrii@...nel.org" <andrii@...nel.org>,
        "kafai@...com" <kafai@...com>,
        "songliubraving@...com" <songliubraving@...com>,
        "yhs@...com" <yhs@...com>,
        "kpsingh@...nel.org" <kpsingh@...nel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>
Subject: RE: [PATCH net-next 6/7] net: stmmac: Enable RX via AF_XDP zero-copy

>+	/* synchronize_rcu() needed for pending XDP buffers to drain */
>+	for (queue = 0; queue < rx_queues_cnt; queue++) {
>+		rx_q = &priv->rx_queue[queue];
>+		if (rx_q->xsk_pool) {
>+			synchronize_rcu();
>
>Are you sure this is safe here, especially via the ->ndo_setup_tc() code path?
>
Thanks for the feedback.
Will fix this in v2 by introducing below:

Introduce __stmmac_disable_all_queues() to contain the original code that
does napi_disable() and then make stmmac_setup_tc_block_cb(0 to call this.

Add stmmac_disable_all_queues() to perform synchronize_rcu() if
there is preregistered XSK pool before subsequently call 
__stmmac_disable_all_queues() to perform napi_disable(). 

After this, both stmmac_release() and stmmac_suspend() will use
stmmac_disable_all_queues().

Thx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ