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  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, 24 Apr 2020 16:53:04 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     gshan@...hat.com
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        netanel@...zon.com, akiyano@...zon.com, gtzalik@...zon.com,
        saeedb@...zon.com, zorik@...zon.com
Subject: Re: [PATCH] net/ena: Fix build warning in ena_xdp_set()

From: Gavin Shan <gshan@...hat.com>
Date: Fri, 24 Apr 2020 10:01:46 +1000

> This fixes the following build warning in ena_xdp_set()
> 
>    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>

The type of the argument is configuration dependent, this is because
sometimes one of the terms to define ENA_XDP_MAX_MTU is PAGE_SIZE and
sometimes it is SZ_16K.  And this determines whether it evaluates to
a long or not.

So your patch will just cause warnings in other configurations.

A better fix is therefore necessary.

Powered by blists - more mailing lists