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: <b55ddf53-6456-2bf6-b58e-640b0ec7fcd3@pensando.io>
Date:   Wed, 26 May 2021 10:42:55 -0700
From:   Shannon Nelson <snelson@...sando.io>
To:     Tony Nguyen <anthony.l.nguyen@...el.com>, davem@...emloft.net,
        kuba@...nel.org
Cc:     Jesse Brandeburg <jesse.brandeburg@...el.com>,
        netdev@...r.kernel.org, sassmann@...hat.com,
        Dave Switzer <david.switzer@...el.com>
Subject: Re: [PATCH net-next 11/11] ixgbe: reduce checker warnings

On 5/26/21 10:23 AM, Tony Nguyen wrote:
> From: Jesse Brandeburg <jesse.brandeburg@...el.com>
>
> Fix the sparse warnings in the ixgbe crypto offload code. These
> changes were made in the most conservative way (force cast)
> in order to hopefully not break the code. I suspect that the
> code might still be broken on big-endian architectures, but
> no one is complaining, so I'm just leaving it functionally
> the same.
>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
> Cc: Shannon Nelson <snelson@...sando.io>
> Tested-by: Dave Switzer <david.switzer@...el.com>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>

Acked-by: Shannon Nelson <snelson@...sando.io>

> ---
> Warning Detail:
> .../ixgbe/ixgbe_ipsec.c:514:56: warning: restricted __be32 degrades to integer
> .../ixgbe/ixgbe_ipsec.c:521:48: warning: restricted __be32 degrades to integer
> .../ixgbe/ixgbe_ipsec.c:536:59: warning: restricted __be32 degrades to integer
> .../ixgbe/ixgbe_ipsec.c:546:59: warning: restricted __be32 degrades to integer
> ---
>   drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> index 54d47265a7ac..e596e1a9fc75 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c
> @@ -511,14 +511,14 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs)
>   					continue;
>   
>   				reg = IXGBE_READ_REG(hw, MIPAF_ARR(3, i));
> -				if (reg == xs->id.daddr.a4)
> +				if (reg == (__force u32)xs->id.daddr.a4)
>   					return 1;
>   			}
>   		}
>   
>   		if ((bmcipval & BMCIP_MASK) == BMCIP_V4) {
>   			reg = IXGBE_READ_REG(hw, IXGBE_BMCIP(3));
> -			if (reg == xs->id.daddr.a4)
> +			if (reg == (__force u32)xs->id.daddr.a4)
>   				return 1;
>   		}
>   
> @@ -533,7 +533,7 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs)
>   
>   			for (j = 0; j < 4; j++) {
>   				reg = IXGBE_READ_REG(hw, MIPAF_ARR(i, j));
> -				if (reg != xs->id.daddr.a6[j])
> +				if (reg != (__force u32)xs->id.daddr.a6[j])
>   					break;
>   			}
>   			if (j == 4)   /* did we match all 4 words? */
> @@ -543,7 +543,7 @@ static int ixgbe_ipsec_check_mgmt_ip(struct xfrm_state *xs)
>   		if ((bmcipval & BMCIP_MASK) == BMCIP_V6) {
>   			for (j = 0; j < 4; j++) {
>   				reg = IXGBE_READ_REG(hw, IXGBE_BMCIP(j));
> -				if (reg != xs->id.daddr.a6[j])
> +				if (reg != (__force u32)xs->id.daddr.a6[j])
>   					break;
>   			}
>   			if (j == 4)   /* did we match all 4 words? */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ