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: <87r1w7fymt.fsf@amazon.com>
Date:   Tue, 28 Apr 2020 14:55:40 +0000
From:   "Agroskin, Shay" <shayagr@...zon.com>
To:     Gavin Shan <gshan@...hat.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Belgazal, Netanel" <netanel@...zon.com>,
        "Kiyanovski, Arthur" <akiyano@...zon.com>,
        "Tzalik, Guy" <gtzalik@...zon.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "shan.gavin@...il.com" <shan.gavin@...il.com>,
        "agrosshay@...il.com" <agrosshay@...il.com>
Subject: Re: [PATCH v2] net/ena: Fix build warning in ena_xdp_set()


Gavin Shan <gshan@...hat.com> writes:

> This fixes the following build warning in ena_xdp_set(), which is
> observed on aarch64 with 64KB page size.
>
>    In file included from ./include/net/inet_sock.h:19,
>       from ./include/net/ip.h:27,
>       from drivers/net/ethernet/amazon/ena/ena_netdev.c:46:
>    drivers/net/ethernet/amazon/ena/ena_netdev.c: In function         \
>    ‘ena_xdp_set’:                                                    \
>    drivers/net/ethernet/amazon/ena/ena_netdev.c:557:6: warning:      \
>    format ‘%lu’                                                      \
>    expects argument of type ‘long unsigned int’, but argument 4      \
>    has type ‘int’                                                    \
>    [-Wformat=] "Failed to set xdp program, the current MTU (%d) is   \
>    larger than the maximum allowed MTU (%lu) while xdp is on",
>
> Signed-off-by: Gavin Shan <gshan@...hat.com>
> ---
> v2: Make ENA_PAGE_SIZE to be "unsigned long" and verify on aarch64
>     with 4KB or 64KB page size configuration
> ---
>  drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.h b/drivers/net/ethernet/amazon/ena/ena_netdev.h
> index 97dfd0c67e84..9e1860d81908 100644
> --- a/drivers/net/ethernet/amazon/ena/ena_netdev.h
> +++ b/drivers/net/ethernet/amazon/ena/ena_netdev.h
> @@ -69,7 +69,7 @@
>   * 16kB.
>   */
>  #if PAGE_SIZE > SZ_16K
> -#define ENA_PAGE_SIZE SZ_16K
> +#define ENA_PAGE_SIZE (_AC(SZ_16K, UL))
>  #else
>  #define ENA_PAGE_SIZE PAGE_SIZE
>  #endif

thanks for this fix

Acked-by: Shay Agroskin <shayagr@...zon.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ