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

2020-08-10 Thread James Bottomley
On Mon, 2020-08-10 at 19:36 -0400, Chuck Lever wrote: > > On Aug 10, 2020, at 11:35 AM, James Bottomley > > wrote: > > On Sun, 2020-08-09 at 13:16 -0400, Mimi Zohar wrote: > > > On Sat, 2020-08-08 at 13:47 -0400, Chuck Lever wrote: [...] > > > > The first priority (for me, anyway) therefore is get

Re: [dm-devel] [PATCH 69/74] libmultipath: disassemble_map(): get rid of "is_daemon" argument

2020-08-10 Thread Benjamin Marzinski
On Wed, Aug 05, 2020 at 10:05:19PM +0200, Martin Wilck wrote: > On Sun, 2020-07-19 at 00:26 -0500, Benjamin Marzinski wrote: > > On Thu, Jul 09, 2020 at 12:51:40PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > The reason for the is_daemon parameter in disassemble_map() lies >

Re: [dm-devel] nvme: explicitly use normal NVMe error handling when appropriate

2020-08-10 Thread Mike Snitzer
On Mon, Aug 10 2020 at 11:32pm -0400, Chao Leng wrote: > > > On 2020/8/11 1:22, Mike Snitzer wrote: > >On Mon, Aug 10 2020 at 10:36am -0400, > >Mike Snitzer wrote: > > > >>On Fri, Aug 07 2020 at 7:35pm -0400, > >>Sagi Grimberg wrote: > >> > >>> > >Hey Mike, > >... > I think NVMe can

[dm-devel] [PATCH V2] vector: return false if realloc fails in vector_alloc_slot func

2020-08-10 Thread Zhiqiang Liu
In vector_alloc_slot func, if REALLOC fails, it means new slot allocation fails. However, it just update v->allocated and then return the old v->slot without new slot. So, the caller will take the last old slot as the new allocated slot, and use it by calling vector_set_slot func. Finally, the da

Re: [dm-devel] Recent multipath-tools patches from Huawei

2020-08-10 Thread Zhiqiang Liu
On 2020/8/10 22:34, Martin Wilck wrote: > Hi Liu, > > thanks again for your valuable contributions and meticulous code > review. I've added your patches in my upstream-queue branch now: > > https://github.com/openSUSE/multipath-tools/commits/upstream-queue > > Not applied yet: > > - libmul

Re: [dm-devel] [PATCH 44/54] libmultipath: adopt_paths(): don't bail out on single path failure

2020-08-10 Thread Benjamin Marzinski
On Wed, Aug 05, 2020 at 02:05:00PM +0200, Martin Wilck wrote: > On Fri, 2020-07-17 at 16:25 -0500, Benjamin Marzinski wrote: > > On Thu, Jul 09, 2020 at 12:36:13PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > If pathinfo fails for one path to be adopted, we currently > > > f

Re: [dm-devel] [PATCH 3/6] libmultipath: remove code duplication in path counting

2020-08-10 Thread Benjamin Marzinski
On Thu, Aug 06, 2020 at 10:48:12AM +, Martin Wilck wrote: > On Mon, 2020-07-27 at 14:24 -0500, Benjamin Marzinski wrote: > > pathcountgr() is never used except by pathcount(), and neither is the > > special case for PATH_WILD. Simplify this and make one function that > > is > > used by both pat

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

2020-08-10 Thread James Morris
On Fri, 7 Aug 2020, Mimi Zohar wrote: > > > Are you planning to attend Plumbers? Perhaps we could propose a BoF > > > session on this topic. > > > > That sounds like a good idea. > > Other than it is already sold out. Mimi advised me off-list that she is able to attend, so I've submitted a Bo

Re: [dm-devel] [PATCH V2] libmultipath: free pp if store_path fails in disassemble_map

2020-08-10 Thread Martin Wilck
On Mon, 2020-08-10 at 14:07 -0500, Benjamin Marzinski wrote: > On Mon, Aug 10, 2020 at 02:20:27PM +0200, Martin Wilck wrote: > > Hello Liu, > > > > On Fri, 2020-07-24 at 09:40 +0800, Zhiqiang Liu wrote: > > > In disassemble_map func, one pp will be allocated and stored in > > > pgp->paths. However

Re: [dm-devel] [PATCH V2] libmultipath: free pp if store_path fails in disassemble_map

2020-08-10 Thread Benjamin Marzinski
On Mon, Aug 10, 2020 at 02:20:27PM +0200, Martin Wilck wrote: > Hello Liu, > > On Fri, 2020-07-24 at 09:40 +0800, Zhiqiang Liu wrote: > > In disassemble_map func, one pp will be allocated and stored in > > pgp->paths. However, if store_path fails, pp will not be freed, > > then memory leak problem

Re: [dm-devel] [PATCH 08/35] libmultipath: create bitfield abstraction

2020-08-10 Thread Martin Wilck
Hi Ben, On Mon, 2020-08-10 at 13:05 -0500, Benjamin Marzinski wrote: > On Tue, Aug 04, 2020 at 09:35:08PM +0200, Martin Wilck wrote: > > On Tue, 2020-08-04 at 11:26 -0500, Benjamin Marzinski wrote: > > > > > > I'm also still fuzzy on why we want to support zero length > > > bitfields. > > > Since

Re: [dm-devel] [PATCH 08/35] libmultipath: create bitfield abstraction

2020-08-10 Thread Benjamin Marzinski
On Tue, Aug 04, 2020 at 09:35:08PM +0200, Martin Wilck wrote: > On Tue, 2020-08-04 at 11:26 -0500, Benjamin Marzinski wrote: > > On Tue, Aug 04, 2020 at 05:18:18PM +0200, Martin Wilck wrote: > > > On Tue, 2020-08-04 at 17:04 +0200, Martin Wilck wrote: > > > > On Thu, 2020-07-16 at 16:17 -0500, Benj

[dm-devel] [PATCH] nvme: explicitly use normal NVMe error handling when appropriate

2020-08-10 Thread Mike Snitzer
On Mon, Aug 10 2020 at 10:36am -0400, Mike Snitzer wrote: > On Fri, Aug 07 2020 at 7:35pm -0400, > Sagi Grimberg wrote: > > > > > >>Hey Mike, ... > > >I think NVMe can easily fix this by having an earlier stage of checking, > > >e.g. nvme_local_retry_req(), that shortcircuits ever getting to

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

2020-08-10 Thread James Bottomley
On Mon, 2020-08-10 at 12:35 -0400, Mimi Zohar wrote: > On Mon, 2020-08-10 at 08:35 -0700, James Bottomley wrote: [...] > > > Up to now, verifying remote filesystem file integrity has been > > > out of scope for IMA. With fs-verity file signatures I can at > > > least grasp how remote file integri

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

2020-08-10 Thread James Bottomley
On Sun, 2020-08-09 at 13:16 -0400, Mimi Zohar wrote: > On Sat, 2020-08-08 at 13:47 -0400, Chuck Lever wrote: > > > On Aug 5, 2020, at 2:15 PM, Mimi Zohar > > > wrote: > > > > > > If block layer integrity was enough, there wouldn't have been a > > > need for fs-verity. Even fs-verity is limite

Re: [dm-devel] nvme: restore use of blk_path_error() in nvme_complete_rq()

2020-08-10 Thread Mike Snitzer
Hi John, I appreciate your insight about ACRE. And that NVME_SC_CMD_INTERRUPTED is really just a preview for the kind of NVMe error handling advances to come. But, because I started harping about blk_path_error() I got you hyper-focused on it and that led to all your thinking about me wanting to

Re: [dm-devel] nvme: restore use of blk_path_error() in nvme_complete_rq()

2020-08-10 Thread Mike Snitzer
On Fri, Aug 07 2020 at 7:35pm -0400, Sagi Grimberg wrote: > > >>Hey Mike, > >> > The point is: blk_path_error() has nothing to do with NVMe errors. > This is dm-multipath logic stuck in the middle of the NVMe error > handling code. > >>> > >>>No, it is a means to have multiple subsy

[dm-devel] Recent multipath-tools patches from Huawei

2020-08-10 Thread Martin Wilck
Hi Liu, thanks again for your valuable contributions and meticulous code review. I've added your patches in my upstream-queue branch now: https://github.com/openSUSE/multipath-tools/commits/upstream-queue Not applied yet: - libmultipath: free pp if store_path fails in disassemble_map: As n

Re: [dm-devel] [dm- devel][PATCH] vector: return null when realloc fails in vector_alloc_slot func

2020-08-10 Thread Zhiqiang Liu
On 2020/8/10 21:48, Martin Wilck wrote: > Hello Liu, > > On Fri, 2020-07-31 at 18:41 +0800, Zhiqiang Liu wrote: >> In vector_alloc_slot func, if REALLOC fails, it means new slot >> allocation fails. However, it just update v->allocated and then >> return the old v->slot without new slot. So, th

Re: [dm-devel] [dm- devel][PATCH] vector: return null when realloc fails in vector_alloc_slot func

2020-08-10 Thread Martin Wilck
Hello Liu, On Fri, 2020-07-31 at 18:41 +0800, Zhiqiang Liu wrote: > In vector_alloc_slot func, if REALLOC fails, it means new slot > allocation fails. However, it just update v->allocated and then > return the old v->slot without new slot. So, the caller will take > the last old slot as the new al

Re: [dm-devel] [PATCH] libmultipath: fix a memory leak in set_ble_device

2020-08-10 Thread Martin Wilck
Hello Lixiaokeng, On Thu, 2020-07-30 at 21:27 +0800, lixiaokeng wrote: > Hi. > I'm very sorry for subject mistake in first mail. > > In set_ble_device func, if blist is NULL or ble is NULL, > the vendor and product isn't free. We think it is not > reasonable that strdup(XXX) is used as set_ble_

Re: [dm-devel] [PATCH V2] libmultipath: free pp if store_path fails in disassemble_map

2020-08-10 Thread Zhiqiang Liu
On 2020/8/10 20:20, Martin Wilck wrote: > Hello Liu, > > On Fri, 2020-07-24 at 09:40 +0800, Zhiqiang Liu wrote: >> In disassemble_map func, one pp will be allocated and stored in >> pgp->paths. However, if store_path fails, pp will not be freed, >> then memory leak problem occurs. >> >> Here, w

Re: [dm-devel] [PATCH V2] libmultipath: free pp if store_path fails in disassemble_map

2020-08-10 Thread Martin Wilck
Hello Liu, On Fri, 2020-07-24 at 09:40 +0800, Zhiqiang Liu wrote: > In disassemble_map func, one pp will be allocated and stored in > pgp->paths. However, if store_path fails, pp will not be freed, > then memory leak problem occurs. > > Here, we will call free_path to free pp when store_path fail

Re: [dm-devel] [dm- devel][PATCH] checker: add input check of state in checker_state_name func

2020-08-10 Thread Zhiqiang Liu
On 2020/8/10 18:17, Martin Wilck wrote: > On Mon, 2020-08-10 at 09:14 +0800, Zhiqiang Liu wrote: >> In checker_state_name func, we donot check whether input i >> is valid. It may cause array access violation problem. >> >> Signed-off-by: Zhiqiang Liu >> --- >> libmultipath/checkers.c | 26

Re: [dm-devel] [dm- devel][PATCH] checker: add input check of state in checker_state_name func

2020-08-10 Thread Martin Wilck
On Mon, 2020-08-10 at 09:14 +0800, Zhiqiang Liu wrote: > In checker_state_name func, we donot check whether input i > is valid. It may cause array access violation problem. > > Signed-off-by: Zhiqiang Liu > --- > libmultipath/checkers.c | 26 +++--- > libmultipath/checkers.h