Re: [dm-devel] [PATCH] dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()

2021-08-12 Thread Arne Welzel
Mikulas, On Tue, 10 Aug 2021, Mikulas Patocka wrote: > Reviewed-by: Mikulas Patocka > thank you for the review. After looking at the submitted patch again, seems more proper to use >= as the condition: > > + if (unlikely(percpu_counter_read_positive(&cc->n_allocated_pages) > > > dm_crypt_page

Re: [dm-devel] [PATCH 1/3] dm: introduce audit event module for device mapper

2021-08-12 Thread Casey Schaufler
On 8/12/2021 7:57 AM, Michael Weiß wrote: > To be able to send auditing events to user space, we introduce > a generic dm-audit module. It provides helper functions to emit > audit events through the kernel audit subsystem. We claim the > AUDIT_DM type=1336 out of the audit event messages range in

[dm-devel] [PATCH 2/3] dm integrity: log audit events for dm-integrity target

2021-08-12 Thread Michael Weiß
dm-integrity signals integrity violations by returning I/O errors to user space. To identify integrity violations by a controlling instance, the kernel audit subsystem can be used to emit audit events to user space. We use the new dm-audit submodule allowing to emit audit events on relevant I/O err

[dm-devel] [PATCH 3/3] dm crypt: log aead integrity violations to audit subsystem

2021-08-12 Thread Michael Weiß
Since dm-crypt target can be stacked on dm-integrity targets to provide authenticated encryption, integrity violations are recognized here during aead computation. We use the dm-audit submodule to signal those events to user space, too. The construction and destruction of crypt device mappings are

[dm-devel] [PATCH 1/3] dm: introduce audit event module for device mapper

2021-08-12 Thread Michael Weiß
To be able to send auditing events to user space, we introduce a generic dm-audit module. It provides helper functions to emit audit events through the kernel audit subsystem. We claim the AUDIT_DM type=1336 out of the audit event messages range in the corresponding userspace api in 'include/uapi/l

[dm-devel] [PATCH 0/3] dm: audit event logging

2021-08-12 Thread Michael Weiß
dm integrity and also stacked dm crypt devices track integrity violations internally. Thus, integrity violations could be polled from user space, e.g., by 'integritysetup status'. >From an auditing perspective, we only could see that there were a number of integrity violations, but not when and wh

Re: [dm-devel] [PATCH] dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()

2021-08-12 Thread Mikulas Patocka
On Thu, 12 Aug 2021, Arne Welzel wrote: > Mikulas, > > On Tue, 10 Aug 2021, Mikulas Patocka wrote: > > > Reviewed-by: Mikulas Patocka > > > > thank you for the review. After looking at the submitted patch again, > seems more proper to use >= as the condition: > > > > + if (unlikely(percpu_

Re: [dm-devel] [PATCH 2/3] dm integrity: log audit events for dm-integrity target

2021-08-12 Thread kernel test robot
Hi "Michael, Thank you for the patch! Yet something to improve: [auto build test ERROR on dm/for-next] [also build test ERROR on song-md/md-next pcmoore-audit/next v5.14-rc5 next-20210812] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patc

Re: [dm-devel] [PATCH] libmultipath: fix compile error with glibc-2.34+

2021-08-12 Thread Martin Wilck
Hello Lixiaokeng, On Mi, 2021-08-11 at 21:11 +0800, lixiaokeng wrote: > There is an error when complie with glibc-2.34: > comparison of integer expressions of different signedness: > 'size_t' {aka 'long unsigned int'} and 'long int' > [-Werror=sign-compare] > > The reason is that PTHREAD_STACK_MI

Re: [dm-devel] [Question] multipathd.service start failed when /var/run isn't mount

2021-08-12 Thread Martin Wilck
On Mo, 2021-07-26 at 11:28 -0500, Benjamin Marzinski wrote: > On Mon, Jul 26, 2021 at 08:22:49PM +0800, lixiaokeng wrote: > > > > > > After sdb mounted to /var, we can start multipathd service > > > > successfully. > > > > > > But when the binaries were compiled, if /var/run existed and was > > >

[dm-devel] [PATCH] libmultipath: avoid buffer size warning with systemd 240+

2021-08-12 Thread mwilck
From: Martin Wilck Since systemd commit e39b4d2 ("libudev: re-implement udev-monitor by sd_device_monitor"), udev_monitor_set_receive_buffer_size() returns 1 on success. Fix the test for the return value to avoid a misleading "failed to increase buffer size" warning. Signed-off-by: Martin Wilck

Re: [dm-devel] [PATCH 1/5] multipath.conf: fix typo in ghost_delay description

2021-08-12 Thread Martin Wilck
On Do, 2021-07-29 at 16:46 -0500, Benjamin Marzinski wrote: > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 5/5] libmultipath: deal with dynamic PTHREAD_STACK_MIN

2021-08-12 Thread Martin Wilck
On Do, 2021-07-29 at 16:46 -0500, Benjamin Marzinski wrote: > Starting in glibc-2.34 (commit 5d98a7da), PTHREAD_STACK_MIN is defined > as sysconf(_SC_THREAD_STACK_MIN) if _GNU_SOURCE is defined. sysconf() > returns a long and can, at least in theory, return -1.  This change > causes compilation to

Re: [dm-devel] [PATCH 2/5] mpathpersist: fail commands when no usable paths exist

2021-08-12 Thread Martin Wilck
On Do, 2021-07-29 at 16:46 -0500, Benjamin Marzinski wrote: > "mpathpersist -oCK " will return success if > it > is run on devices with no usable paths, but nothing is actually done. > The -L command will fail, but it should give up sooner, and with a more > helpful error message. > > Signed-off-

Re: [dm-devel] [PATCH 4/5] libmultipath: remove unneeded code in coalesce_paths

2021-08-12 Thread Martin Wilck
On Do, 2021-07-29 at 16:46 -0500, Benjamin Marzinski wrote: > The code at the end of coalesce_paths() removes a multipath device that > was just created/reloaded, if none of its path devices have pp->dev > set. > This code is very old, and no longer has any actual effect. Multipath > devices no lon

Re: [dm-devel] [PATCH 3/5] multipath: print warning if multipathd is not running.

2021-08-12 Thread Martin Wilck
On Do, 2021-07-29 at 16:46 -0500, Benjamin Marzinski wrote: > If multipath notices that multipath devices exist or were created, > and > multipathd is not running, it now prints a warning message, so users > are > notified of the issue. > > Signed-off-by: Benjamin Marzinski I'm not sure about th

Re: [dm-devel] [PATCH] libmultipath: fix compile error with glibc-2.34+

2021-08-12 Thread lixiaokeng
On 2021/8/12 19:17, Martin Wilck wrote: > Hello Lixiaokeng, > > On Mi, 2021-08-11 at 21:11 +0800, lixiaokeng wrote: >> There is an error when complie with glibc-2.34: >> comparison of integer expressions of different signedness: >> 'size_t' {aka 'long unsigned int'} and 'long int' >> [-Werror=s

Re: [dm-devel] [Question] multipathd.service start failed when /var/run isn't mount

2021-08-12 Thread lixiaokeng
On 2021/8/12 19:09, Martin Wilck wrote: > On Mo, 2021-07-26 at 11:28 -0500, Benjamin Marzinski wrote: >> On Mon, Jul 26, 2021 at 08:22:49PM +0800, lixiaokeng wrote: >>> > After sdb mounted to /var, we can start multipathd service > successfully. But when the binaries were compi

Re: [dm-devel] [PATCH v2 2/9] libmultipath: strbuf: simple api for growing string buffers

2021-08-12 Thread Martin Wilck
Hello Bart, On Mi, 2021-08-11 at 09:08 -0700, Bart Van Assche wrote: > On 8/11/21 8:41 AM, mwi...@suse.com wrote: > > Add an API for string buffers that grow in size as text is added. > > This API will be useful in several places of the multipath-tools > > code > > base. Add unit tests for these h