Re: [dm-devel] [PATCH 2/4] libmultipath: select resize action even if reload is forced

2023-02-01 Thread Martin Wilck
On Tue, 2023-01-31 at 13:34 -0600, Benjamin Marzinski wrote: > The ACT_RESIZE action is the same as the ACT_RELOAD action, except > that > it flushes outstanding IO because the device size is changing and > the new size might be too small for some of the outstanding IO. If > we've > detected a size

Re: [dm-devel] [PATCH 1/4] libmultipath: use select_reload_action in select_action

2023-02-01 Thread Martin Wilck
On Tue, 2023-01-31 at 13:34 -0600, Benjamin Marzinski wrote: > Since we have a function to set the action to reload, use it. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck > --- >  libmultipath/configure.c | 8 ++-- >  1 file changed, 2 insertions(+), 6 deletions(-) > > di

Re: [dm-devel] [PATCH 3/4] libmultipath: cleanup ACT_CREATE code in select_action

2023-02-01 Thread Martin Wilck
On Tue, 2023-01-31 at 13:34 -0600, Benjamin Marzinski wrote: > Combine the two separate blocks that set ACT_CREATE into one. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck > --- >  libmultipath/configure.c | 38 +- >  1 file changed, 17 inser

Re: [dm-devel] [PATCH 4/4] libmultipath: keep renames from stopping other multipath actions

2023-02-01 Thread Martin Wilck
On Tue, 2023-01-31 at 13:34 -0600, Benjamin Marzinski wrote: > If select_action() is called and a multipath device needs to be > renamed, > the code currently checks if force_reload is set, and if so, does the > reload after the rename.  But if force_reload isn't set, only the > rename > happens, r

Re: [dm-devel] [RFC PATCH v9 05/16] ipe: add userspace interface

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > From: Deven Bowers > > As is typical with LSMs, IPE uses securityfs as its interface with > userspace. for a complete list of the interfaces and the respective > inputs/outputs, please see the documentation under > admin-guide/LSM/ipe.rst > > Si

Re: [dm-devel] [RFC PATCH v9 09/16] block|security: add LSM blob to block_device

2023-02-01 Thread Fan Wu
On Tue, Jan 31, 2023 at 12:53:59AM -0800, Christoph Hellwig wrote: > On Mon, Jan 30, 2023 at 02:57:24PM -0800, Fan Wu wrote: > > From: Deven Bowers > > > > block_device structures can have valuable security properties, > > based on how they are created, and what subsystem manages them. > > That'

Re: [dm-devel] [RFC PATCH v9 03/16] ipe: add evaluation loop and introduce 'boot_verified' as a trust provider

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > From: Deven Bowers > > IPE must have a centralized function to evaluate incoming callers > against IPE's policy. This iteration of the policy against the rules > for that specific caller is known as the evaluation loop. > > In addition, IPE is d

Re: [dm-devel] [RFC PATCH v9 10/16] dm-verity: consume root hash digest and signature data via LSM hook

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > From: Deven Bowers > > dm-verity provides a strong guarantee of a block device's integrity. As > a generic way to check the integrity of a block device, it provides > those integrity guarantees to its higher layers, including the filesystem > lev

Re: [dm-devel] [RFC PATCH v9 13/16] ipe: enable support for fs-verity as a trust provider

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > Enable IPE policy authors to indicate trust for a singular fsverity > file, identified by the digest information, through "fsverity_digest" > and all files using fsverity's builtin signatures via > "fsverity_signature". > > This enables file-level

Re: [dm-devel] [RFC PATCH v9 00/16] Integrity Policy Enforcement LSM (IPE)

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > Overview: > - > > IPE is a Linux Security Module which takes a complimentary approach to > access control. Whereas existing mandatory access control mechanisms > base their decisions on labels and paths, IPE instead determines > whether or

Re: [dm-devel] [RFC PATCH v9 00/16] Integrity Policy Enforcement LSM (IPE)

2023-02-01 Thread Fan Wu
On Tue, Jan 31, 2023 at 03:22:05PM +0100, Roberto Sassu wrote: > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > IPE has two known gaps: > > > > 1. IPE cannot verify the integrity of anonymous executable memory, such as > > the trampolines created by gcc closures and libffi (<3.4.2), or JIT

Re: [dm-devel] [RFC PATCH v9 06/16] ipe: add LSM hooks on execution and kernel read

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > From: Deven Bowers > > IPE's initial goal is to control both execution and the loading of > kernel modules based on the system's definition of trust. It > accomplishes this by plugging into the security hooks for > bprm_check_security, file_mprot

Re: [dm-devel] [RFC PATCH v9 02/16] ipe: add policy parser

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > From: Deven Bowers > > IPE's interpretation of the what the user trusts is accomplished through > its policy. IPE's design is to not provide support for a single trust > provider, but to support multiple providers to enable the end-user to > choo

Re: [dm-devel] [RFC PATCH v9 07/16] uapi|audit|ipe: add ipe auditing support

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > From: Deven Bowers > > Users of IPE require a way to identify when and why an operation fails, > allowing them to both respond to violations of policy and be notified > of potentially malicious actions on their systens with respect to IPE > itsel

Re: [dm-devel] [PATCH v2 00/21] blksnap - block devices snapshots module

2023-02-01 Thread Mason Giles
Hi Mike and Sergei, > > It’s not about Veeam at all. I am sure that my work will help many > > backup vendors and average users to build more robust and efficient backup > > tools. > > So, the argument that I do it just because Veeam needs it does not > > hold any water – I know that many peopl

Re: [dm-devel] [RFC PATCH v9 07/16] uapi|audit|ipe: add ipe auditing support

2023-02-01 Thread Steve Grubb
Hello, On Monday, January 30, 2023 5:57:22 PM EST Fan Wu wrote: > From: Deven Bowers > > Users of IPE require a way to identify when and why an operation fails, > allowing them to both respond to violations of policy and be notified > of potentially malicious actions on their systens with respec

Re: [dm-devel] [RFC PATCH v9 03/16] ipe: add evaluation loop and introduce 'boot_verified' as a trust provider

2023-02-01 Thread Roberto Sassu
On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > From: Deven Bowers > > IPE must have a centralized function to evaluate incoming callers > against IPE's policy. This iteration of the policy against the rules > for that specific caller is known as the evaluation loop. Not sure if you check the

Re: [dm-devel] [PATCH v2 02/21] block, blkfilter: Block Device Filtering Mechanism

2023-02-01 Thread Sergei Shtepa
On 2/1/23 00:58, Mike Snitzer wrote: > Subject: > Re: [PATCH v2 02/21] block, blkfilter: Block Device Filtering Mechanism > From: > Mike Snitzer > Date: > 2/1/23, 00:58 > > To: > Sergei Shtepa > CC: > ax...@kernel.dk, cor...@lwn.net, linux-bl...@vger.kernel.org, > linux-...@vger.kernel.org, l

Re: [dm-devel] [PATCH 4/4] libmultipath: keep renames from stopping other multipath actions

2023-02-01 Thread Benjamin Marzinski
On Wed, Feb 01, 2023 at 08:00:25AM +, Martin Wilck wrote: > On Tue, 2023-01-31 at 13:34 -0600, Benjamin Marzinski wrote: > > If select_action() is called and a multipath device needs to be > > renamed, > > the code currently checks if force_reload is set, and if so, does the > > reload after th

[dm-devel] [PATCH v2 4/4] libmultipath: keep renames from stopping other multipath actions

2023-02-01 Thread Benjamin Marzinski
If select_action() is called and a multipath device needs to be renamed, the code currently checks if force_reload is set, and if so, does the reload after the rename. But if force_reload isn't set, only the rename happens, regardless of what other actions are needed. This can happen if multipathd

[dm-devel] [PATCH v2 2/4] libmultipath: select resize action even if reload is forced

2023-02-01 Thread Benjamin Marzinski
The ACT_RESIZE action is the same as the ACT_RELOAD action, except that it flushes outstanding IO because the device size is changing and the new size might be too small for some of the outstanding IO. If we've detected a size change, and a forced reload is requested, we still need to flush the IO

[dm-devel] [PATCH v2 1/4] libmultipath: use select_reload_action in select_action

2023-02-01 Thread Benjamin Marzinski
Since we have a function to set the action to reload, use it. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index e689f8a7..050b984a 100644 --- a/libmu

[dm-devel] [PATCH v2 3/4] libmultipath: cleanup ACT_CREATE code in select_action

2023-02-01 Thread Benjamin Marzinski
Combine the two separate blocks that set ACT_CREATE into one. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 38 +- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 6811

[dm-devel] [PATCH v2 0/4] multipath: fix multipathd renaming issue

2023-02-01 Thread Benjamin Marzinski
If a multipath device needs to be renamed and reloaded when multipathd starts, it will only get reloaded. This can happen if the multipath configuration is different between the initramfs and regular filesystem. The only thing that can happen along with a rename is a force reload. This patchset ma

Re: [dm-devel] md: dm-table: ensure dev_t is initialized

2023-02-01 Thread Mike Snitzer
On Tue, Jan 31 2023 at 6:15P -0500, Tomas Melin wrote: > Avoid returning uninitialized value in case > lookup fails. > > Signed-off-by: Tomas Melin > --- > drivers/md/dm-table.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/md/dm-table.c b/drivers/md/dm-tab

Re: [dm-devel] [PATCH 4/4] libmultipath: keep renames from stopping other multipath actions

2023-02-01 Thread Martin Wilck
On Wed, 2023-02-01 at 08:39 -0600, Benjamin Marzinski wrote: > On Wed, Feb 01, 2023 at 08:00:25AM +, Martin Wilck wrote: > > > > > This code makes we wonder if we should transform the ACT_... enum > > into > > a bitmap of required actions that would be ORed together. > > At least ACT_RENAME i

Re: [dm-devel] [RFC PATCH v9 05/16] ipe: add userspace interface

2023-02-01 Thread Fan Wu
On Tue, Jan 31, 2023 at 11:49:44AM +0100, Roberto Sassu wrote: > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > From: Deven Bowers > > + > > +/** > > + * new_policy - Write handler for the securityfs node, "ipe/new_policy". > > + * @f: Supplies a file structure representing the securityfs no

Re: [dm-devel] [RFC v2 0/5] Support kdump with LUKS encryption by reusing LUKS volume key

2023-02-01 Thread Baoquan He
Hi Coiby, On 11/04/22 at 07:29pm, Coiby Xu wrote: > RFC v2 > - libcryptsetup interacts with the kernel via sysfs instead of "hacking" >dm-crypt >- to save a kdump copy of the LUKS volume key in 1st kernel >- to add a logon key using the copy for libcryptsetup in kdump kernel > [Mila

Re: [dm-devel] [PATCH v2 02/21] block, blkfilter: Block Device Filtering Mechanism

2023-02-01 Thread Fabio Fantoni
Il 01/02/2023 00:58, Mike Snitzer ha scritto: On Fri, Dec 09 2022 at 9:23P -0500, Sergei Shtepa wrote: Allows to attach block device filters to the block devices. Kernel modules can use this functionality to extend the capabilities of the block layer. Signed-off-by: Sergei Shtepa --- bloc

Re: [dm-devel] [RFC PATCH v9 02/16] ipe: add policy parser

2023-02-01 Thread Fan Wu
On Tue, Jan 31, 2023 at 11:53:27AM +0100, Roberto Sassu wrote: > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > From: Deven Bowers > > Uhm, memory leak? Also below. I suggest to use kmemleak. > > Roberto > Nice catch and thanks for the suggestion, I used kmemleak and detected several inco

Re: [dm-devel] [RFC PATCH v9 10/16] dm-verity: consume root hash digest and signature data via LSM hook

2023-02-01 Thread Fan Wu
On Tue, Jan 31, 2023 at 02:22:01PM +0100, Roberto Sassu wrote: > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > From: Deven Bowers > > > > dm-verity provides a strong guarantee of a block device's integrity. As > > a generic way to check the integrity of a block device, it provides > > thos

Re: [dm-devel] [RFC PATCH v9 13/16] ipe: enable support for fs-verity as a trust provider

2023-02-01 Thread Fan Wu
On Tue, Jan 31, 2023 at 03:00:08PM +0100, Roberto Sassu wrote: > On Mon, 2023-01-30 at 14:57 -0800, Fan Wu wrote: > > +/** > > + * evaluate_fsv_sig_false - Analyze @ctx against a fsv sig false property. > > + * @ctx: Supplies a pointer to the context being evaluated. > > + * @p: Supplies a pointer

Re: [dm-devel] [RFC PATCH v9 16/16] documentation: add ipe documentation

2023-02-01 Thread Fan Wu
On Tue, Jan 31, 2023 at 10:59:59AM +0700, Bagas Sanjaya wrote: > On Mon, Jan 30, 2023 at 02:57:31PM -0800, Fan Wu wrote: > > What about wordings below instead? Thanks for the review! > > -IPE policy supports comments. The character '#' will function as a > -comment, ignoring all characters to t

[dm-devel] [PATCH] dm-verity: Remove WQ_UNBOUND.

2023-02-01 Thread Nathan Huckleberry
Setting WQ_UNBOUND increases scheduler latency on ARM64. This is likely due to the asymmetric architecture of ARM64 processors. I've been unable to reproduce the results that claim WQ_UNBOUND gives a performance boost on x86-64. This flag is causing performance issues for multiple subsystems wit