Re: [PATCH v3 1/3] nvme_fc: create fc class and transport device

2017-09-20 Thread Johannes Thumshirn
On Wed, Sep 20, 2017 at 10:50:18AM -0700, Christoph Hellwig wrote: > On Wed, Sep 20, 2017 at 12:30:41PM +0200, Johannes Thumshirn wrote: > > the problem with libfc currently is it is made for fcoe, despite being named > > libfc. > > Well, that's my point - we should be able to use more bits in a

Re: [PATCH V6 2/3] dma-mapping: Rework dma_get_cache_alignment()function

2017-09-20 Thread 陈华才
Hi, Christoph, I have changed dma_get_cache_alignment's return value, and I don't know whether those drivers want to return ARCH_DMA_MINALIGN unconditionally. So I pass a NULL for those drivers, in order to keep their old behavior. Huacai -- Original -- From:

Re: [PATCH] mpt3sas: downgrade full copy_from_user to access_ok check

2017-09-20 Thread Meng Xu
> On Sep 20, 2017, at 11:26 PM, Al Viro wrote: > > On Tue, Sep 19, 2017 at 11:11:11PM -0400, Meng Xu wrote: >> Since right after the user copy, we are going to >> memset(, 0, sizeof(karg)), I guess an access_ok check is enough? > > access_ok() is *NOT* "will

Re: [PATCH] mpt3sas: downgrade full copy_from_user to access_ok check

2017-09-20 Thread Al Viro
On Tue, Sep 19, 2017 at 11:11:11PM -0400, Meng Xu wrote: > Since right after the user copy, we are going to > memset(, 0, sizeof(karg)), I guess an access_ok check is enough? access_ok() is *NOT* "will copy_from_user() succeed?" Not even close. On a bunch of architectures (sparc64, for one)

[PATCH v2 29/31] scsi/bnx2i: Initialize timer

2017-09-20 Thread Kees Cook
There was a seemingly missing call to setup_timer() in one handler, so add setup_timer() here to remove the open-coded initialization. Cc: qlogic-storage-upstr...@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc:

[PATCH v2 18/31] scsi/aic7xxx: Clean up timer usage

2017-09-20 Thread Kees Cook
stat_timer only ever assigns the same function and data, so consolidate to a setup_timer() call and drop everything else used to pass things around. reset_timer is unused; remove it. Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen"

[PATCH v2 19/31] timer: Remove open-coded casts for .data and .function

2017-09-20 Thread Kees Cook
This standardizes the callback and data prototypes in several places that perform casting, in an effort to remove more open-coded .data and .function uses in favor of setup_timer(). Cc: Samuel Ortiz Cc: Tyrel Datwyler Cc: Benjamin Herrenschmidt

[PATCH 1/1] [SCSI] fnic: Cocci spatch "simple_open"

2017-09-20 Thread Thomas Meyer
This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Found by coccinelle spatch "api/simple_open.cocci" Signed-off-by: Thomas Meyer --- diff -u -p a/drivers/scsi/fnic/fnic_debugfs.c

[PATCH v3 17/31] scsi: Define usercopy region in scsi_sense_cache slab cache

2017-09-20 Thread Kees Cook
From: David Windsor SCSI sense buffers, stored in struct scsi_cmnd.sense and therefore contained in the scsi_sense_cache slab cache, need to be copied to/from userspace. cache object allocation: drivers/scsi/scsi_lib.c: scsi_select_sense_cache(...):

Re: [PATCH v3 1/3] nvme_fc: create fc class and transport device

2017-09-20 Thread Christoph Hellwig
On Wed, Sep 20, 2017 at 12:30:41PM +0200, Johannes Thumshirn wrote: > the problem with libfc currently is it is made for fcoe, despite being named > libfc. Well, that's my point - we should be able to use more bits in a common FC layer. I don't really care about the exact name. > The other hand

Re: [PATCH V3 5/9] pm80xx : cleanup in pm8001_abort_task function.

2017-09-20 Thread kbuild test robot
Hi Viswas, [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on v4.14-rc1 next-20170920] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Viswas-G/pm80xx-updates/20170920

Re: [PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo

2017-09-20 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V3 4/9] pm80xx : tag allocation for phy control request.

2017-09-20 Thread kbuild test robot
Hi Viswas, [auto build test WARNING on mkp-scsi/for-next] [also build test WARNING on v4.14-rc1 next-20170920] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Viswas-G/pm80xx-updates/20170920

[PATCH] mpt3sas: remove redundant copy_from_user in _ctl_getiocinfo

2017-09-20 Thread Meng Xu
Since right after the user copy, we are going to memset(, 0, sizeof(karg)), the copy_from_user is redundant Signed-off-by: Meng Xu --- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c

Re: [PATCH] mpt3sas: downgrade full copy_from_user to access_ok check

2017-09-20 Thread Christoph Hellwig
On Tue, Sep 19, 2017 at 11:11:11PM -0400, Meng Xu wrote: > Since right after the user copy, we are going to > memset(, 0, sizeof(karg)), I guess an access_ok check is enough? The right thing is to remove it entirely.

[PATCH] scsi: libfc: fix potential null lport dereference

2017-09-20 Thread Colin King
From: Colin Ian King Don't pass a null lport to FC_LPORT_DBG as this causes a null pointer dereference when accessing lport->host and lport->port_id. Instead use the FC_CHECK_LOGGING macro to print the kernel message via pr_info. Detected by CoverityScan, CID#113198

Re: [PATCH] scsi_transport_fc: set scsi_target_id upon rescan

2017-09-20 Thread Chad Dupuis
On Wed, 20 Sep 2017, 2:58am, Hannes Reinecke wrote: > From: Hannes Reinecke > > When an rport is found in the bindings array there is no guarantee that > it had been a target port, so we need to call fc_remote_port_rolechg() > here to ensure the scsi_target_id is set correctly.

Re: [PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-20 Thread Ilya Dryomov
On Tue, Sep 19, 2017 at 10:32 PM, Christoph Hellwig wrote: > On Wed, Sep 06, 2017 at 07:38:10PM +0200, Ilya Dryomov wrote: >> sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to >> permit trying WRITE SAME on older SCSI devices, unless ->no_write_same >> is set.

Re: [PATCH 2/2] scsi_dh: suppress errors from unsupported devices

2017-09-20 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH 1/2] scsi_dh: Return SCSI_DH_XX error code from ->attach()

2017-09-20 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH] scsi_transport_fc: set scsi_target_id upon rescan

2017-09-20 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v3 1/3] nvme_fc: create fc class and transport device

2017-09-20 Thread Johannes Thumshirn
On Mon, Sep 18, 2017 at 09:13:30AM -0700, Christoph Hellwig wrote: > Looks ok, > > although I really wish we could come up with some common FC code, > including making the existing FC drivers use more infrastructure > from libfc.. the problem with libfc currently is it is made for fcoe, despite

[PATCH] scsi: ufs: add ufs a command complete time stamp

2017-09-20 Thread Zang Leigang
Signed-off-by: Zang Leigang diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 794a4600e952..2984f33095be 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -385,6 +385,8 @@ void ufshcd_print_trs(struct ufs_hba *hba,

Re: [PATCH] fcoe-utils: Fix get_ctlr_num() for large ctlr_* indices

2017-09-20 Thread Johannes Thumshirn
Applied, thanks. -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint =

[PATCH 2/2] scsi_dh: suppress errors from unsupported devices

2017-09-20 Thread Hannes Reinecke
Device handlers are optional, and for some handlers like ALUA only implemented for certain device types. So suppress any errors for unsupported devices. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_dh.c| 19 +-- drivers/scsi/scsi_priv.h | 4 ++--

[PATCH 0/2] scsi_dh: suppress errors from unsupported devices

2017-09-20 Thread Hannes Reinecke
From: Hannes Reinecke Hi all, here's a small patchset to suppress errors from scsi_dh_attach() for unsupported devices. As usual, comments and reviews are welcome. Hannes Reinecke (2): scsi_dh: Return SCSI_DH_XX error code from ->attach() scsi_dh: suppress errors from

[PATCH 1/2] scsi_dh: Return SCSI_DH_XX error code from ->attach()

2017-09-20 Thread Hannes Reinecke
Rather than having each device handler implementing their own error mapping have the ->attach() call return a SCSI_DH_XXX error code and implement the mapping in scsi_dh_handler_attach(). Suggested-by: Christoph Hellwig Signed-off-by: Hannes Reinecke ---

[PATCH] scsi_transport_fc: set scsi_target_id upon rescan

2017-09-20 Thread Hannes Reinecke
From: Hannes Reinecke When an rport is found in the bindings array there is no guarantee that it had been a target port, so we need to call fc_remote_port_rolechg() here to ensure the scsi_target_id is set correctly. Otherwise the port will never be scanned. Signed-off-by: Hannes