[PATCH] staging/vc04_services: Use __user annotation for user-space pointers

2018-07-24 Thread Carlos Maiolino
Fix several sparse warnings regarding different address space assignments, like example below, by properly annotating pointers expected to carry user space addresses. warning: incorrect type in argument 1 (different address spaces) Signed-off-by: Carlos Maiolino --- I'm not subscribed to the

Re: [PATCH 0/4] staging: wilc1000: make use of descriptor-based interface for GPIO

2018-07-24 Thread Claudiu Beznea
Reviewed-by: Claudiu Beznea On 20.07.2018 15:01, Ajay Singh wrote: > This patch series contains changes mainly related to make use of > descriptor-based interface instead of integer-based interface for GPIO. > Modified the compatible string to use 'microchip' instead of 'atmel' prefix. > Also

Re: [PATCH] media: staging: omap4iss: Include asm/cacheflush.h after generic includes

2018-07-24 Thread Mauro Carvalho Chehab
Em Tue, 24 Jul 2018 10:37:56 -0700 Linus Torvalds escreveu: > On Mon, Jul 23, 2018 at 8:41 PM Mauro Carvalho Chehab > wrote: > > > > While I won't be against merging it, IMHO a better fix would be to > > add the includes asm/cacheflush.h needs inside it, e. g. something > > like adding: > >

PROPOSITION D'INVESTISSEMENT

2018-07-24 Thread Worry investissement
Bonjour Mesdames, Monsieur,Cher Partenaires, Nous sommes de la sociйtй des bailleurs de fond et de prкt privй. Nous avons un capital tres important et on investit dans plusieurs secteurs d’activitйs de dйveloppement durable а court et а long terme suite a un dйpфt de demande bien analysйe. En

Re: [PATCH] media: staging: omap4iss: Include asm/cacheflush.h after generic includes

2018-07-24 Thread Linus Torvalds
On Mon, Jul 23, 2018 at 8:41 PM Mauro Carvalho Chehab wrote: > > While I won't be against merging it, IMHO a better fix would be to > add the includes asm/cacheflush.h needs inside it, e. g. something > like adding: No. The includes really should come after . This is a media driver bug, plain

Re: [PATCH v6 18/18] crypto: Remove AHASH_REQUEST_ON_STACK

2018-07-24 Thread Kees Cook
On Tue, Jul 24, 2018 at 10:31 AM, Joe Perches wrote: > On Tue, 2018-07-24 at 09:49 -0700, Kees Cook wrote: >> All users of AHASH_REQUEST_ON_STACK have been removed from the kernel, so >> drop it entirely so no VLAs get reintroduced by future users. > > checkpatch has a test for that. > It could

Re: [PATCH v6 17/18] crypto: ccm: Remove VLA usage

2018-07-24 Thread Kees Cook
On Tue, Jul 24, 2018 at 9:57 AM, Ard Biesheuvel wrote: > On 24 July 2018 at 18:49, Kees Cook wrote: >> From: Ard Biesheuvel >> >> In the quest to remove all stack VLA usage from the kernel[1], this >> drops AHASH_REQUEST_ON_STACK by preallocated the ahash request area >> with the skcipher area

Re: [PATCH] media: staging: omap4iss: Include asm/cacheflush.h after generic includes

2018-07-24 Thread Linus Torvalds
On Tue, Jul 24, 2018 at 11:39 AM Mauro Carvalho Chehab wrote: > > Works for me. Do you intend to apply it directly? Yes, I took it and it should be pushed out. > Yeah, some time ago mailing lists got flooded with some janitorial's > patchset adding includes (some claiming to be needed on some

[PATCH 4/4] staging: rtl8188eu/rtl8723bs: fix character encoding

2018-07-24 Thread Arnd Bergmann
drivers/staging/rtl8188eu/include/odm.h uses an incorrect encoding for the '...' character in two comments, which makes it one of the few non-UTF-8 source files. This removes the odd characters and uses the same ASCII representation that we have in the regular rtlwifi driver. The second instance

Re: [PATCH v1] media: staging: tegra-vde: Replace debug messages with trace points

2018-07-24 Thread Dmitry Osipenko
On Wednesday, 25 July 2018 01:06:52 MSK Mauro Carvalho Chehab wrote: > Em Sat, 7 Jul 2018 19:20:49 +0300 > > Dmitry Osipenko escreveu: > > Trace points are much more efficient than debug messages for extensive > > tracing and could be conveniently enabled / disabled dynamically, hence > > let's

Re: [PATCH v3 0/4] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl

2018-07-24 Thread Li Yang
On Tue, Jul 24, 2018 at 9:38 AM, Ioana Ciocoi Radulescu wrote: >> -Original Message- >> From: Horia Geanta >> Sent: Tuesday, July 24, 2018 5:35 PM >> To: Roy Pledge ; de...@driverdev.osuosl.org; linux- >> arm-ker...@lists.infradead.org; gre...@linuxfoundation.org; Leo Li >> >> Cc:

Re: [PATCH v1] media: staging: tegra-vde: Replace debug messages with trace points

2018-07-24 Thread Mauro Carvalho Chehab
Em Sat, 7 Jul 2018 19:20:49 +0300 Dmitry Osipenko escreveu: > Trace points are much more efficient than debug messages for extensive > tracing and could be conveniently enabled / disabled dynamically, hence > let's replace debug messages with the trace points. This patch require some work: $

[PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier

2018-07-24 Thread Georgios Tsotsos
Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index cded30f145aa..cff5e790b196 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c

[PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file

2018-07-24 Thread Georgios Tsotsos
Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h index 3353aefe662e..769c36cf6614 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.h

[PATCH 3/4] Staging: octeon-usb: Change coding style for CVMX_WAIT_FOR_FIELD32 marco.

2018-07-24 Thread Georgios Tsotsos
Changes coding style and encapsulate into parentheses timeout_usec. Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.c | 44 + 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c

[no subject]

2018-07-24 Thread Georgios Tsotsos
Date: Wed, 25 Jul 2018 01:18:58 +0300 Subject: [PATCH 0/4] Staging: octeon-usb: Fixes and Coding style applied. Hello, I am sending four patches which trying to resolve TODO list requirements no 45 about octeon-usb. There are SPDX licence additions on c and header files. Checkpatch warnings

[PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier

2018-07-24 Thread Georgios Tsotsos
Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h index 3353aefe662e..769c36cf6614 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.h

[PATCH 2/4] Staging: octeon-usb: Applying coding style for column width.

2018-07-24 Thread Georgios Tsotsos
This patch resolves the warnings as its refereed to TODO list. There are also a code style issues that could be resolved via breaking down cvmx_usb_poll_channel(). Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.c | 10 ++ 1 file changed, 6 insertions(+), 4

Re: [PATCH v4 00/15] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-24 Thread NeilBrown
On Mon, Jul 16 2018, Sergio Paracuellos wrote: > This patch series include an attempt to avoid the use of custom > read and writes in driver code and use PCI subsystem common ones. > > In order to do this 'map_bus' callback is implemented and also > data structures for driver are included. The

Re: [PATCH v6 18/18] crypto: Remove AHASH_REQUEST_ON_STACK

2018-07-24 Thread Joe Perches
On Tue, 2018-07-24 at 09:49 -0700, Kees Cook wrote: > All users of AHASH_REQUEST_ON_STACK have been removed from the kernel, so > drop it entirely so no VLAs get reintroduced by future users. checkpatch has a test for that. It could now be removed as well. --- diff --git a/scripts/checkpatch.pl

[PATCH 1/4] Staging: octeon-usb: Adds SPDX License Identifier

2018-07-24 Thread Georgios Tsotsos
Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index cded30f145aa..cff5e790b196 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c

[PATCH 4/4] Staging: octeon-usb: Adds SPDX License Identifier for header file

2018-07-24 Thread Georgios Tsotsos
Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/octeon-usb/octeon-hcd.h b/drivers/staging/octeon-usb/octeon-hcd.h index 3353aefe662e..769c36cf6614 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.h

[PATCH 0/4] Staging: octeon-usb: Fixes and Coding style applied.

2018-07-24 Thread Georgios Tsotsos
Hello, Previously patches were sent with wrong cover format, please ignore. I am sending four patches which trying to resolve TODO list requirements no 45 about octeon-usb. There are SPDX licence additions on c and header files. Checkpatch warnings are resolved,also a notice about

[PATCH 2/4] Staging: octeon-usb: Applying coding style for column width.

2018-07-24 Thread Georgios Tsotsos
This patch resolves the warnings as its refereed to TODO list. There are also a code style issues that could be resolved via breaking down cvmx_usb_poll_channel(). Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.c | 10 ++ 1 file changed, 6 insertions(+), 4

[PATCH 3/4] Staging: octeon-usb: Change coding style for CVMX_WAIT_FOR_FIELD32 marco.

2018-07-24 Thread Georgios Tsotsos
Changes coding style and encapsulate into parentheses timeout_usec. Signed-off-by: Georgios Tsotsos --- drivers/staging/octeon-usb/octeon-hcd.c | 44 + 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/drivers/staging/octeon-usb/octeon-hcd.c

Re: [PATCH 2/4] Staging: octeon-usb: Applying coding style for column width.

2018-07-24 Thread Joe Perches
On Wed, 2018-07-25 at 01:22 +0300, Georgios Tsotsos wrote: > This patch resolves the warnings as its refereed to TODO list. > There are also a code style issues that could be resolved via breaking > down cvmx_usb_poll_channel(). It was better before this change. If checkpatch caused you to

Re: [PATCH v1] media: staging: tegra-vde: Replace debug messages with trace points

2018-07-24 Thread Mauro Carvalho Chehab
Em Wed, 25 Jul 2018 01:38:37 +0300 Dmitry Osipenko escreveu: > On Wednesday, 25 July 2018 01:06:52 MSK Mauro Carvalho Chehab wrote: > > Em Sat, 7 Jul 2018 19:20:49 +0300 > > > > Dmitry Osipenko escreveu: > > > Trace points are much more efficient than debug messages for extensive > > >

Re: [PATCH v1] media: staging: tegra-vde: Replace debug messages with trace points

2018-07-24 Thread Dmitry Osipenko
On Wednesday, 25 July 2018 03:37:33 MSK Mauro Carvalho Chehab wrote: > Em Wed, 25 Jul 2018 01:38:37 +0300 > > Dmitry Osipenko escreveu: > > On Wednesday, 25 July 2018 01:06:52 MSK Mauro Carvalho Chehab wrote: > > > Em Sat, 7 Jul 2018 19:20:49 +0300 > > > > > > Dmitry Osipenko escreveu: > > >

Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required

2018-07-24 Thread Baoquan He
Hi Andrew, On 07/19/18 at 12:44pm, Andrew Morton wrote: > On Thu, 19 Jul 2018 23:17:53 +0800 Baoquan He wrote: > > > As far as I can tell, the above is the whole reason for the patchset, > > > yes? To avoid confusing users. > > > > > > In fact, it's not just trying to avoid confusing users.

[PATCH v3 3/4] drivers/staging: Remove fsl-mc driver from staging

2018-07-24 Thread Roy Pledge
Remove the staging/drivers/fsl-mc directory from the staging area now that all the components have been moved to the main kernel areas. Signed-off-by: Roy Pledge --- drivers/staging/Kconfig | 2 -- drivers/staging/Makefile| 1 - drivers/staging/fsl-mc/Kconfig | 2 --

Re: [PATCH v3] hv_netvsc: Add per-cpu ethtool stats for netvsc

2018-07-24 Thread Vitaly Kuznetsov
Yidong Ren writes: >> From: Yidong Ren >> Sent: Monday, July 23, 2018 6:26 PM >> +pcpu_sum = kvmalloc(sizeof(struct netvsc_ethtool_pcpu_stats) * >> +num_present_cpus(), GFP_KERNEL); > > Since there is no plan for CPU hotplug in Hyper-V in short term, it is fine > to use

Re: [PATCH 4/4] staging: rtl8188eu/rtl8723bs: fix character encoding

2018-07-24 Thread Greg Kroah-Hartman
On Tue, Jul 24, 2018 at 01:13:28PM +0200, Arnd Bergmann wrote: > drivers/staging/rtl8188eu/include/odm.h uses an incorrect encoding > for the '...' character in two comments, which makes it one of the > few non-UTF-8 source files. > > This removes the odd characters and uses the same ASCII

Re: [PATCH] staging: mt7621-pci: dt-bindings: add DT documentation for PCI MT7621

2018-07-24 Thread Greg KH
On Mon, Jul 16, 2018 at 07:32:32PM +0200, Sergio Paracuellos wrote: > This commit adds device tree bindings documentation for PCIEE controller > of MT7621 SoC. > > Signed-off-by: Sergio Paracuellos > --- > drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt | 97 > ++ > 1

Re: [RFC PATCH v5] Xilinx AXI-Stream FIFO v4.1 IP core

2018-07-24 Thread Greg KH
On Sun, Jul 22, 2018 at 09:27:37PM -0400, Jacob Feder wrote: > This IP core has read and write AXI-Stream FIFOs, the contents of which can > be accessed from the AXI4 memory-mapped interface. This is useful for > transferring data from a processor into the FPGA fabric. The driver creates > a

Re: [PATCH 4/4] staging: rtl8188eu/rtl8723bs: fix character encoding

2018-07-24 Thread Greg Kroah-Hartman
On Tue, Jul 24, 2018 at 01:53:17PM +0200, Greg Kroah-Hartman wrote: > On Tue, Jul 24, 2018 at 01:13:28PM +0200, Arnd Bergmann wrote: > > drivers/staging/rtl8188eu/include/odm.h uses an incorrect encoding > > for the '...' character in two comments, which makes it one of the > > few non-UTF-8

Re: [PATCH] staging: mt7621-pci: dt-bindings: add DT documentation for PCI MT7621

2018-07-24 Thread Sergio Paracuellos
On Tue, Jul 24, 2018 at 01:58:25PM +0200, Greg KH wrote: > On Mon, Jul 16, 2018 at 07:32:32PM +0200, Sergio Paracuellos wrote: > > This commit adds device tree bindings documentation for PCIEE controller > > of MT7621 SoC. > > > > Signed-off-by: Sergio Paracuellos > > --- > >

Re: [PATCH 2/2] Drivers: Staging: pi433: remove unsused case

2018-07-24 Thread Greg KH
On Sat, Jul 21, 2018 at 01:17:58PM +0100, Mark Railton wrote: > Removed a commented out case statement > > Signed-off-by: Mark Railton > --- > drivers/staging/pi433/rf69.c | 3 --- > 1 file changed, 3 deletions(-) Where is patch 1/2 of this series? And this patch doesn't apply at all, what

Re: [PATCH] staging: most: Use NULL pointer not plain integer

2018-07-24 Thread Greg Kroah-Hartman
On Mon, Jul 23, 2018 at 11:54:29AM +0100, Laurence Rochfort wrote: > Fix sparse warning: Using plain integer as NULL pointer > > Signed-off-by: Laurence Rochfort > --- > drivers/staging/most/dim2/dim2.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) This patch does not apply to my

[PATCH v3 4/4] drivers/soc/fsl/dpio: Convert DPIO documentation to .rst

2018-07-24 Thread Roy Pledge
Convert the Datapath I/O documentation to .rst format and move to the Documation/networking/dpaa2 directory Signed-off-by: Roy Pledge --- .../networking/dpaa2/dpio-driver.rst | 29 +++--- Documentation/networking/dpaa2/index.rst | 1 + 2 files changed,

[PATCH v3 0/4] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl

2018-07-24 Thread Roy Pledge
Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio directory to the drivers/soc/fsl directory. The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 Ethernet device driver from the

we edit images

2018-07-24 Thread Roland
I would like to speak with the person that managing photos for your company? We provide image editing like – photos cutting out and retouching. Enhancing your images is just a part of what we can do for your business. Whether you’re an ecommerce store or portrait photographer, real estate

Re: [PATCH v2 4/4] drivers/soc/fsl/dpio: Convert DPIO documentation to .rst

2018-07-24 Thread Roy Pledge
On 7/24/2018 9:52 AM, Horia Geanta wrote: > On 7/23/2018 8:00 PM, Roy Pledge wrote: >> Convert the Datapath I/O documentation to .rst format >> and move to the Documation/networking/dpaa2 directory > typo: ^^^ Documentation > >> Signed-off-by: Roy Pledge >> --- >>

Re: [PATCH v2 4/4] drivers/soc/fsl/dpio: Convert DPIO documentation to .rst

2018-07-24 Thread Horia Geanta
On 7/23/2018 8:00 PM, Roy Pledge wrote: > Convert the Datapath I/O documentation to .rst format > and move to the Documation/networking/dpaa2 directory typo: ^^^ Documentation > > Signed-off-by: Roy Pledge > --- > .../networking/dpaa2/dpio-driver.rst | 30 >

RE: [PATCH v3 0/4] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl

2018-07-24 Thread Ioana Ciocoi Radulescu
> -Original Message- > From: Horia Geanta > Sent: Tuesday, July 24, 2018 5:35 PM > To: Roy Pledge ; de...@driverdev.osuosl.org; linux- > arm-ker...@lists.infradead.org; gre...@linuxfoundation.org; Leo Li > > Cc: Laurentiu Tudor ; Ioana Ciocoi Radulescu > ; linux-ker...@vger.kernel.org; >

Re: [PATCH v3 0/4] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl

2018-07-24 Thread Horia Geanta
On 7/24/2018 5:21 PM, Roy Pledge wrote: > Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio > directory to the drivers/soc/fsl directory. > > The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) > hardware of NXP DPAA2 devices. This is a prerequiste for

[PATCH v6 00/18] crypto: Remove VLA usage

2018-07-24 Thread Kees Cook
For newly added CCs on this series: your Ack/Review would be very welcome! Especially for the ahash-to-shash conversion patches. v6: - make xcbc blocksize unconditional - add ahash-to-shash conversion patch series to entirely remove AHASH_REQUEST_ON_STACK from the kernel v5: - limit

[PATCH v3 2/4] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

2018-07-24 Thread Roy Pledge
Move the NXP DPIO (Datapath I/O Driver) out of the drivers/staging directory and into the drivers/soc/fsl directory. The DPIO driver enables access to Queue and Buffer Manager (QBMAN) hardware on NXP DPAA2 devices. This is a prerequisite to moving the DPAA2 Ethernet driver out of staging.

[PATCH v6 08/18] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this caps the skcipher request size similar to other limits and adds a sanity check at registration. Looking at instrumented tcrypt output, the largest is for lrw: crypt: testing lrw(aes) crypto_skcipher_set_reqsize: 8

[PATCH v6 06/18] crypto: qat: Remove VLA usage

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new upper bound for the stack buffer. Also adds a sanity check. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook ---

[PATCH v6 11/18] dm crypt: Convert essiv from ahash to shash

2018-07-24 Thread Kees Cook
In preparing to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct shash. By removing a layer of indirection this both improves performance and

[PATCH v6 01/18] crypto: xcbc: Remove VLA usage

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the maximum blocksize and adds a sanity check. For xcbc, the blocksize must always be 16, so use that, since it's already being enforced during instantiation. [1]

[PATCH v6 03/18] crypto: hash: Remove VLA usage

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this removes the VLAs in SHASH_DESC_ON_STACK (via crypto_shash_descsize()) by using the maximum allowable size (which is now more clearly captured in a macro), along with a few other cases. Similar limits are turned into macros as

[PATCH v6 17/18] crypto: ccm: Remove VLA usage

2018-07-24 Thread Kees Cook
From: Ard Biesheuvel In the quest to remove all stack VLA usage from the kernel[1], this drops AHASH_REQUEST_ON_STACK by preallocated the ahash request area with the skcipher area (which are not used at the same time). [1]

[PATCH v6 18/18] crypto: Remove AHASH_REQUEST_ON_STACK

2018-07-24 Thread Kees Cook
All users of AHASH_REQUEST_ON_STACK have been removed from the kernel, so drop it entirely so no VLAs get reintroduced by future users. Signed-off-by: Kees Cook --- include/crypto/hash.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/crypto/hash.h b/include/crypto/hash.h index

[PATCH v6 05/18] crypto alg: Introduce generic max blocksize and alignmask

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this exposes a new general upper bound on crypto blocksize and alignmask (higher than for the existing cipher limits) for VLA removal, and introduces new checks. At present, the highest cra_alignmask in the kernel is 63. The highest

[PATCH v6 09/18] ppp: mppe: Remove VLA usage

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK (and associated VLA) by switching to shash directly and keeping the associated descriptor allocated with the regular state on the heap. [1]

[PATCH v6 10/18] x86/power/64: Remove VLA usage

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK by switching to shash directly and allocating the descriptor in heap memory (which should be fine: the tfm has already been allocated there too). [1]

[PATCH v6 07/18] crypto: shash: Remove VLA usage in unaligned hashing

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the newly defined max alignment to perform unaligned hashing to avoid VLAs, and drops the helper function while adding sanity checks on the resulting buffer sizes. Additionally, the __aligned_largest macro is removed since

[PATCH v6 16/18] rxrpc: Reuse SKCIPHER_REQUEST_ON_STACK buffer

2018-07-24 Thread Kees Cook
The use of SKCIPHER_REQUEST_ON_STACK() will trigger FRAME_WARN warnings (when less than 2048) once the VLA is no longer hidden from the check: net/rxrpc/rxkad.c:398:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=] net/rxrpc/rxkad.c:242:1: warning: the

[PATCH v6 14/18] staging: rtl8192u: ieee80211: Convert from ahash to shash

2018-07-24 Thread Kees Cook
This is an identical change to the wireless/lib80211 of the same name. In preparing to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct shash. By

[PATCH v6 12/18] drbd: Convert from ahash to shash

2018-07-24 Thread Kees Cook
In preparing to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct shash. By removing a layer of indirection this both improves performance and

Re: [PATCH v6 17/18] crypto: ccm: Remove VLA usage

2018-07-24 Thread Ard Biesheuvel
On 24 July 2018 at 18:49, Kees Cook wrote: > From: Ard Biesheuvel > > In the quest to remove all stack VLA usage from the kernel[1], this > drops AHASH_REQUEST_ON_STACK by preallocated the ahash request area > with the skcipher area (which are not used at the same time). > -EGRAMMAR > [1] >

[PATCH v6 02/18] crypto: cbc: Remove VLA usage

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the upper bounds on blocksize. Since this is always a cipher blocksize, use the existing cipher max blocksize. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by:

[PATCH v6 15/18] staging: rtl8192e: ieee80211: Convert from ahash to shash

2018-07-24 Thread Kees Cook
This is an identical change to the wireless/lib80211 of the same name. In preparing to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct shash. By

[PATCH v6 13/18] wireless/lib80211: Convert from ahash to shash

2018-07-24 Thread Kees Cook
In preparing to remove all stack VLA usage from the kernel[1], this removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash to direct shash. By removing a layer of indirection this both improves performance and

[PATCH v6 04/18] dm: Remove VLA usage from hashes

2018-07-24 Thread Kees Cook
In the quest to remove all stack VLA usage from the kernel[1], this uses the new HASH_MAX_DIGESTSIZE from the crypto layer to allocate the upper bounds on stack usage. [1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com Signed-off-by: Kees Cook ---