[dm-devel] [PATCH] dm zoned: select CONFIG_CRC32

2021-01-04 Thread Arnd Bergmann
From: Arnd Bergmann Without crc32 support, this driver fails to link: arm-linux-gnueabi-ld: drivers/md/dm-zoned-metadata.o: in function `dmz_write_sb': dm-zoned-metadata.c:(.text+0xe98): undefined reference to `crc32_le' arm-linux-gnueabi-ld: drivers/md/dm-zoned-metadata.o: in function

Re: [PATCH] compat_ioctl: fix reimplemented SG_IO handling causing -EINVAL from sg_io()

2019-10-09 Thread Arnd Bergmann
On Wed, Sep 18, 2019 at 5:35 PM Steffen Maier wrote: > > scsi_cmd_ioctl() had hdr as on stack auto variable and called > copy_{from,to}_user with the address operator and sizeof(hdr). > > After the refactoring, {get,put}_sg_io_hdr() takes a pointer > So the copy_{from,to}_user within the new

Re: [dm-devel] [PATCH v8 7/9] crypto: qat: Remove VLA usage

2018-09-26 Thread Arnd Bergmann
On Wed, Sep 26, 2018 at 10:44 AM Ard Biesheuvel wrote: > > On Tue, 25 Sep 2018 at 18:12, Arnd Bergmann wrote: > > > > On Tue, Aug 7, 2018 at 11:18 PM Kees Cook wrote: > > > > > > In the quest to remove all stack VLA usage from the kernel[1], this uses >

Re: [dm-devel] [PATCH v8 7/9] crypto: qat: Remove VLA usage

2018-09-25 Thread Arnd Bergmann
On Tue, Aug 7, 2018 at 11:18 PM Kees Cook wrote: > > 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] >

Re: [dm-devel] [PATCH 4/5] crypto: Add IV generation templates

2018-07-19 Thread Arnd Bergmann
On Thu, Jul 19, 2018 at 3:46 AM, Xiongfeng Wang wrote: > Hi, > > On 2018/7/19 1:17, Milan Broz wrote: >> On 18/07/18 18:46, Mark Brown wrote: >>> On Wed, Jul 18, 2018 at 10:16:05AM +0200, Milan Broz wrote: >>> So we are here again and moving INTERNAL dm-crypt functionality into

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-18 Thread Arnd Bergmann
On Wed, Jul 18, 2018 at 5:19 PM, Ard Biesheuvel wrote: > On 18 July 2018 at 23:50, Ard Biesheuvel wrote: >> On 18 July 2018 at 05:59, Arnd Bergmann wrote: >>> On Sun, Jul 15, 2018 at 6:28 AM, Kees Cook wrote: >>>> >>>> After my ahash to shash conversio

Re: [dm-devel] [PATCH 0/5] crypto: add IV generation templates

2018-07-18 Thread Arnd Bergmann
On Wed, Jul 18, 2018 at 9:30 AM, Xiongfeng Wang wrote: > > I tested the performance of software implemented ciphers before and after > applying this patchset. The performance didn't change much except for > slight regression when writting. The detail information is as follows. > > The command I

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-17 Thread Arnd Bergmann
On Sun, Jul 15, 2018 at 6:28 AM, Kees Cook wrote: > > After my ahash to shash conversions, only ccm is left as an ahash > user, since it actually uses sg. But with the hard-coded value reduced > to 376, this doesn't trip the frame warnings any more. :) > > I'll send an updated series soon. Maybe

Re: [dm-devel] [PATCH] dm crypt: Convert essiv from ahash to shash

2018-07-16 Thread Arnd Bergmann
On Mon, Jul 16, 2018 at 5:59 AM, Kees Cook wrote: > 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. The stack

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-16 Thread Arnd Bergmann
On Mon, Jul 16, 2018 at 5:39 AM, Kees Cook wrote: > On Sun, Jul 15, 2018 at 5:01 PM, Herbert Xu > wrote: >> On Sat, Jul 14, 2018 at 07:59:09PM -0700, Kees Cook wrote: >>> On Sat, Jul 14, 2018 at 7:44 PM, Herbert Xu >>> wrote: >>> > On Fri, Jul 13, 2018 at 08:07:10PM -0700, Kees Cook wrote:

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-13 Thread Arnd Bergmann
On Fri, Jul 13, 2018 at 8:00 AM, Kees Cook wrote: > On Thu, Jul 12, 2018 at 10:20 PM, Herbert Xu > wrote: >> On Thu, Jul 12, 2018 at 10:17:29PM -0700, Kees Cook wrote: >>> What is the correct value to use for AHASH_REQUEST_ON_STACK? >> >> As I said to arrive at a fixed value you should examine

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-12 Thread Arnd Bergmann
On Thu, Jul 12, 2018 at 10:17 PM, Kees Cook wrote: > On Thu, Jul 12, 2018 at 9:02 AM, Arnd Bergmann wrote: >> On Wed, Jul 11, 2018 at 10:36 PM, Kees Cook wrote: >>> Several uses of AHASH_REQUEST_ON_STACK() will trigger FRAME_WARN warnings >>> (when less than 2048

Re: [dm-devel] [PATCH v4 13/14] rxrpc: Prepare to remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-07-12 Thread Arnd Bergmann
On Thu, Jul 12, 2018 at 10:30 PM, Kees Cook wrote: > On Thu, Jul 12, 2018 at 1:23 PM, Kees Cook wrote: >> On Thu, Jul 12, 2018 at 8:11 AM, Arnd Bergmann wrote: >>> On Wed, Jul 11, 2018 at 10:36 PM, Kees Cook wrote: >>>> Two uses of SKCIPHER_REQUEST_ON_STACK() wi

Re: [dm-devel] [PATCH v4 11/14] treewide: Prepare to remove VLA usage for AHASH_REQUEST_ON_STACK

2018-07-12 Thread Arnd Bergmann
On Wed, Jul 11, 2018 at 10:36 PM, Kees Cook wrote: > Several uses of AHASH_REQUEST_ON_STACK() will trigger FRAME_WARN warnings > (when less than 2048) once the VLA is no longer hidden from the check: > > drivers/block/drbd/drbd_worker.c:325:1: warning: the frame size of 1112 bytes > is larger

Re: [dm-devel] [PATCH v4 13/14] rxrpc: Prepare to remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-07-12 Thread Arnd Bergmann
On Wed, Jul 11, 2018 at 10:36 PM, Kees Cook wrote: > Two uses 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

Re: [dm-devel] [PATCH v3 4/9] dm integrity: Remove VLA usage

2018-06-29 Thread Arnd Bergmann
On Fri, Jun 29, 2018 at 2:28 AM, Kees Cook wrote: > diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c > index 86438b2f10dd..85e8ce1625a2 100644 > --- a/drivers/md/dm-integrity.c > +++ b/drivers/md/dm-integrity.c > @@ -521,7 +521,12 @@ static void section_mac(struct

Re: [dm-devel] [PATCH 11/11] crypto: skcipher: Remove VLA usage for SKCIPHER_REQUEST_ON_STACK

2018-06-20 Thread Arnd Bergmann
On Wed, Jun 20, 2018 at 9:04 PM, Kees Cook wrote: > 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. > > > +#define SKCIPHER_MAX_REQSIZE (PAGE_SIZE / 8) > + > #define

[dm-devel] [PATCH] dm: writecache: fix format string warning

2018-05-28 Thread Arnd Bergmann
definition of macro 'DMEMIT' 0 : scnprintf(result + sz, maxlen - sz, x)) ^ The code is otherwise correct, so we just need to shut up the warning, which can be done using an extra type cast. Fixes: bb15b431d650 ("dm: add writecache target")

[dm-devel] [PATCH] dm: writecache: add DAX dependency

2018-05-28 Thread Arnd Bergmann
to `dax_direct_access' dm-writecache.c:(.text+0x21cc): undefined reference to `dax_read_unlock' It seems wrong to require DAX in order to build the writecache driver, but that at least avoids randconfig build errors. Fixes: bb15b431d650 ("dm: add writecache target") Signed-off-by: Arn

[dm-devel] [PATCH] dm: fix DAX dependency

2018-04-04 Thread Arnd Bergmann
. Fixes: 4de1c562f7e9 ("dax, dm: allow device-mapper to operate without dax support") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- The regression only showed up in linux-next at the start of the merge window. Any idea what happened? --- drivers/md/Kconfig | 1 + 1 file changed, 1 in

Re: [dm-devel] dm-bufio: avoid false-positive Wmaybe-uninitialized warning

2018-03-07 Thread Arnd Bergmann
On Wed, Mar 7, 2018 at 2:29 AM, Mike Snitzer <snit...@redhat.com> wrote: > On Tue, Mar 06 2018 at 4:33pm -0500, > Arnd Bergmann <a...@arndb.de> wrote: > >> On Thu, Feb 22, 2018 at 5:04 PM, Mike Snitzer <snit...@redhat.com> wrote: >> > On Thu, Feb 22

Re: [dm-devel] dm-bufio: avoid false-positive Wmaybe-uninitialized warning

2018-03-06 Thread Arnd Bergmann
On Thu, Feb 22, 2018 at 5:04 PM, Mike Snitzer <snit...@redhat.com> wrote: > On Thu, Feb 22 2018 at 10:56am -0500, > Arnd Bergmann <a...@arndb.de> wrote: > > Mikulas already sent a fix for this: > https://patchwork.kernel.org/patch/10211631/ > > But I like yours

[dm-devel] [PATCH] dm-bufio: avoid false-positive Wmaybe-uninitialized warning

2018-02-22 Thread Arnd Bergmann
of nG dependent on arm64_kernel_unmapped_at_el0()") Link: https://patchwork.kernel.org/patch/9692829/ Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/md/dm-bufio.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-

Re: [dm-devel] dm: fix uninitialized variable reference

2017-12-11 Thread Arnd Bergmann
On Mon, Dec 11, 2017 at 2:50 PM, Mike Snitzer <snit...@redhat.com> wrote: > On Mon, Dec 11 2017 at 6:33am -0500, > Arnd Bergmann <a...@arndb.de> wrote: >> > > Already resolved this thanks to Stephen Rothwell's earlier > (substantially more discrete) mail. > &g

[dm-devel] [PATCH] dm: fix uninitialized variable reference

2017-12-11 Thread Arnd Bergmann
' variable. Fixes: aecefd4919de ("dm: fix __send_changing_extent_only() to send first bio and chain remainder") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- I did not test this or give the patch much thought, this just seemed to be the most likely fix I could come up with in a short

[dm-devel] [PATCH 2/2] dm integrity: use init_completion instead of COMPLETION_INITIALIZER_ONSTACK

2017-08-15 Thread Arnd Bergmann
: cd8084f91c02 ("locking/lockdep: Apply crossrelease to completions") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- The patch causing this is currently part of linux-next, scheduled for 4.14, so it would be good to have this in the same release. --- drivers/md/dm-

[dm-devel] [PATCH 3.18-stable] dm bufio: hide bogus warning

2017-04-21 Thread Arnd Bergmann
lared here The warning disappeared on later kernels with this commit: be0c37c985ed ("MIPS: Rearrange PTE bits into fixed positions.") I assume this only happened because it changed some inlining decisions. On 3.18.y, we can shut up the warning by adding an extra initialization. Signed-o

[dm-devel] [PATCH] dm block manager: use do/while(0) for empty macros

2016-10-25 Thread Arnd Bergmann
tional") Signed-off-by: Arnd Bergmann <a...@arndb.de> --- drivers/md/persistent-data/dm-block-manager.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/md/persistent-data/dm-block-manager.c b/drivers/md/persistent-data/dm-block-manager.c index b619c38

[dm-devel] [PATCH] dm raid: don't use 'const' in function return

2016-06-16 Thread Arnd Bergmann
A newly introduced function has 'const int' as the return type, but as "make W=1" reports, that has no meaning: drivers/md/dm-raid.c:510:18: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] This changes the return type to plain 'int'. Signed-of