Re: [PATCH 1/3] scsi: fcoe: Statically initialize flogi_maddr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2021-05-28 at 11:13 -0700, Kees Cook wrote:
> In preparation for FORTIFY_SOURCE performing compile-time and run-time
> field bounds checking for memcpy() using memcpy() with an inline const
> buffer and instead just statically initialize the destination array
> directly.
[]
> diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
[]
> @@ -293,7 +293,7 @@ static int fcoe_interface_setup(struct fcoe_interface *fcoe,
>  	struct fcoe_ctlr *fip = fcoe_to_ctlr(fcoe);
>  	struct netdev_hw_addr *ha;
>  	struct net_device *real_dev;
> -	u8 flogi_maddr[ETH_ALEN];
> +	u8 flogi_maddr[ETH_ALEN] = FC_FCOE_FLOGI_MAC;

static const

> @@ -442,7 +441,7 @@ static void fcoe_interface_remove(struct fcoe_interface *fcoe)
>  {
>  	struct net_device *netdev = fcoe->netdev;
>  	struct fcoe_ctlr *fip = fcoe_to_ctlr(fcoe);
> -	u8 flogi_maddr[ETH_ALEN];
> +	u8 flogi_maddr[ETH_ALEN] = FC_FCOE_FLOGI_MAC;

etc...





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux