Re: [dm-devel] md/dm-mpath: check whether all pgpaths have same uuid in multipath_ctr()

2021-03-26 Thread Martin Wilck
On Thu, 2021-03-25 at 11:14 -0400, Mike Snitzer wrote: > On Wed, Mar 24 2021 at  9:21pm -0400, > Zhiqiang Liu wrote: > > > > > > > On 2021/3/22 22:22, Mike Snitzer wrote: > > > On Mon, Mar 22 2021 at  4:11am -0400, > > > Christoph Hellwig wrote: > > > > > > > On Sat, Mar 20, 2021 at

Re: [PATCH v2] block: Suppress uevent for hidden device when removed

2021-03-11 Thread Martin Wilck
ents at all. > > Signed-off-by: Daniel Wagner Reviewed-by: Martin Wilck

Re: [PATCH] block: Suppress uevent for hidden device when removed

2021-03-03 Thread Martin Wilck
On Wed, 2021-03-03 at 18:12 +0100, Daniel Wagner wrote: > register_disk() suppress uevents for devices with the GENHD_FL_HIDDEN > but enables uevents at the end again in order to announce disk after > possible partitions are created. > > When the device is removed the uevents are still on and

Re: linux-next: manual merge of the rdma tree with Linus' tree

2021-02-11 Thread Martin Wilck
On Wed, 2021-02-10 at 22:08 +, Pearson, Robert B wrote: > Looks perfect. Thanks. +1 Thanks everyone.

Re: [PATCH v2 0/4] qla2xxx: A couple crash fixes

2020-08-31 Thread Martin Wilck
dle incorrect entry_type entries > > drivers/scsi/qla2xxx/qla_gbl.h| 3 +- > drivers/scsi/qla2xxx/qla_init.c | 10 ++ > drivers/scsi/qla2xxx/qla_inline.h | 5 +++ > drivers/scsi/qla2xxx/qla_isr.c| 74 +++ > > drivers/scsi/qla2xxx/qla_mr.c | 9 ++--- > 5 files changed, 62 insertions(+), 39 deletions(-) > For the set: Reviewed-by: Martin Wilck

Re: [PATCH 4/4] qla2xxx: Handle incorrect entry_type entries

2020-08-27 Thread Martin Wilck
On Thu, 2020-08-27 at 13:46 +0200, Daniel Wagner wrote: > On Thu, Aug 27, 2020 at 12:17:13PM +0200, Martin Wilck wrote: > > Should we perhaps log an error message when we detect a mismatch > > between sp->type and entry_type? > > Sure can do, but does it really

Re: [PATCH 4/4] qla2xxx: Handle incorrect entry_type entries

2020-08-27 Thread Martin Wilck
On Thu, 2020-08-27 at 11:58 +0200, Daniel Wagner wrote: > It was observed on an ISP8324 16Gb HBA with fw=8.08.203 (d0d5) that > pkt->entry_type was MBX_IOCB_TYPE/0x39 with an sp->type SRB_SCSI_CMD > which is invalid and should not be possible. > > A careful code review of the crash dump didn't

Re: [PATCH 1/4] qla2xxx: Reset done and free callback pointer on release

2020-08-27 Thread Martin Wilck
On Thu, 2020-08-27 at 11:58 +0200, Daniel Wagner wrote: > Reset ->done and ->free when releasing the srb. There is a hidden > use-after-free bug in the driver which corrupts the srb memory pool > which originates from the cleanup callbacks. By explicitly resetting > the callbacks to NULL, we

Re: [PATCH AUTOSEL 5.8 70/72] nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths

2020-08-10 Thread Martin Wilck
r non-optimized paths will cause > the > result from nvme_round_robin_path() to be ignored for non-optimized > paths. > > Fixes: 75c10e732724 ("nvme-multipath: round-robin I/O policy") > Signed-off-by: Martin Wilck > Signed-off-by: Hannes Reinecke > Reviewed-by: Sagi Gri

Re: [PATCH] qla2xxx: fix a potential NULL pointer dereference

2019-10-04 Thread Martin Wilck
On Wed, 2019-09-18 at 22:06 +0530, Allen Pais wrote: > alloc_workqueue is not checked for errors and as a result, > a potential NULL dereference could occur. > > Signed-off-by: Allen Pais > --- > drivers/scsi/qla2xxx/qla_os.c | 4 > 1 file changed, 4 insertions(+)

Re: [PATCH] scsi: core: Log SCSI command age with errors

2019-09-30 Thread Martin Wilck
Hello Milan, On Mon, 2019-09-30 at 14:35 +0530, Milan P. Gandhi wrote: > On 9/30/19 2:12 PM, Martin Wilck wrote: > > Wrt the enablement of the option on highly loaded systems, I'm not > > sure > > I understand. You need to enable SCSI logging anyway, don't you? > >

Re: [PATCH] scsi: core: Log SCSI command age with errors

2019-09-30 Thread Martin Wilck
On Fri, 2019-09-27 at 13:45 -0400, Laurence Oberman wrote: > > Hi Martin > > Agreed about log extraction, but turning that on with a busy workload > in a production environment is not practical. We cant do it with > systems with 1000's of luns and 1000's of IOPS/sec. > Also second resolution is

Re: [PATCH] scsi: core: Log SCSI command age with errors

2019-09-27 Thread Martin Wilck
On Mon, 2019-09-23 at 11:31 +0530, Milan P. Gandhi wrote: > Couple of users had requested to print the SCSI command age along > with command failure errors. This is a small change, but allows > users to get more important information about the command that was > failed, it would help the users

Re: [PATCH] cdrom: gdrom.c: fix a incorrect use of kstrndup()

2019-08-09 Thread Martin Wilck
On Tue, 2019-08-06 at 00:11 +0530, Saurav Girepunje wrote: > According to doc: "Note: Use kmemdup_nul() instead if the size > is known exactly." So we should use kmemdup_nul() here instead of > kstrndup(). > > Signed-off-by: Saurav Girepunje > --- Reviewed-by: Martin Wilck

Re: linux-next: manual merge of the scsi tree with the block tree

2019-04-17 Thread Martin Wilck
On Mon, 2019-04-15 at 06:48 -0700, Bart Van Assche wrote: > On 4/14/19 10:59 PM, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the scsi tree got a conflict in: > > > > drivers/scsi/sd.c > > > > between commit: > > > > c92e2f04b359 ("block: disk_events: introduce

Re: [PATCH 0/9 v3] locks: avoid thundering-herd wake-ups

2018-10-25 Thread Martin Wilck
On Thu, 2018-10-25 at 12:04 -0400, J. Bruce Fields wrote: > On Wed, Oct 24, 2018 at 09:43:54AM +1100, NeilBrown wrote: > > This took longer that I had wanted, due to various reasons - sorry. > > And I'm now posting it in a merge window, which is not ideal. I > > don't > > expect it to be included

Re: [PATCH 0/9 v3] locks: avoid thundering-herd wake-ups

2018-10-25 Thread Martin Wilck
On Thu, 2018-10-25 at 12:04 -0400, J. Bruce Fields wrote: > On Wed, Oct 24, 2018 at 09:43:54AM +1100, NeilBrown wrote: > > This took longer that I had wanted, due to various reasons - sorry. > > And I'm now posting it in a merge window, which is not ideal. I > > don't > > expect it to be included

Re: [PATCH 0/4] locks: avoid thundering-herd wake-ups

2018-08-20 Thread Martin Wilck
On Mon, 2018-08-20 at 16:02 -0400, J. Bruce Fields wrote: > On Mon, Aug 20, 2018 at 01:02:21PM +0200, Martin Wilck wrote: > > On Wed, 2018-08-08 at 14:29 -0400, J. Bruce Fields wrote: > > > On Wed, Aug 08, 2018 at 12:47:22PM -0400, Jeff Layton wrote: > > > > On

Re: [PATCH 0/4] locks: avoid thundering-herd wake-ups

2018-08-20 Thread Martin Wilck
On Mon, 2018-08-20 at 16:02 -0400, J. Bruce Fields wrote: > On Mon, Aug 20, 2018 at 01:02:21PM +0200, Martin Wilck wrote: > > On Wed, 2018-08-08 at 14:29 -0400, J. Bruce Fields wrote: > > > On Wed, Aug 08, 2018 at 12:47:22PM -0400, Jeff Layton wrote: > > > > On

Re: [PATCH 0/4] locks: avoid thundering-herd wake-ups

2018-08-20 Thread Martin Wilck
On Wed, 2018-08-08 at 14:29 -0400, J. Bruce Fields wrote: > On Wed, Aug 08, 2018 at 12:47:22PM -0400, Jeff Layton wrote: > > On Wed, 2018-08-08 at 11:51 +1000, NeilBrown wrote: > > > If you have a many-core machine, and have many threads all > > > wanting to > > > briefly lock a give file (udev is

Re: [PATCH 0/4] locks: avoid thundering-herd wake-ups

2018-08-20 Thread Martin Wilck
On Wed, 2018-08-08 at 14:29 -0400, J. Bruce Fields wrote: > On Wed, Aug 08, 2018 at 12:47:22PM -0400, Jeff Layton wrote: > > On Wed, 2018-08-08 at 11:51 +1000, NeilBrown wrote: > > > If you have a many-core machine, and have many threads all > > > wanting to > > > briefly lock a give file (udev is

Re: [PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND

2018-04-26 Thread Martin Wilck
d version I think I caught them all). Regards, Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND

2018-04-26 Thread Martin Wilck
d version I think I caught them all). Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH v3 1/6] ilog2: create truly constant version for sparse

2018-04-18 Thread Martin Wilck
On Tue, 2018-04-17 at 17:07 -0700, Linus Torvalds wrote: > On Tue, Apr 17, 2018 at 4:35 PM, Martin Wilck <mwi...@suse.com> > wrote: > > Sparse emits errors about ilog2() in array indices because of the > > use of > > __ilog2_32() and __ilog2_64(), > > If sparse

Re: [PATCH v3 1/6] ilog2: create truly constant version for sparse

2018-04-18 Thread Martin Wilck
On Tue, 2018-04-17 at 17:07 -0700, Linus Torvalds wrote: > On Tue, Apr 17, 2018 at 4:35 PM, Martin Wilck > wrote: > > Sparse emits errors about ilog2() in array indices because of the > > use of > > __ilog2_32() and __ilog2_64(), > > If sparse warns about it, then p

[PATCH v3 6/6] scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS

2018-04-17 Thread Martin Wilck
the "maybe_retry" logic in scsi_decide_disposition); otherwise dm-multipath might initiate a failover from a healthy path e.g. for REQ_FAILFAST_DEV commands. Introduce a new blist flag for this case. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/scsi/scsi_devinfo.c | 1

[PATCH v3 6/6] scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS

2018-04-17 Thread Martin Wilck
the "maybe_retry" logic in scsi_decide_disposition); otherwise dm-multipath might initiate a failover from a healthy path e.g. for REQ_FAILFAST_DEV commands. Introduce a new blist flag for this case. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 1 + drivers/scsi/scsi_err

[PATCH v3 4/6] scsi: devinfo: warn on undefined blist flags

2018-04-17 Thread Martin Wilck
Warn if a device (or the user) sets blist flags which are unknown or have been removed. This should enable us to reuse freed blist bits in later releases. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/scsi/Makefile | 2 +- drivers/scsi/scsi_devinfo.c | 6 ++ includ

[PATCH v3 4/6] scsi: devinfo: warn on undefined blist flags

2018-04-17 Thread Martin Wilck
Warn if a device (or the user) sets blist flags which are unknown or have been removed. This should enable us to reuse freed blist bits in later releases. Signed-off-by: Martin Wilck --- drivers/scsi/Makefile | 2 +- drivers/scsi/scsi_devinfo.c | 6 ++ include/scsi/scsi_devinfo.h

[PATCH v3 5/6] scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix

2018-04-17 Thread Martin Wilck
EMC Symmetrix returns 'internal target error' for a variety of conditions, most of which will be transient. So we should always retry it, even with failfast set. Otherwise we'd get spurious path flaps with multipath. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/scsi/scsi_dev

[PATCH v3 5/6] scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix

2018-04-17 Thread Martin Wilck
EMC Symmetrix returns 'internal target error' for a variety of conditions, most of which will be transient. So we should always retry it, even with failfast set. Otherwise we'd get spurious path flaps with multipath. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 3 ++- drivers

[PATCH v3 2/6] scsi: use const_ilog2 for array indices

2018-04-17 Thread Martin Wilck
Use the just introduced const_ilog2() macro to avoid sparse errors. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/scsi/scsi_debugfs.c | 2 +- drivers/scsi/scsi_sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_debugfs.c b/driver

[PATCH v3 3/6] scsi: devinfo: change blist_flag_t to 64bit

2018-04-17 Thread Martin Wilck
Space for SCSI blist flags is gradually running out. Change the type to __u64. And fix a checkpatch complaint about symbolic mode flags in scsi_devinfo.c. Make checkpatch happy by replacing simple_strtoul() with kstrtoull(). Signed-off-by: Martin Wilck <mwi...@suse.com> --- driver

[PATCH v3 2/6] scsi: use const_ilog2 for array indices

2018-04-17 Thread Martin Wilck
Use the just introduced const_ilog2() macro to avoid sparse errors. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_debugfs.c | 2 +- drivers/scsi/scsi_sysfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c

[PATCH v3 3/6] scsi: devinfo: change blist_flag_t to 64bit

2018-04-17 Thread Martin Wilck
Space for SCSI blist flags is gradually running out. Change the type to __u64. And fix a checkpatch complaint about symbolic mode flags in scsi_devinfo.c. Make checkpatch happy by replacing simple_strtoul() with kstrtoull(). Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 18

[PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND

2018-04-17 Thread Martin Wilck
the length of blist_flag_t to 64 bit, and used previously unused bits. I also added checking for obsolete and unused bits. For the blist_flag_t size increase, I used sparse to try and avoid regressions; that necessitated fixing sparse's errors for the current code first. Martin Wilck (6): ilo

[PATCH v3 1/6] ilog2: create truly constant version for sparse

2018-04-17 Thread Martin Wilck
parentheses, but that appears to be a false positive. I can get rid of the warning simply by inserting whitespace, making checkpatch "see" the whole macro). Signed-off-by: Martin Wilck <mwi...@suse.com> --- include/linux/log2.h | 35 --- 1 file change

[PATCH v3 0/6] scsi: handle special return codes for ABORTED COMMAND

2018-04-17 Thread Martin Wilck
the length of blist_flag_t to 64 bit, and used previously unused bits. I also added checking for obsolete and unused bits. For the blist_flag_t size increase, I used sparse to try and avoid regressions; that necessitated fixing sparse's errors for the current code first. Martin Wilck (6): ilo

[PATCH v3 1/6] ilog2: create truly constant version for sparse

2018-04-17 Thread Martin Wilck
parentheses, but that appears to be a false positive. I can get rid of the warning simply by inserting whitespace, making checkpatch "see" the whole macro). Signed-off-by: Martin Wilck --- include/linux/log2.h | 35 --- 1 file changed, 24 insertions(+), 11

Re: [dm-devel] [PATCH] dm mpath selector: more evenly distribute ties

2018-01-24 Thread Martin Wilck
On Wed, 2018-01-24 at 11:41 -0800, Khazhismel Kumykov wrote: > On Wed, Jan 24, 2018 at 11:09 AM, Martin Wilck <mwi...@suse.com> > wrote: > > On Wed, 2018-01-24 at 10:44 -0800, Khazhismel Kumykov wrote: > > > On Wed, Jan 24, 2018 at 2:57 AM, Martin Wilck &l

Re: [dm-devel] [PATCH] dm mpath selector: more evenly distribute ties

2018-01-24 Thread Martin Wilck
On Wed, 2018-01-24 at 11:41 -0800, Khazhismel Kumykov wrote: > On Wed, Jan 24, 2018 at 11:09 AM, Martin Wilck > wrote: > > On Wed, 2018-01-24 at 10:44 -0800, Khazhismel Kumykov wrote: > > > On Wed, Jan 24, 2018 at 2:57 AM, Martin Wilck > > > wrote: > > &

Re: [dm-devel] [PATCH] dm mpath selector: more evenly distribute ties

2018-01-24 Thread Martin Wilck
On Wed, 2018-01-24 at 10:44 -0800, Khazhismel Kumykov wrote: > On Wed, Jan 24, 2018 at 2:57 AM, Martin Wilck <mwi...@suse.com> > wrote: > > On Fri, 2018-01-19 at 15:07 -0800, Khazhismel Kumykov wrote: > > > Move the last used path to the end of the list

Re: [dm-devel] [PATCH] dm mpath selector: more evenly distribute ties

2018-01-24 Thread Martin Wilck
On Wed, 2018-01-24 at 10:44 -0800, Khazhismel Kumykov wrote: > On Wed, Jan 24, 2018 at 2:57 AM, Martin Wilck > wrote: > > On Fri, 2018-01-19 at 15:07 -0800, Khazhismel Kumykov wrote: > > > Move the last used path to the end of the list (least preferred) > > > so

Re: [dm-devel] [PATCH] dm mpath selector: more evenly distribute ties

2018-01-24 Thread Martin Wilck
@ static struct dm_path *st_select_path(struct > path_selector *ps, size_t nr_bytes) > if (!best) > goto out; > > + /* Move most recently used to least preferred to evenly > balance. */ > + list_move_tail(>list, >valid_paths); > + > ret = best->path; > out: > spin_unlock_irqrestore(>lock, flags); > -- > dm-devel mailing list > dm-de...@redhat.com > https://www.redhat.com/mailman/listinfo/dm-devel -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [dm-devel] [PATCH] dm mpath selector: more evenly distribute ties

2018-01-24 Thread Martin Wilck
_select_path(struct > path_selector *ps, size_t nr_bytes) > if (!best) > goto out; > > + /* Move most recently used to least preferred to evenly > balance. */ > + list_move_tail(>list, >valid_paths); > + > ret = best->path; > out: > spin_unlock_irqrestore(>lock, flags); > -- > dm-devel mailing list > dm-de...@redhat.com > https://www.redhat.com/mailman/listinfo/dm-devel -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

[PATCH] scsi: libfc: fix ELS request handling

2017-11-25 Thread Martin Wilck
The modification of fc_lport_recv_els_req() in commit fcabb09e59a7 (merged in 4.12-rc1) caused certain requests not to be handled at all. Fix that. Fixes: fcabb09e59a7 "scsi: libfc: directly call ELS request handlers" Signed-off-by: Martin Wilck <mwi...@suse.com> --- dr

[PATCH] scsi: libfc: fix ELS request handling

2017-11-25 Thread Martin Wilck
The modification of fc_lport_recv_els_req() in commit fcabb09e59a7 (merged in 4.12-rc1) caused certain requests not to be handled at all. Fix that. Fixes: fcabb09e59a7 "scsi: libfc: directly call ELS request handlers" Signed-off-by: Martin Wilck --- drivers/scsi/libfc/fc_lport.c |

Re: [PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-10-04 Thread Martin Wilck
On Fri, 2017-09-29 at 16:59 -0600, Keith Busch wrote: > On Thu, Sep 28, 2017 at 09:36:36PM +0200, Martin Wilck wrote: > > In the NVME subsystem, we're seeing a race condition with udev > > where > > device_add_disk() is called (which triggers an "add" uevent),

Re: [PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-10-04 Thread Martin Wilck
On Fri, 2017-09-29 at 16:59 -0600, Keith Busch wrote: > On Thu, Sep 28, 2017 at 09:36:36PM +0200, Martin Wilck wrote: > > In the NVME subsystem, we're seeing a race condition with udev > > where > > device_add_disk() is called (which triggers an "add" uevent),

Re: [PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-10-04 Thread Martin Wilck
On Sun, 2017-10-01 at 10:00 +0200, Christoph Hellwig wrote: > While this looks okay-ish to me I really don't want people confused > with three variants of add_disk, we really need to consolidate > our helpers there a bit.. > Can you give me a hint what you'd like to see? Martin --

Re: [PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-10-04 Thread Martin Wilck
On Sun, 2017-10-01 at 10:00 +0200, Christoph Hellwig wrote: > While this looks okay-ish to me I really don't want people confused > with three variants of add_disk, we really need to consolidate > our helpers there a bit.. > Can you give me a hint what you'd like to see? Martin --

[PATCH 2/2] nvme: use device_add_disk_with_groups()

2017-09-28 Thread Martin Wilck
By using device_add_disk_with_groups(), we can avoid the race condition with udev rule processing, because no udev event will be triggered before all attributes are available. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/nvme/host/core.c | 12 +++- 1 file chan

[PATCH 2/2] nvme: use device_add_disk_with_groups()

2017-09-28 Thread Martin Wilck
By using device_add_disk_with_groups(), we can avoid the race condition with udev rule processing, because no udev event will be triggered before all attributes are available. Signed-off-by: Martin Wilck --- drivers/nvme/host/core.c | 12 +++- 1 file changed, 7 insertions(+), 5

[PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-09-28 Thread Martin Wilck
the device is incomplete, in particular, device WWIDs may not be determined correctly. To fix this, this patch introduces a new function device_add_disk_with_groups(), which takes a list of attribute groups and adds them to the device before sending out uevents. Signed-off-by: Martin Wilck <mw

[PATCH 1/2] block: genhd: add device_add_disk_with_groups

2017-09-28 Thread Martin Wilck
the device is incomplete, in particular, device WWIDs may not be determined correctly. To fix this, this patch introduces a new function device_add_disk_with_groups(), which takes a list of attribute groups and adds them to the device before sending out uevents. Signed-off-by: Martin Wilck --- blo

Re: [PATCH] string.h: un-fortify memcpy_and_pad

2017-09-11 Thread Martin Wilck
On Wed, 2017-09-06 at 14:36 +0200, Martin Wilck wrote: > The way I'd implemented the new helper memcpy_and_pad with > __FORTIFY_INLINE caused compiler warnings for certain kernel > configurations. > > This helper is only used in a single place at this time, and thus > doesn't

Re: [PATCH] string.h: un-fortify memcpy_and_pad

2017-09-11 Thread Martin Wilck
On Wed, 2017-09-06 at 14:36 +0200, Martin Wilck wrote: > The way I'd implemented the new helper memcpy_and_pad with > __FORTIFY_INLINE caused compiler warnings for certain kernel > configurations. > > This helper is only used in a single place at this time, and thus > doesn't

[PATCH] string.h: un-fortify memcpy_and_pad

2017-09-06 Thread Martin Wilck
support for now. Fixes: 01f33c336e2d "string.h: add memcpy_and_pad()" Signed-off-by: Martin Wilck <mwi...@suse.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- include/linux/string.h | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/include/li

[PATCH] string.h: un-fortify memcpy_and_pad

2017-09-06 Thread Martin Wilck
support for now. Fixes: 01f33c336e2d "string.h: add memcpy_and_pad()" Signed-off-by: Martin Wilck Acked-by: Arnd Bergmann --- include/linux/string.h | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/include/linux/string.h b/include/linux/string.h index e1e

Re: linux-next: build failure after merge of the akpm-current tree

2017-09-06 Thread Martin Wilck
_read_overflow3(); > } > if (dest_size < dest_len) > - fortify_panic(__func__); > + fortify_overflow(__func__); > if (dest_len > count) { > memcpy(dest, src, count); > memset(dest + count, pad, dest_len

Re: linux-next: build failure after merge of the akpm-current tree

2017-09-06 Thread Martin Wilck
e < dest_len) > - fortify_panic(__func__); > + fortify_overflow(__func__); > if (dest_len > count) { > memcpy(dest, src, count); > memset(dest + count, pad, dest_len - count); > -- > 2.13.2 Arnd Bergmann spotted ano

[PATCH] string.h: un-fortify memcpy_and_pad

2017-09-05 Thread Martin Wilck
support for now. Fixes: 3c5fa8cd18f8 "string.h: add memcpy_and_pad()" Signed-off-by: Martin Wilck <mwi...@suse.com> --- include/linux/string.h | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/include/linux/string.h b/include/linux/string.h ind

[PATCH] string.h: un-fortify memcpy_and_pad

2017-09-05 Thread Martin Wilck
support for now. Fixes: 3c5fa8cd18f8 "string.h: add memcpy_and_pad()" Signed-off-by: Martin Wilck --- include/linux/string.h | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/include/linux/string.h b/include/linux/string.h index 0bec4151b0eb9..0495cd3c81

Re: [PATCH v4 2/3] string.h: add memcpy_and_pad()

2017-09-05 Thread Martin Wilck
it right. I suggest to simply drop the fortification code from this function, which is not a "common str/mem function" anyway. Please tell me if that'd be ok for you. I'll send a patch in a follow-up email. Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [PATCH v4 2/3] string.h: add memcpy_and_pad()

2017-09-05 Thread Martin Wilck
it right. I suggest to simply drop the fortification code from this function, which is not a "common str/mem function" anyway. Please tell me if that'd be ok for you. I'll send a patch in a follow-up email. Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

[PATCH v4 3/3] nvmet_execute_identify_ctrl: use memcpy_and_pad()

2017-08-14 Thread Martin Wilck
This changes the earlier patch "nvmet: don't report 0-bytes in serial number" to use the memcpy_and_pad() helper introduced in a previous patch. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/nvme/target/admin-cmd.c | 14 +++--- 1 file changed, 3 insertions(

[PATCH v4 0/3] Improve readbility of NVME "wwid" attribute (target side)

2017-08-14 Thread Martin Wilck
h was merged in nvme-4.13 already. * Split off bug fix (patch 1/3). Martin Wilck (3): nvmet_execute_identify_ctrl: don't overwrite with 0-bytes string.h: add memcpy_and_pad() nvmet_execute_identify_ctrl: use memcpy_and_pad() drivers/nvme/target/admin-cmd.c | 20 +++- in

[PATCH v4 3/3] nvmet_execute_identify_ctrl: use memcpy_and_pad()

2017-08-14 Thread Martin Wilck
This changes the earlier patch "nvmet: don't report 0-bytes in serial number" to use the memcpy_and_pad() helper introduced in a previous patch. Signed-off-by: Martin Wilck --- drivers/nvme/target/admin-cmd.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-)

[PATCH v4 0/3] Improve readbility of NVME "wwid" attribute (target side)

2017-08-14 Thread Martin Wilck
h was merged in nvme-4.13 already. * Split off bug fix (patch 1/3). Martin Wilck (3): nvmet_execute_identify_ctrl: don't overwrite with 0-bytes string.h: add memcpy_and_pad() nvmet_execute_identify_ctrl: use memcpy_and_pad() drivers/nvme/target/admin-cmd.c | 20 +++- in

[PATCH v4 1/3] nvmet_execute_identify_ctrl: don't overwrite with 0-bytes

2017-08-14 Thread Martin Wilck
Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/nvme/target/admin-cmd.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 2d7a98ab53fbf..a53bb6635b837 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/n

[PATCH v4 2/3] string.h: add memcpy_and_pad()

2017-08-14 Thread Martin Wilck
This helper function is useful for the nvme subsystem, and maybe others. Note: the warnings reported by the kbuild test robot for this patch are actually generated by the use of CONFIG_PROFILE_ALL_BRANCHES together with __FORTIFY_INLINE. Signed-off-by: Martin Wilck <mwi...@suse.com> --- i

[PATCH v4 2/3] string.h: add memcpy_and_pad()

2017-08-14 Thread Martin Wilck
This helper function is useful for the nvme subsystem, and maybe others. Note: the warnings reported by the kbuild test robot for this patch are actually generated by the use of CONFIG_PROFILE_ALL_BRANCHES together with __FORTIFY_INLINE. Signed-off-by: Martin Wilck --- include/linux/string.h

[PATCH v4 1/3] nvmet_execute_identify_ctrl: don't overwrite with 0-bytes

2017-08-14 Thread Martin Wilck
Signed-off-by: Martin Wilck --- drivers/nvme/target/admin-cmd.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 2d7a98ab53fbf..a53bb6635b837 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c

[PATCH v3 3/3] nvme: wwid_show: strip trailing 0-bytes

2017-07-20 Thread Martin Wilck
Some broken targets (such as the current Linux target) pad model or serial fields with 0-bytes rather than spaces. The NVME spec disallows 0 bytes in "ASCII" fields. Thus strip trailing 0-bytes, too. Also make sure that we get no underflow for pathological input. Signed-off-by: Martin

[PATCH v3 0/3] Improve readbility of NVME "wwid" attribute

2017-07-20 Thread Martin Wilck
v2: * 3/3: Make sure no underflow occurs (Joe Perches) Martin Wilck (3): string.h: add memcpy_and_pad() nvmet: identify controller: improve standard compliance nvme: wwid_show: strip trailing 0-bytes drivers/nvme/host/core.c| 6 -- drivers/nvme/target/admin-

[PATCH v3 3/3] nvme: wwid_show: strip trailing 0-bytes

2017-07-20 Thread Martin Wilck
Some broken targets (such as the current Linux target) pad model or serial fields with 0-bytes rather than spaces. The NVME spec disallows 0 bytes in "ASCII" fields. Thus strip trailing 0-bytes, too. Also make sure that we get no underflow for pathological input. Signed-off-by: Ma

[PATCH v3 0/3] Improve readbility of NVME "wwid" attribute

2017-07-20 Thread Martin Wilck
v2: * 3/3: Make sure no underflow occurs (Joe Perches) Martin Wilck (3): string.h: add memcpy_and_pad() nvmet: identify controller: improve standard compliance nvme: wwid_show: strip trailing 0-bytes drivers/nvme/host/core.c| 6 -- drivers/nvme/target/admin-

[PATCH v3 2/3] nvmet: identify controller: improve standard compliance

2017-07-20 Thread Martin Wilck
The NVME standard mandates that the SN, MN, and FR fields of the Indentify Controller Data Structure be "ASCII strings". That means that they may not contain 0-bytes, not even string terminators. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/nvme/target/

[PATCH v3 2/3] nvmet: identify controller: improve standard compliance

2017-07-20 Thread Martin Wilck
The NVME standard mandates that the SN, MN, and FR fields of the Indentify Controller Data Structure be "ASCII strings". That means that they may not contain 0-bytes, not even string terminators. Signed-off-by: Martin Wilck --- drivers/nvme/target/admin-cmd.c | 13 ++--- 1 fi

[PATCH v3 1/3] string.h: add memcpy_and_pad()

2017-07-20 Thread Martin Wilck
This helper function is useful for the nvme subsystem, and maybe others. Signed-off-by: Martin Wilck <mwi...@suse.com> --- include/linux/string.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h

[PATCH v3 1/3] string.h: add memcpy_and_pad()

2017-07-20 Thread Martin Wilck
This helper function is useful for the nvme subsystem, and maybe others. Signed-off-by: Martin Wilck --- include/linux/string.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index a467e617eeb08..0bec4151b0eb9

[PATCH v2 2/3] nvmet: identify controller: improve standard compliance

2017-07-20 Thread Martin Wilck
The NVME standard mandates that the SN, MN, and FR fields of the Indentify Controller Data Structure be "ASCII strings". That means that they may not contain 0-bytes, not even string terminators. Signed-off-by: Martin Wilck <mwi...@suse.com> --- drivers/nvme/target/

[PATCH v2 2/3] nvmet: identify controller: improve standard compliance

2017-07-20 Thread Martin Wilck
The NVME standard mandates that the SN, MN, and FR fields of the Indentify Controller Data Structure be "ASCII strings". That means that they may not contain 0-bytes, not even string terminators. Signed-off-by: Martin Wilck --- drivers/nvme/target/admin-cmd.c | 13 ++--- 1 fi

[PATCH v2 0/3] Improve readbility of NVME "wwid" attribute

2017-07-20 Thread Martin Wilck
8-0001 Changes wrt v1: * 1/3: new, moved helper to include/linux/string.h (Christoph Hellwig) (you suggested kernel.h, but I think this matches string.h better) * Dropped the last patch from the v1 series that would have changed valid WWIDs for HW NVME controllers. Marti

[PATCH v2 0/3] Improve readbility of NVME "wwid" attribute

2017-07-20 Thread Martin Wilck
8-0001 Changes wrt v1: * 1/3: new, moved helper to include/linux/string.h (Christoph Hellwig) (you suggested kernel.h, but I think this matches string.h better) * Dropped the last patch from the v1 series that would have changed valid WWIDs for HW NVME controllers. Marti

[PATCH v2 3/3] nvme: wwid_show: strip trailing 0-bytes

2017-07-20 Thread Martin Wilck
Some broken targets (such as the current Linux target) pad model or serial fields with 0-bytes rather than spaces. The NVME spec disallows 0 bytes in "ASCII" fields. Thus strip trailing 0-bytes, too. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Hannes Reinecke <

[PATCH v2 3/3] nvme: wwid_show: strip trailing 0-bytes

2017-07-20 Thread Martin Wilck
Some broken targets (such as the current Linux target) pad model or serial fields with 0-bytes rather than spaces. The NVME spec disallows 0 bytes in "ASCII" fields. Thus strip trailing 0-bytes, too. Signed-off-by: Martin Wilck Reviewed-by: Hannes Reinecke Acked-by: Christo

[PATCH v2 1/3] string.h: add memcpy_and_pad()

2017-07-20 Thread Martin Wilck
This helper function is useful for the nvme subsystem, and maybe others. Signed-off-by: Martin Wilck <mwi...@suse.com> --- include/linux/string.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h

[PATCH v2 1/3] string.h: add memcpy_and_pad()

2017-07-20 Thread Martin Wilck
This helper function is useful for the nvme subsystem, and maybe others. Signed-off-by: Martin Wilck --- include/linux/string.h | 30 ++ 1 file changed, 30 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index a467e617eeb08..0bec4151b0eb9

Re: [PATCH] nvmet: preserve controller serial number between reboots

2017-07-13 Thread Martin Wilck
On Thu, 2017-07-13 at 12:48 +0200, Johannes Thumshirn wrote: > The NVMe target has no way to preserve controller serial > IDs across reboots which breaks udev scripts doing > SYMLINK+="dev/disk/by-id/nvme-$env{ID_SERIAL}-part%n. > > Export the randomly generated serial number via configfs and

Re: [PATCH] nvmet: preserve controller serial number between reboots

2017-07-13 Thread Martin Wilck
On Thu, 2017-07-13 at 12:48 +0200, Johannes Thumshirn wrote: > The NVMe target has no way to preserve controller serial > IDs across reboots which breaks udev scripts doing > SYMLINK+="dev/disk/by-id/nvme-$env{ID_SERIAL}-part%n. > > Export the randomly generated serial number via configfs and

Re: work queue of scsi fc transports should be serialized

2017-05-22 Thread Martin Wilck
k_irqsave(shost->host_lock, flags); >  } >   } >   spin_unlock_irqrestore(shost->host_lock, flags); I believe this is fixed in SLES12-SP1 kernel 3.12.53-60.30.1, with the following patch: * Mon Jan 18 2016 jthumsh...@suse.de - scsi: restart list search after unlock in scsi_remove_target   (bsc#944749, bsc#959257). - Delete   patches.fixes/0001-SCSI-Fix-hard-lockup-in-scsi_remove_target.patch. - commit 2490876 Regards, Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: work queue of scsi fc transports should be serialized

2017-05-22 Thread Martin Wilck
k_irqsave(shost->host_lock, flags); >  } >   } >   spin_unlock_irqrestore(shost->host_lock, flags); I believe this is fixed in SLES12-SP1 kernel 3.12.53-60.30.1, with the following patch: * Mon Jan 18 2016 jthumsh...@suse.de - scsi: restart list search after unlock in scsi_remove_target   (bsc#944749, bsc#959257). - Delete   patches.fixes/0001-SCSI-Fix-hard-lockup-in-scsi_remove_target.patch. - commit 2490876 Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)

Re: [RFC 10/10] kmod: add a sanity check on module loading

2016-12-09 Thread Martin Wilck
finished_kmod_load(), but there are many more aliases defined (and used) in the kernel. Do you plan to implement special code for "char- major-$X", "crypto-$X", "binfmt-$X" etc. later? Regards Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE L

Re: [RFC 10/10] kmod: add a sanity check on module loading

2016-12-09 Thread Martin Wilck
finished_kmod_load(), but there are many more aliases defined (and used) in the kernel. Do you plan to implement special code for "char- major-$X", "crypto-$X", "binfmt-$X" etc. later? Regards Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Im

[PATCH v3] base/platform: fix binding for drivers without probe callback

2015-12-03 Thread martin . wilck
From: Martin Wilck Since b8b2c7d845d5, platform_drv_probe() is called for all platform devices. If drv->probe is NULL, and dev_pm_domain_attach() fails, platform_drv_probe() will return the error code from dev_pm_domain_attach(). This causes real_probe() to enter the "probe_failed"

[PATCH v3] base/platform: fix binding for drivers without probe callback

2015-12-03 Thread martin . wilck
From: Martin Wilck <martin.wi...@ts.fujitsu.com> Since b8b2c7d845d5, platform_drv_probe() is called for all platform devices. If drv->probe is NULL, and dev_pm_domain_attach() fails, platform_drv_probe() will return the error code from dev_pm_domain_attach(). This causes real_probe()

[PATCH v2] base/platform: return success when probe function is NULL

2015-11-30 Thread martin . wilck
From: Martin Wilck Since b8b2c7d845d5, platform_drv_probe() is called for all platform devices. If drv->probe is NULL, and dev_pm_domain_attach() fails, platform_drv_probe() will return the error code from dev_pm_domain_attach(). This causes real_probe() to enter the "probe_failed"

[PATCH v2] base/platform: return success when probe function is NULL

2015-11-30 Thread martin . wilck
From: Martin Wilck <martin.wi...@ts.fujitsu.com> Since b8b2c7d845d5, platform_drv_probe() is called for all platform devices. If drv->probe is NULL, and dev_pm_domain_attach() fails, platform_drv_probe() will return the error code from dev_pm_domain_attach(). This causes real_probe()

[PATCH] base/platform: fix panic when probe function is NULL

2015-11-26 Thread martin . wilck
From: Martin Wilck Since b8b2c7d845d5, platform_drv_probe() is called for all platform devices. If drv->probe is NULL, and dev_pm_domain_attach() fails, platform_drv_probe() will return the error code from dev_pm_domain_attach(). This causes real_probe() to enter the "probe_failed"

  1   2   >