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]
Message-ID: <793e182091340dd404ed15e8559c61b9aaf3bc96.camel@perches.com>
Date:   Sat, 25 Aug 2018 08:49:53 -0700
From:   Joe Perches <joe@...ches.com>
To:     Jeff Kirsher <jeffrey.t.kirsher@...el.com>, davem@...emloft.net
Cc:     YueHaibing <yuehaibing@...wei.com>, netdev@...r.kernel.org,
        nhorman@...hat.com, sassmann@...hat.com, jogreene@...hat.com
Subject: Re: [net 01/11] ixgb: use dma_zalloc_coherent instead of
 allocator/memset

On Fri, 2018-08-24 at 11:47 -0700, Jeff Kirsher wrote:
> From: YueHaibing <yuehaibing@...wei.com>
> 
> Use dma_zalloc_coherent instead of dma_alloc_coherent
> followed by memset 0.

Unrelated trivia:  above this, perhaps the

	size = sizeof(struct ixgb_buffer) * txdr->count;
	txdr->buffer_info = vzalloc(size);
	if (!txdr->buffer_info)
		return -ENOMEM;

should be changed to kvzalloc to avoid using vzalloc where
possible, with the appropriate vfree/kvfree conversions.

Perhaps across all intel drivers:

$ git grep -n "\bv.alloc(" drivers/net/ethernet/intel
drivers/net/ethernet/intel/e1000/e1000_main.c:1499:     txdr->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/e1000/e1000_main.c:1689:     rxdr->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/e1000e/ethtool.c:705:                temp_tx = vmalloc(size);
drivers/net/ethernet/intel/e1000e/ethtool.c:712:                temp_rx = vmalloc(size);
drivers/net/ethernet/intel/e1000e/netdev.c:2328:        tx_ring->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/e1000e/netdev.c:2363:        rx_ring->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c:561:   temp_ring = vmalloc(array_size(i, sizeof(struct fm10k_ring)));
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c:22:     tx_ring->tx_buffer = vzalloc(size);
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c:90:     rx_ring->rx_buffer = vzalloc(size);
drivers/net/ethernet/intel/igb/igb_ethtool.c:905:               temp_ring = vmalloc(array_size(sizeof(struct igb_ring),
drivers/net/ethernet/intel/igb/igb_ethtool.c:908:               temp_ring = vmalloc(array_size(sizeof(struct igb_ring),
drivers/net/ethernet/intel/igb/igb_main.c:4075: tx_ring->tx_buffer_info = vmalloc(size);
drivers/net/ethernet/intel/igb/igb_main.c:4224: rx_ring->rx_buffer_info = vmalloc(size);
drivers/net/ethernet/intel/igbvf/ethtool.c:226: temp_ring = vmalloc(sizeof(struct igbvf_ring));
drivers/net/ethernet/intel/igbvf/netdev.c:421:  tx_ring->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/igbvf/netdev.c:459:  rx_ring->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/ixgb/ixgb_main.c:682:        txdr->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/ixgb/ixgb_main.c:765:        rxdr->buffer_info = vzalloc(size);
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c:1074:  temp_ring = vmalloc(array_size(i, sizeof(struct ixgbe_ring)));
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:6352:             tx_ring->tx_buffer_info = vmalloc(size);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:6446:             rx_ring->rx_buffer_info = vmalloc(size);
drivers/net/ethernet/intel/ixgbevf/ethtool.c:285:               tx_ring = vmalloc(array_size(sizeof(*tx_ring),
drivers/net/ethernet/intel/ixgbevf/ethtool.c:331:               rx_ring = vmalloc(array_size(sizeof(*rx_ring),
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:3373: tx_ring->tx_buffer_info = vmalloc(size);
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c:3451: rx_ring->rx_buffer_info = vmalloc(size);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ