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]
Date:	Fri,  8 Jan 2016 14:48:17 -0700
From:	tim.gardner@...onical.com
To:	dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Tim Gardner <tim.gardner@...onical.com>,
	Vinod Koul <vinod.koul@...el.com>,
	Dan Williams <dan.j.williams@...el.com>,
	Dave Jiang <dave.jiang@...el.com>,
	Prarit Bhargava <prarit@...hat.com>,
	Nicholas Mc Guire <der.herr@...r.at>,
	Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Subject: [PATCH v4.4-rc8 v4] dmaengine: ioatdma: Squelch framesize warnings

From: Tim Gardner <tim.gardner@...onical.com>

  CC [M]  drivers/dma/ioat/prep.o
drivers/dma/ioat/prep.c: In function 'ioat_prep_pqxor':
drivers/dma/ioat/prep.c:682:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 }
 ^
drivers/dma/ioat/prep.c: In function 'ioat_prep_pqxor_val':
drivers/dma/ioat/prep.c:714:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 }

gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1)

Cc: Vinod Koul <vinod.koul@...el.com>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: Dave Jiang <dave.jiang@...el.com>
Cc: Prarit Bhargava <prarit@...hat.com>
Cc: Nicholas Mc Guire <der.herr@...r.at>
Cc: Jarkko Nikula <jarkko.nikula@...ux.intel.com>
Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
---

v2 - use per CPU static buffers instead of dynamically allocating memory.
v3 - Use get_cpu_var/put_cpu_var which implicitly control preeemption. Drop
     the wrapper function that no longer serves any purpose.
v4 - According to discussion between Dan Williams and Dave Jiang, MAX_SCF really
     only needs to be 256. That is certainly a simpler patch then previous efforts.

     Quoting from an email regarding v3:

     Dan said, "Looks good to me... but now that I think about it, why is MAX_SCF set
     to 1024 in the first place?  Certainly it can't be bigger than the
     maximum number of sources in a single operation which is 8 to 16.
     Even md raid can only support up to 256 devices in an array.  So I
     think that contstant is bogus.
     If we set it to 16 we may not even need the percpu change.
     Dave?"

     Dave responded, "You are right. It was an arbitrary number I threw in there to address
     sparse warning. It can be reduced. 256 seems reasonable. "

 drivers/dma/ioat/prep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/ioat/prep.c b/drivers/dma/ioat/prep.c
index 6bb4a13..243421a 100644
--- a/drivers/dma/ioat/prep.c
+++ b/drivers/dma/ioat/prep.c
@@ -26,7 +26,7 @@
 #include "hw.h"
 #include "dma.h"
 
-#define MAX_SCF	1024
+#define MAX_SCF	256
 
 /* provide a lookup table for setting the source address in the base or
  * extended descriptor of an xor or pq descriptor
-- 
2.6.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ