Re: [dm-devel] clean up is partition checks

2020-09-14 Thread Christoph Hellwig
Jens, can you pick this series up? -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH 6/6] libmultipath: check udev* return value in _find_path_by_syspath

2020-09-14 Thread lixiaokeng
We check udev_device_get_syspath return value before dereference it. Signed-off-by: Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmultipath/foreign/nvme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libmultipath/foreign/nvme.c b/libmultipat

[dm-devel] [PATCH 5/6] libmultipath: check udev* renturn value in get_ctrl_blkdev

2020-09-14 Thread lixiaokeng
We check return value of udev_device_get_devtype before dereference it. Signed-off-by:Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmultipath/foreign/nvme.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmultipath/foreign/nvme.c b/libmultipa

[dm-devel] [PATCH 4/6] libmultipath: check udev* return value in trigger_partitions_udev_change

2020-09-14 Thread lixiaokeng
We check the return value of udev_device_get_devtype before dereference it. Signed-off-by:Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmultipath/configure.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmultipath/configure.c b/libmultipath

[dm-devel] [PATCH 0/6] libmultipath: check udev* func return value

2020-09-14 Thread lixiaokeng
Hi, The udev* function may return NULL,and it will be dereferenced in str* and sscanf func. For example, there is a coredump caused in add func, which show in be7a043(commit id) in upstream-queue. We check the return value to avoid dereference NULL. repo: openSUSE/multipath-tools repo link: http

[dm-devel] [PATCH 1/6] libmultipath: check uedv* return value in sysfs_get_host_pci_name

2020-09-14 Thread lixiaokeng
udev_device_get_sysname may return NULL. We check the return value. Signed-off-by:Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmultipath/discovery.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 3f1b1d

[dm-devel] [PATCH 2/6] libmultipath: check udev* return value in ccw_sysfs_pathinfo

2020-09-14 Thread lixiaokeng
We check the return value of udev_device_get_sysname. Signed-off-by:Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmultipath/discovery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 4264b0da..27cb67f8 10

[dm-devel] [PATCH 3/6] libmultipath: check udev* return value in sysfs_get_tgt_nodename

2020-09-14 Thread lixiaokeng
We check the return value of udev_device_get_parent and udev_device_get_sysname. Signed-off-by:lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmultipath/discovery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmult

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Damien Le Moal
On 2020/09/15 10:10, Damien Le Moal wrote: > On 2020/09/15 0:04, Mike Snitzer wrote: >> On Sun, Sep 13 2020 at 8:46pm -0400, >> Damien Le Moal wrote: >> >>> On 2020/09/12 6:53, Mike Snitzer wrote: blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and REQ_OP_WRITE_ZEROES

[dm-devel] [dm:dm-5.10 3/6] drivers/md/dm-table.c:1507:28: error: implicit declaration of function 'lcm_not_zero'; did you mean

2020-09-14 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git dm-5.10 head: 86958eac97c2edd72a4a36ac2c7c257aee639711 commit: 7a888ac0a16dbdff2889066f35580575c56ebf0c [3/6] dm table: stack 'chunk_sectors' limit to account for target-specific splitting config: microblaze-ran

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Damien Le Moal
On 2020/09/15 11:04, Ming Lei wrote: > On Mon, Sep 14, 2020 at 12:43:06AM +, Damien Le Moal wrote: >> On 2020/09/12 22:53, Ming Lei wrote: >>> On Fri, Sep 11, 2020 at 05:53:36PM -0400, Mike Snitzer wrote: blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and REQ_OP_WR

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Ming Lei
On Mon, Sep 14, 2020 at 12:43:06AM +, Damien Le Moal wrote: > On 2020/09/12 22:53, Ming Lei wrote: > > On Fri, Sep 11, 2020 at 05:53:36PM -0400, Mike Snitzer wrote: > >> blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and > >> REQ_OP_WRITE_ZEROES yet blk_rq_get_max_sectors()

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Ming Lei
On Mon, Sep 14, 2020 at 10:49:28AM -0400, Mike Snitzer wrote: > On Sat, Sep 12 2020 at 9:52am -0400, > Ming Lei wrote: > > > On Fri, Sep 11, 2020 at 05:53:36PM -0400, Mike Snitzer wrote: > > > blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and > > > REQ_OP_WRITE_ZEROES yet bl

Re: [dm-devel] Revert "dm: always call blk_queue_split() in dm_process_bio()"

2020-09-14 Thread Mike Snitzer
On Thu, Sep 10 2020 at 3:29pm -0400, Vijayendra Suman wrote: > Hello Mike, > > I checked with upstream, performance measurement is similar and > shows performance improvement when > 120c9257f5f19e5d1e87efcbb5531b7cd81b7d74 is reverted. > > On 9/10/2020 7:54 PM, Mike Snitzer wrote: > >[cc'ing d

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Damien Le Moal
On 2020/09/15 0:04, Mike Snitzer wrote: > On Sun, Sep 13 2020 at 8:46pm -0400, > Damien Le Moal wrote: > >> On 2020/09/12 6:53, Mike Snitzer wrote: >>> blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and >>> REQ_OP_WRITE_ZEROES yet blk_rq_get_max_sectors() didn't call it for >

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Damien Le Moal
On 2020/09/14 23:52, Mike Snitzer wrote: > On Sun, Sep 13 2020 at 8:43pm -0400, > Damien Le Moal wrote: > >> On 2020/09/12 22:53, Ming Lei wrote: >>> On Fri, Sep 11, 2020 at 05:53:36PM -0400, Mike Snitzer wrote: blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and REQ

Re: [dm-devel] [PATCH -next] dm integrity: convert to use le64_add_cpu()

2020-09-14 Thread kernel test robot
Hi Liu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20200911] url: https://github.com/0day-ci/linux/commits/Liu-Shixin/dm-integrity-convert-to-use-le64_add_cpu/20200914-115650 base:d5b2251d63b5344ee827d3680fa79bdb9f9ddfa1 config: x86_64

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Mike Snitzer
On Sun, Sep 13 2020 at 8:46pm -0400, Damien Le Moal wrote: > On 2020/09/12 6:53, Mike Snitzer wrote: > > blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and > > REQ_OP_WRITE_ZEROES yet blk_rq_get_max_sectors() didn't call it for > > those operations. > > > > Also, there is no

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Mike Snitzer
On Sun, Sep 13 2020 at 8:43pm -0400, Damien Le Moal wrote: > On 2020/09/12 22:53, Ming Lei wrote: > > On Fri, Sep 11, 2020 at 05:53:36PM -0400, Mike Snitzer wrote: > >> blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and > >> REQ_OP_WRITE_ZEROES yet blk_rq_get_max_sectors() di

Re: [dm-devel] [PATCH 1/3] block: fix blk_rq_get_max_sectors() to flow more carefully

2020-09-14 Thread Mike Snitzer
On Sat, Sep 12 2020 at 9:52am -0400, Ming Lei wrote: > On Fri, Sep 11, 2020 at 05:53:36PM -0400, Mike Snitzer wrote: > > blk_queue_get_max_sectors() has been trained for REQ_OP_WRITE_SAME and > > REQ_OP_WRITE_ZEROES yet blk_rq_get_max_sectors() didn't call it for > > those operations. > > Actua

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-14 Thread Nicolas.Ferre
Joe, Please drop this chunk: it's a successive controller version number which are all backward compatible with "fallthrough" on each case so removing from this last one makes it inconsistent. In sort: NACK for atmel-mci. Best regards, Nicolas On 09/09/2020 at 22:06, Joe Perches wrote: >

Re: [dm-devel] [PATCH 3/3] block: allow 'chunk_sectors' to be non-power-of-2

2020-09-14 Thread Keith Busch
On Sat, Sep 12, 2020 at 10:06:30PM +0800, Ming Lei wrote: > On Fri, Sep 11, 2020 at 05:53:38PM -0400, Mike Snitzer wrote: > > It is possible for a block device to use a non power-of-2 for chunk > > size which results in a full-stripe size that is also a non > > power-of-2. > > > > Update blk_queue

Re: [dm-devel] [PATCH v3 3/6] IMA: update process_buffer_measurement to measure buffer hash

2020-09-14 Thread Tushar Sugandhi
On 2020-08-31 10:02 a.m., Mimi Zohar wrote: On Thu, 2020-08-27 at 18:57 -0700, Tushar Sugandhi wrote: process_buffer_measurement() currently only measures the input buffer. When the buffer being measured is too large, it may result in bloated IMA logs. The subject of this sentence refers to

Re: [dm-devel] [PATCH v3 5/6] IMA: add hook to measure critical data from kernel components

2020-09-14 Thread Tushar Sugandhi
On 2020-08-31 11:23 a.m., Mimi Zohar wrote: diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index 52cbbc1f7ea2..a889bf40cb7e 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -869,6 +869,30 @@ void ima_kexec_cmdline(int

Re: [dm-devel] [PATCH v3 4/6] IMA: add policy to measure critical data from kernel components

2020-09-14 Thread Tushar Sugandhi
On 2020-08-31 11:15 a.m., Mimi Zohar wrote: On Thu, 2020-08-27 at 18:57 -0700, Tushar Sugandhi wrote: There would be several candidate kernel components suitable for IMA measurement. Not all of them would have support for IMA measurement. Also, system administrators may not want to measure dat

Re: [dm-devel] [PATCH] crypto: mark unused ciphers as obsolete

2020-09-14 Thread Van Leeuwen, Pascal
> -Original Message- > From: Ard Biesheuvel > Sent: Friday, September 11, 2020 6:30 PM > To: Van Leeuwen, Pascal ; dm-devel@redhat.com; Milan > Broz > Cc: linux-cry...@vger.kernel.org; herb...@gondor.apana.org.au; > ebigg...@kernel.org > Subject: Re: [PATCH] crypto: mark unused ciphers

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-14 Thread Robin Murphy
On 2020-09-09 21:06, Joe Perches wrote: fallthrough to a separate case/default label break; isn't very readable. Convert pseudo-keyword fallthrough; statements to a simple break; when the next label is case or default and the only statement in the next label block is break; Found using: $ grep

Re: [dm-devel] [PATCH v3 2/2] dm-crypt: collect data and submit to DM to measure

2020-09-14 Thread Tushar Sugandhi
Thanks for taking a look at this patch Milan. Appreciate it. Sorry for responding late. I was on vacation last week. My responses below. On 2020-08-31 3:54 a.m., Milan Broz wrote: On 28/08/2020 22:27, Tushar Sugandhi wrote: Currently, dm-crypt does not take advantage of IMA measuring capabili

Re: [dm-devel] [PATCH 05/12] md: update the optimal I/O size on reshape

2020-09-14 Thread Song Liu
On Thu, Sep 10, 2020 at 7:48 AM Christoph Hellwig wrote: > > The raid5 and raid10 drivers currently update the read-ahead size, > but not the optimal I/O size on reshape. To prepare for deriving the > read-ahead size from the optimal I/O size make sure it is updated > as well. > > Signed-off-by:

[dm-devel] [PATCH -next] dm integrity: convert to use le64_add_cpu()

2020-09-14 Thread Liu Shixin
Convert cpu_to_le64(le64_to_cpu(E1) + E2) to use le64_add_cpu(). Signed-off-by: Liu Shixin --- drivers/md/dm-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 3fc3757def55..cf9dadd55625 100644 --- a/drivers

Re: [dm-devel] [PATCH] crypto: mark unused ciphers as obsolete

2020-09-14 Thread Ard Biesheuvel
(cc Milan and dm-devel) On Fri, 11 Sep 2020 at 19:24, Van Leeuwen, Pascal wrote: > > > -Original Message- > > From: linux-crypto-ow...@vger.kernel.org > > On Behalf Of Ard Biesheuvel > > Sent: Friday, September 11, 2020 4:11 PM > > To: linux-cry...@vger.kernel.org > > Cc: herb...@gondor

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-14 Thread Matthias Brugger
On 09/09/2020 22:06, Joe Perches wrote: diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c index 09f931d4598c..778be26d329f 100644 --- a/drivers/net/wireless/mediatek/mt7601u/dma.c +++ b/drivers/net/wireless/mediatek/mt7601u/dma.c @@ -193,11

Re: [dm-devel] [PATCH v3 1/6] IMA: generalize keyring specific measurement constructs

2020-09-14 Thread Tushar Sugandhi
On 2020-08-31 4:55 a.m., Mimi Zohar wrote: On Thu, 2020-08-27 at 18:56 -0700, Tushar Sugandhi wrote: IMA functions such as ima_match_keyring(), process_buffer_measurement(), ima_match_policy() etc. handle data specific to keyrings. Currently, these constructs are not generic to handle any func

Re: [dm-devel] Revert "dm: always call blk_queue_split() in dm_process_bio()"

2020-09-14 Thread Vijayendra Suman
Hello Mike, I checked with upstream, performance measurement is similar and shows performance improvement when 120c9257f5f19e5d1e87efcbb5531b7cd81b7d74 is reverted. On 9/10/2020 7:54 PM, Mike Snitzer wrote: [cc'ing dm-devel and linux-block because this is upstream concern too] On Wed, Sep 0

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-14 Thread Steffen Maier
On 9/9/20 10:06 PM, Joe Perches wrote: fallthrough to a separate case/default label break; isn't very readable. Convert pseudo-keyword fallthrough; statements to a simple break; when the next label is case or default and the only statement in the next label block is break; Found using: $ grep-

Re: [dm-devel] [PATCH v3 2/6] IMA: change process_buffer_measurement return type from void to int

2020-09-14 Thread Tushar Sugandhi
On 2020-08-31 4:36 a.m., Mimi Zohar wrote: On Thu, 2020-08-27 at 18:57 -0700, Tushar Sugandhi wrote: process_buffer_measurement() does not return the result of the operation. Therefore, the consumers of this function cannot act on it, if needed. Update return type of process_buffer_measureme

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-14 Thread Felipe Balbi
Hi, Joe Perches writes: > drivers/usb/dwc3/core.c | 2 +- > drivers/usb/gadget/legacy/inode.c | 2 +- > drivers/usb/gadget/udc/pxa25x_udc.c | 4 ++-- > drivers/usb/phy/phy-fsl-usb.c |