Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread James Bottomley
On Sat, 2019-10-12 at 10:03 +0800, zhengbin (A) wrote: > On 2019/10/12 9:58, James Bottomley wrote: > > On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote: > > > BTW: we can't just init sshdr->response_code, sr_do_ioctl use > > > sshdr->sense_key > > &g

Re: [PATCH v2] scsi: core: fix uninit-value access of variable sshdr

2019-10-11 Thread James Bottomley
On Sat, 2019-10-12 at 09:26 +0800, zhengbin wrote: > BTW: we can't just init sshdr->response_code, sr_do_ioctl use > sshdr->sense_key That's an actual bug, isn't it? James

Re: [PATCH v3 17/20] sg: add sg_iosubmit_v3 and sg_ioreceive_v3 ioctls

2019-08-12 Thread James Bottomley
On Mon, 2019-08-12 at 12:14 -0400, Tony Battersby wrote: > On 8/12/19 11:37 AM, Douglas Gilbert wrote: > > On 2019-08-09 7:15 p.m., James Bottomley wrote: > > > On Wed, 2019-08-07 at 13:42 +0200, Douglas Gilbert wrote: > > > > Add ioctl(SG_IOSUBMIT_V3) and

Re: [PATCH v3 07/20] sg: move header to uapi section

2019-08-12 Thread James Bottomley
On Mon, 2019-08-12 at 07:24 -0700, Christoph Hellwig wrote: > [note: question for the linux-spdx audience below] > > > - > > #ifdef __KERNEL__ > > extern int sg_big_buff; /* for sysctl */ > > #endif > > FYI, these __KERNEL__ ifdefs in non-uapi headers should go away. > > > > > +/* > > + * I

Re: [PATCH v3 17/20] sg: add sg_iosubmit_v3 and sg_ioreceive_v3 ioctls

2019-08-09 Thread James Bottomley
On Wed, 2019-08-07 at 13:42 +0200, Douglas Gilbert wrote: > Add ioctl(SG_IOSUBMIT_V3) and ioctl(SG_IORECEIVE_V3). These ioctls > are meant to be (almost) drop-in replacements for the write()/read() > async version 3 interface. They only accept the version 3 interface. I don't think we should do th

Re: [PATCH v3 13/20] sg: add sg v4 interface support

2019-08-09 Thread James Bottomley
On Wed, 2019-08-07 at 13:42 +0200, Douglas Gilbert wrote: > Add support for the sg v4 interface based on struct sg_io_v4 found > in include/uapi/linux/bsg.h and only previously supported by the > bsg driver. Add ioctl(SG_IOSUBMIT) and ioctl(SG_IORECEIVE) for > async (non-blocking) usage of the sg v

Re: [PATCH 3/4] Complain if scsi_target_block() fails

2019-07-26 Thread James Bottomley
On Fri, 2019-07-26 at 11:00 -0700, Bart Van Assche wrote: > On 7/26/19 10:00 AM, James Bottomley wrote: > > On Fri, 2019-07-26 at 09:48 -0700, Bart Van Assche wrote: > > > If scsi_target_block() fails that can break the code that calls > > > this > > >

Re: [PATCH 3/4] Complain if scsi_target_block() fails

2019-07-26 Thread James Bottomley
On Fri, 2019-07-26 at 09:48 -0700, Bart Van Assche wrote: > If scsi_target_block() fails that can break the code that calls this > function. Hence complain loudly if scsi_target_block() fails. > > Cc: Christoph Hellwig > Cc: Hannes Reinecke > Cc: Johannes Thumshirn > Cc: Ming Lei > Signed-off-

Re: [PATCH] fcoe: avoid memset across pointer boundaries

2019-07-20 Thread James Bottomley
On Sat, 2019-07-20 at 12:21 -0700, Linus Torvalds wrote: > On Tue, Jun 4, 2019 at 2:30 AM Hannes Reinecke wrote: > > > > Gcc-9 complains for a memset across pointer boundaries, which > > happens as the code tries to allocate a flexible array on the > > stack. Turns out we cannot do this without r

Re: [PATCH] scsi: mpt3sas: clean up a sizeof()

2019-06-26 Thread James Bottomley
On Wed, 2019-06-26 at 13:12 +0300, Dan Carpenter wrote: > This patch is just a cleanup and doesn't change run time because both > sizeof EVENT and SCSI are 84 bytes. But this is clearly a cut and > paste > error and the SCSI struct was intended. > > Signed-off-by: Dan Carpenter > --- > drivers/

Re: [PATCH] scsi: mvumi: fix build warning

2019-06-20 Thread James Bottomley
On Thu, 2019-06-20 at 14:26 +0800, Ming Lei wrote: > The local variable 'sg' should be initialized in the failure path of > mvumi_make_sgl(), otherwise the following build warning is triggered: > > In file included from include/linux/pci-dma-compat.h:8, >from include/

Re: [PATCH V2 00/15] scsi: use sg helper to operate sgl

2019-06-13 Thread James Bottomley
On Thu, 2019-06-13 at 15:13 +0800, Ming Lei wrote: > Hi, > > Most of drivers use sg helpers to operate sgl, however there is > still a few drivers which operate sgl directly, this way can't > work in case of chained sgl. This isn't a useful explanation of the issue you make it sound like a bug, w

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread James Bottomley
On Thu, 2019-06-13 at 12:16 +0200, Greg Kroah-Hartman wrote: > On Thu, Jun 13, 2019 at 06:04:11PM +0800, Ming Lei wrote: > > On Thu, Jun 13, 2019 at 11:52:14AM +0200, Greg Kroah-Hartman wrote: > > > On Thu, Jun 13, 2019 at 03:13:28PM +0800, Ming Lei wrote: > > > > The current way isn't safe for cha

Re: [PATCH 2/5] scsi: advansys: use sg helper to operate sgl

2019-06-11 Thread James Bottomley
On Wed, 2019-06-12 at 09:39 +0800, Ming Lei wrote: > Hi Martin, > > On Tue, Jun 11, 2019 at 07:50:01PM -0400, Martin K. Petersen wrote: > > > > Ming, > > > > > 1) revert the 3 first, then re-organize the whole patchset in > > > correct order(convert drivers first, then the 3 above drivers) > > >

Re: [PATCH 2/5] scsi: advansys: use sg helper to operate sgl

2019-06-10 Thread James Bottomley
On Mon, 2019-06-10 at 15:36 -0400, Ewan D. Milne wrote: > On Mon, 2019-06-10 at 11:37 -0700, James Bottomley wrote: > > On Mon, 2019-06-10 at 23:03 +0800, Ming Lei wrote: > > > The current way isn't safe for chained sgl, so use sgl helper to > > > operate sgl. >

Re: [PATCH 1/5] scsi: vmw_pscsi: use sgl helper to operate sgl

2019-06-10 Thread James Bottomley
On Mon, 2019-06-10 at 23:03 +0800, Ming Lei wrote: > The current way isn't safe for chained sgl, so use sgl helper to > operate sgl. This also isn't a chained driver. However, this driver seems to achieve this by magic number matching, which looks unsafe. I'd really prefer it if vmw_pvscsi.h had

Re: [PATCH 3/5] scsi: ipr: use sg helper to operate sgl

2019-06-10 Thread James Bottomley
On Mon, 2019-06-10 at 23:03 +0800, Ming Lei wrote: > The current way isn't safe for chained sgl, so use sg helper to > operate sgl. ipr doesn't use chaining, so it can likewise assume a contiguous scatterlist. Since the hardware seems to have a 64 entry limit, it looks like it never will use chai

Re: [PATCH 2/5] scsi: advansys: use sg helper to operate sgl

2019-06-10 Thread James Bottomley
On Mon, 2019-06-10 at 23:03 +0800, Ming Lei wrote: > The current way isn't safe for chained sgl, so use sgl helper to > operate sgl. The advansys driver doesn't currently use a chained scatterlist. In theory it could; the if (shost->sg_tablesize > SG_ALL) { shost->sg_tab

Re: [PATCH] mptsas: fix undefined behaviour of a shift of an int by more than 31 places

2019-05-09 Thread James Bottomley
On Thu, 2019-05-09 at 17:30 +0200, Hannes Reinecke wrote: > On 5/8/19 4:24 PM, James Bottomley wrote: > > On Wed, 2019-05-08 at 14:07 +0100, Colin Ian King wrote: > > > On 05/05/2019 04:34, James Bottomley wrote: > > > > On Sat, 2019-05-04 at 17:40 +0100, Colin Kin

Re: [PATCH] mptsas: fix undefined behaviour of a shift of an int by more than 31 places

2019-05-08 Thread James Bottomley
On Wed, 2019-05-08 at 14:07 +0100, Colin Ian King wrote: > On 05/05/2019 04:34, James Bottomley wrote: > > On Sat, 2019-05-04 at 17:40 +0100, Colin King wrote: > > > From: Colin Ian King > > > > > > Currently the shift of int value 1 by more than 31 places can

[GIT PULL] first round of SCSI updates for the 5.1+ merge window

2019-05-07 Thread James Bottomley
2xxx: Silence Successful ELS IOCB message scsi: qla2xxx: Fix read offset in qla24xx_load_risc_flash() scsi: qla2xxx: Update driver version to 10.01.00.16-k scsi: qla2xxx: Fix NULL pointer crash due to stale CPUID scsi: qla2xxx: Update driver version to 10.01.00.15-k J

Re: [PATCH] mptsas: fix undefined behaviour of a shift of an int by more than 31 places

2019-05-04 Thread James Bottomley
On Sat, 2019-05-04 at 17:40 +0100, Colin King wrote: > From: Colin Ian King > > Currently the shift of int value 1 by more than 31 places can result > in undefined behaviour. Fix this by making the 1 a ULL value before > the shift operation. Fusion SAS is pretty ancient. I thought the largest o

Re: [PATCH 2/2] scsi: core: avoid to pre-allocate big chunk for sg list

2019-04-24 Thread James Bottomley
On Wed, 2019-04-24 at 09:09 -0700, Bart Van Assche wrote: > On Wed, 2019-04-24 at 08:49 -0700, James Bottomley wrote: > > On Wed, 2019-04-24 at 08:32 -0700, Bart Van Assche wrote: > > > Another concern is whether this change can cause a livelock. If > > > the system i

Re: [PATCH 2/2] scsi: core: avoid to pre-allocate big chunk for sg list

2019-04-24 Thread James Bottomley
On Wed, 2019-04-24 at 08:32 -0700, Bart Van Assche wrote: > On Wed, 2019-04-24 at 08:24 -0700, James Bottomley wrote: > > On Wed, 2019-04-24 at 15:52 +0800, Ming Lei wrote: > > > On Tue, Apr 23, 2019 at 08:37:15AM -0700, Bart Van Assche wrote: > > > > On Tue, 2019-

Re: [PATCH 2/2] scsi: core: avoid to pre-allocate big chunk for sg list

2019-04-24 Thread James Bottomley
On Wed, 2019-04-24 at 15:52 +0800, Ming Lei wrote: > On Tue, Apr 23, 2019 at 08:37:15AM -0700, Bart Van Assche wrote: > > On Tue, 2019-04-23 at 18:32 +0800, Ming Lei wrote: > > > #define SCSI_INLINE_PROT_SG_CNT 1 > > > > > > +#define SCSI_INLINE_SG_CNT 2 > > > > So this patch inserts one km

[GIT PULL] SCSI fixes for 5.1-rc5

2019-04-20 Thread James Bottomley
Three minor fixes: two obvious ones in drivers and a fix to the SG_IO path to correctly return status on error. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Christoph Hellwig (1): scsi: aic7xxx: fix EISA suppor

[GIT PULL] SCSI fixes for 5.1-rc4

2019-04-13 Thread James Bottomley
One obvious fix for a ciostor data corruption on error bug. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Varun Prakash (1): scsi: csiostor: fix missing data copy in csio_scsi_err_handler() And the diffstat:

[GIT PULL] SCSI fixes for 5.1-rc3

2019-04-06 Thread James Bottomley
five small fixes. Four in three drivers: qedi, lpfc and storvsc. The final one is labelled core, but merely adds a dh rdac entry for Lenovo systems. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Colin Ian King (1):

Re: [PATCH 25/30] lpfc: Reduce memory footprint for lpfc_queue

2019-03-20 Thread James Bottomley
On Tue, 2019-03-19 at 20:35 -0700, James Smart wrote: > > On Mar 19, 2019, at 6:02 PM, James Bottomley > nPartnership.com> wrote: > > > > On Tue, 2019-03-12 at 16:30 -0700, James Smart wrote: > > > Currently the driver maintains a sideband structure which h

Re: [PATCH 25/30] lpfc: Reduce memory footprint for lpfc_queue

2019-03-19 Thread James Bottomley
On Tue, 2019-03-12 at 16:30 -0700, James Smart wrote: > Currently the driver maintains a sideband structure which has a > pointer for each queue element. However, at 8bytes a pointer, and up > to 4k elements per queue, and 100's of queues, this can take up a lot > of memory. > > Convert the driver

Re: [PATCH] scsi_debug: fix write_same with virtual_gb problem

2019-03-19 Thread James Bottomley
On Tue, 2019-03-19 at 15:37 -0400, Martin K. Petersen wrote: > Bart, > > > Sorry, I was looking at the wrong branch. The patch is in Linus' > > master but it seems like that patch is not yet in your 5.1/scsi- > > queue branch? > > It wouldn't be as 5.1/scsi-queue is based on 5.0-rc1 and the fix w

[GIT PULL] first round of SCSI updates for the 5.0+ merge window

2019-03-06 Thread James Bottomley
This is mostly update of the usual drivers: arcmsr, qla2xxx, lpfc, hisi_sas, target/iscsi and target/core. Additionally Christoph refactored gdth as part of the dma changes. The major mid-layer change this time is the removal of bidi commands and with them the whole of the osd/exofs driver and fi

[GIT PULL] SCSI fixes for 5.0-rc7

2019-03-02 Thread James Bottomley
Nine small fixes. The resume fix is a cosmetic removal of a warning with an incorrect condition causing it to alarm people wrongly. The other eight patches correct a thinko in Christoph Hellwig's DMA conversion series. Without it all these drivers end up with 32 bit DMA masks meaning they bounce

Re: [PATCH v2] scsi: smartpqi_init: Reporting 'logical unit failure'

2019-03-01 Thread James Bottomley
On Fri, 2019-03-01 at 15:43 +, Erwan Velu wrote: > Le 01/03/2019 à 16:26, James Bottomley a écrit : > > [...] > > Shouldn't this be a variant of sdev/scmd_printk? Otherwise it > > tells > > you what disk in the array terms is the problem but not what device

Re: [PATCH v2] scsi: smartpqi_init: Reporting 'logical unit failure'

2019-03-01 Thread James Bottomley
On Fri, 2019-03-01 at 15:58 +0100, Erwan Velu wrote: > + dev_err_ratelimited(&ctrl_info->pci_dev- > >dev, "received 'logical unit failure' from controller for scsi > %d:%d:%d:%d\n", > + ctrl_info- > >scsi_host->host_no, device-

[GIT PULL] SCSI fixes for 5.0-rc7

2019-02-22 Thread James Bottomley
Four small fixes: three in drivers and one in the core. The core fix is also minor in scope since the bug it fixes is only known to affect systems using SCSI reservations. Of the driver bugs, the libsas one is the most major because it can lead to multiple disks on the same expander not being ex

Re: [PATCH] scsi: mvumi: fix 32 bit shift of a 32 bit unsigned int

2019-02-18 Thread James Bottomley
On Mon, 2019-02-18 at 12:37 +0300, Dan Carpenter wrote: > On Sat, Feb 16, 2019 at 05:27:16PM +0100, Walter Harms wrote: > > Am 16.02.2019 15:44, schrieb Colin King: > > > From: Colin Ian King > > > > > > Currently m_sg->baseaddr_h (a 32 bit unsigned int) is being > > > shifted by a > > > total of

[GIT PULL] SCSI fixes for 5.0-rc

2019-02-15 Thread James Bottomley
delay before the affected systems allow logins after reboot. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Bill Kuzeja (1): scsi: qla2xxx: Fix panic from use after free in qla2x00_async_tm_cmd James Bottomley (1

Re: [PATCH -next] scsi: lpfc: Remove set but not used variable 'phys_id'

2019-02-14 Thread James Bottomley
On Thu, 2019-02-14 at 13:19 -0800, James Smart wrote: > > On 2/14/2019 11:39 AM, James Bottomley wrote: > > On Thu, 2019-02-14 at 10:52 -0800, James Smart wrote: > > > On 2/13/2019 5:51 PM, YueHaibing wrote: > > > > Fixes gcc '-Wunused-but-set-variable'

Re: [PATCH -next] scsi: lpfc: Remove set but not used variable 'phys_id'

2019-02-14 Thread James Bottomley
On Thu, 2019-02-14 at 10:52 -0800, James Smart wrote: > > On 2/13/2019 5:51 PM, YueHaibing wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > > > drivers/scsi/lpfc/lpfc_init.c: In function > > 'lpfc_cpu_affinity_check': > > drivers/scsi/lpfc/lpfc_init.c:10599:19: warning: > > variabl

[PATCH] scsi: sd: fix entropy gathering for most rotational disks

2019-02-12 Thread James Bottomley
i: sd: Contribute to randomness when running rotational device") Cc: sta...@vger.kernel.org Signed-off-by: James Bottomley --- I updated this slightly over the original proposal so we set the flags even if the device doesn't have any VPD pages, so it should work for very old disks. di

Re: [5.0-rc5 regression] "scsi: kill off the legacy IO path" causes 5 minute delay during boot on Sun Blade 2500

2019-02-12 Thread James Bottomley
On Mon, 2019-02-11 at 19:50 -0700, Jens Axboe wrote: > On 2/11/19 7:13 PM, James Bottomley wrote: > > On Mon, 2019-02-11 at 09:31 -0700, Jens Axboe wrote: > > > On 2/11/19 9:28 AM, James Bottomley wrote: > > > > On Mon, 2019-02-11 at 08:46 -0700, Jens Axboe wrote

Re: [5.0-rc5 regression] "scsi: kill off the legacy IO path" causes 5 minute delay during boot on Sun Blade 2500

2019-02-11 Thread James Bottomley
On Tue, 2019-02-12 at 03:37 +, Elliott, Robert (Persistent Memory) wrote: > > -Original Message- > > From: linux-kernel-ow...@vger.kernel.org > ow...@vger.kernel.org> On Behalf Of Jens Axboe > > Sent: Monday, February 11, 2019 8:50 PM > > To: James Bot

Re: [5.0-rc5 regression] "scsi: kill off the legacy IO path" causes 5 minute delay during boot on Sun Blade 2500

2019-02-11 Thread James Bottomley
On Mon, 2019-02-11 at 09:31 -0700, Jens Axboe wrote: > On 2/11/19 9:28 AM, James Bottomley wrote: > > On Mon, 2019-02-11 at 08:46 -0700, Jens Axboe wrote: > > > On 2/11/19 8:42 AM, James Bottomley wrote: > > > > On Mon, 2019-02-11 at 08:28 -0700, Jens Axboe wrote

[GIT PULL] SCSI fixes for 5.0-rc5

2019-02-08 Thread James Bottomley
here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Damien Le Moal (1): scsi: sd_zbc: Fix zone information messages David Disseldorp (1): scsi: target: make the pi_prot_format ConfigFS path readable James Bottomley (1): scsi: ai

[GIT PULL] SCSI fixes for 5.0-rc4

2019-02-01 Thread James Bottomley
Five minor bug fixes. The libfc one is a tiny memory leak, the zfcp one is an incorrect user visible parameter and the rest are on error legs or obscure features. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Dan Car

Re: [PATCH] scsi: aic94xx: fix module loading

2019-02-01 Thread James Bottomley
On Wed, 2019-01-30 at 16:42 -0800, James Bottomley wrote: > The aic94xx driver is currently failing to load with errors like > > sysfs: cannot create duplicate filename > '/devices/pci:00/:00:03.0/:02:00.3/:07:02.0/revision' > > Because the PCI co

[PATCH] scsi: aic94xx: fix module loading

2019-01-30 Thread James Bottomley
..@vger.kernel.org Signed-off-by: James Bottomley --- Patch is currently compile tested only ... I'm just excavating my aic94xx based sas system from the unused equipment pile in the garage. diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 41c

Re: [Bug 201609] sysfs duplicate filename on driver loading Adaptec AIC-9410W

2019-01-30 Thread James Bottomley
On Wed, 2019-01-30 at 11:43 +, bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=201609 > > Emil Velikov (emil.l.veli...@gmail.com) changed: > >What|Removed |Added >

Re: [Bug 201609] sysfs duplicate filename on driver loading Adaptec AIC-9410W

2019-01-30 Thread James Bottomley
On Wed, 2019-01-30 at 14:21 +, bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=201609 > > Bjorn Helgaas (bhelg...@google.com) changed: > >What|Removed |Added >

Re: [Bug 201609] sysfs duplicate filename on driver loading Adaptec AIC-9410W

2019-01-25 Thread James Bottomley
On Sat, 2019-01-26 at 03:13 +, bugzilla-dae...@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=201609 > > Pablo Ruiz García (pablo.r...@gmail.com) changed: > >What|Removed |Added > ---

[GIT PULL] SCSI fixes for 5.0-rc3

2019-01-25 Thread James Bottomley
Six fixes, all of which appear to have user visible consequences. The DMA one is a regression fix from the merge window and of the others, four are driver specific and one specific to the target code. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-f

[GIT PULL] SCSI fixes for 5.0-rc2

2019-01-18 Thread James Bottomley
A set of 17 fixes. Most of these are minor or trivial. The one fix that may be serious is the isci one: the bug can cause hba parameters to be set from uninitialized memory. I don't think it's exploitable, but you never know. The patch is available here: git://git.kernel.org/pub/scm/linux/kern

Re: [PATCH] scsi: advansys: use struct_size() in kzalloc()

2019-01-11 Thread James Bottomley
On Fri, 2019-01-11 at 08:54 -0800, Matthew Wilcox wrote: > On Fri, Jan 11, 2019 at 08:41:43AM -0800, James Bottomley wrote: > > On Fri, 2019-01-11 at 16:46 +0100, Hannes Reinecke wrote: > > > > - asc_sg_head = kzalloc(sizeof(asc_scs

Re: [PATCH] scsi: advansys: use struct_size() in kzalloc()

2019-01-11 Thread James Bottomley
On Fri, 2019-01-11 at 16:46 +0100, Hannes Reinecke wrote: > On 1/4/19 10:22 PM, Gustavo A. R. Silva wrote: > > One of the more common cases of allocation size calculations is > > finding the > > size of a structure that has a zero-sized array at the end, along > > with memory > > for some number of

Re: PROBLEM: syzkaller found / pool corruption-overwrite / page in user-area or NULL

2019-01-10 Thread James Bottomley
On Thu, 2019-01-10 at 19:12 +, Esme wrote: > Sorry for the resend some mail servers rejected the mime type. > > Hi, I've been getting more into Kernel stuff lately and forged ahead > with some syzkaller bug finding. I played with reducing it further > as you can see from the attached c code b

Re: [PATCH v3] scsi: add debugfs directories

2019-01-04 Thread James Bottomley
On Fri, 2019-01-04 at 13:34 -0500, Douglas Gilbert wrote: > On 2019-01-04 11:52 a.m., James Bottomley wrote: > > On Fri, 2019-01-04 at 11:18 -0500, Douglas Gilbert wrote: > > > Add a top level "scsi" directory in debugfs (usually at > > > /sys/kernel/debugf

Re: [PATCH v3] scsi: add debugfs directories

2019-01-04 Thread James Bottomley
On Fri, 2019-01-04 at 11:18 -0500, Douglas Gilbert wrote: > Add a top level "scsi" directory in debugfs (usually at > /sys/kernel/debugfs/scsi) with two subdirectories: "uld" and "lld". > The idea is to place mid-level related 'knobs' in the "scsi" > directory, and for the ULDs to make subsirector

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-30 Thread James Bottomley
On Sun, 2018-12-30 at 18:50 +0100, LEROY Christophe wrote: > Arnd Bergmann a écrit : > > On Sat, Dec 29, 2018 at 3:51 AM Michael Schmitz > > wrote: [...] > > > (On second thought - I don't want to speculate whether there's > > > weird compiler options that could result in the > > > nvram_check_ch

[GIT PULL] first round of SCSI updates for the 4.20+ merge window

2018-12-24 Thread James Bottomley
si: libfc: fc_rport: Mark expected switch fall-through scsi: hpsa: mark expected switch fall-throughs scsi: aacraid: Mark expected switch fall-through scsi: aacraid: Mark expected switch fall-throughs Himanshu Madhani (2): scsi: qla2xxx: Update driver version to 10.00.00.12-k

Re: [PATCH] sd: use mempool for discard special page

2018-12-22 Thread James Bottomley
On Fri, 2018-12-21 at 20:49 -0700, Jens Axboe wrote: > On 12/21/18 7:48 PM, James Bottomley wrote: > > On Wed, 2018-12-12 at 06:46 -0700, Jens Axboe wrote: > > > When boxes are run near (or to) OOM, we have a problem with the > > > discard page allocation in sd. If we

[GIT PULL] SCSI fixes for 4.20-rc7

2018-12-21 Thread James Bottomley
This is two simple target fixes and one discard related I/O starvation problem in sd. The discard problem occurs because the discard page doesn't have a mempool backing so if the allocation fails due to memory pressure, we then lose the forward progress we require if the writeout is on the same de

Re: [PATCH] sd: use mempool for discard special page

2018-12-21 Thread James Bottomley
On Wed, 2018-12-12 at 06:46 -0700, Jens Axboe wrote: > When boxes are run near (or to) OOM, we have a problem with the > discard page allocation in sd. If we fail allocating the special > page, we return busy, and it'll get retried. But since ordering is > honored for dispatch requests, we can keep

Re: [PATCH 03/10] SCSI: fcoe: convert to use BUS_ATTR_WO

2018-12-21 Thread James Bottomley
[scsi list cc added] On Fri, 2018-12-21 at 08:54 +0100, Greg Kroah-Hartman wrote: > We are trying to get rid of BUS_ATTR() and the usage of that in the > fcoe driver can be trivially converted to use BUS_ATTR_WO(), so use > that instead. > > At the same time remove a unneeded EXPORT_SYMBOL() marki

[GIT PULL] SCSI fixes for 4.20-rc7

2018-12-18 Thread James Bottomley
Three fixes: The t10-pi one is a regression from the 4.19 release, the qla2xxx one is a 4.20 merge window regression and the bnx2fc is a very old bug. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Dan Carpenter (1):

Re: [PATCH] scsi: qla2xxx: fix unused function warning

2018-12-10 Thread James Bottomley
On Mon, 2018-12-10 at 22:28 +0100, Arnd Bergmann wrote: > On Mon, Dec 10, 2018 at 10:01 PM Bart Van Assche > wrote: > > > > On Mon, 2018-12-10 at 21:51 +0100, Arnd Bergmann wrote: > > > In what seems to be a mismatch between the scsi-fixes branch and > > > the scsi-mkp/for-next branch, a newly in

[GIT PULL] SCSI fixes for 4.20-rc5

2018-12-05 Thread James Bottomley
Four obvious bug fixes. The vmw_pscsi one is so old that it's amazing no-one noticed before now. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Cathy Avery (1): scsi: vmw_pscsi: Rearrange code to avoid multiple

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread James Bottomley
On Fri, 2018-11-30 at 14:26 -0800, Jarkko Sakkinen wrote: > On Fri, Nov 30, 2018 at 03:14:59PM -0700, Jonathan Corbet wrote: [...] > > Have you read Documentation/process/code-of-conduct- > > interpretation.rst? > > As has been pointed out, it contains a clear answer to how things > > should be in

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread James Bottomley
On Fri, 2018-11-30 at 14:12 -0800, Jarkko Sakkinen wrote: [...] > I pasted this already to another response and this was probably the > part that ignited me to send the patch set (was a few days ago, so > had to revisit to find the exact paragraph): I replied in to the other thread. > "Maintainer

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread James Bottomley
On Fri, 2018-11-30 at 13:54 -0800, Jarkko Sakkinen wrote: > On Fri, Nov 30, 2018 at 01:48:08PM -0800, David Miller wrote: > > From: Jarkko Sakkinen > > Date: Fri, 30 Nov 2018 13:44:05 -0800 > > > > > On Fri, Nov 30, 2018 at 01:01:02PM -0800, James Bottomley wrote:

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread James Bottomley
On Fri, 2018-11-30 at 13:44 -0800, Jarkko Sakkinen wrote: > On Fri, Nov 30, 2018 at 01:01:02PM -0800, James Bottomley wrote: > > No because use of what some people consider to be bad language > > isn't necessarily abusive, offensive or degrading. Our most > > heavily

Re: [PATCH RFC 00/15] Zero ****s, hugload of hugs <3

2018-11-30 Thread James Bottomley
On Fri, 2018-11-30 at 12:55 -0800, Jarkko Sakkinen wrote: > On Fri, Nov 30, 2018 at 11:56:52AM -0800, Davidlohr Bueso wrote: > > On Fri, 30 Nov 2018, Kees Cook wrote: > > > > > On Fri, Nov 30, 2018 at 11:27 AM Jarkko Sakkinen > > > wrote: > > > > > > > > In order to comply with the CoC, replace

Re: [PATCH RFC 11/15] scsi: replace **** with a hug

2018-11-30 Thread James Bottomley
On Fri, 2018-11-30 at 11:27 -0800, Jarkko Sakkinen wrote: > In order to comply with the CoC, replace with a hug. > > Signed-off-by: Jarkko Sakkinen > --- > drivers/scsi/qlogicpti.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/qlogicpti.h b/drivers/s

Re: [PATCH] scsi: libsas: Add missing license and update to SPDX license identifier

2018-11-29 Thread James Bottomley
> > I could not find a docment for guidance on this. I also note that > making sas_task.c v2 would mean mixing v2 and v2+ into the module. The point here is to get help. There are three pieces of evidence in the file one for v2+ and two for v2. So you can look in the git tree to when it

Re: linux-next: Tree for Nov 27 (scsi/aha1542)

2018-11-27 Thread James Bottomley
On Wed, 2018-11-28 at 15:38 +1100, Stephen Rothwell wrote: > Hi all, > > On Tue, 27 Nov 2018 20:14:58 -0800 Randy Dunlap g> wrote: > > > > On 11/26/18 8:25 PM, Stephen Rothwell wrote: > > > Hi all, > > > > > > Changes since 20181126: > > > > > > > on i386: > > > > ERROR: "__udivdi3" [drive

[GIT PULL] SCSI fixes for 4.20-rc3

2018-11-21 Thread James Bottomley
Two small fixes. The qla2xxx is a regression from 4.18 and the ufs one is a device enablement fix. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Bill Kuzeja (1): scsi: qla2xxx: Timeouts occur on surprise remova

Re: [PATCH] drivers/scsi/fnic/fnic_trace.c: Use vzalloc

2018-11-13 Thread James Bottomley
On Tue, 2018-11-13 at 16:53 +0100, Johannes Thumshirn wrote: > On 13/11/2018 16:44, John Garry wrote: > > On 13/11/2018 15:08, Sabyasachi Gupta wrote: [...] > > > -fnic_trace_buf_p = (unsigned long)vmalloc((trace_max_pages * > > > PAGE_SIZE)); > > > +fnic_trace_buf_p = (unsigned long)vzallo

[GIT PULL] SCSI fixes for 4.20-rc2

2018-11-13 Thread James Bottomley
This is mostly a set of minor and obvious fixes (three in one of the new drivers). The only substantial change is to move the ufs to the blk-mq now that the merge window fixed the suspend/resume issues with blk-mq. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/s

[GIT PULL] final round of SCSI updates for the 4.19+ merge window

2018-11-02 Thread James Bottomley
This is a set of minor small (and safe changes) that didn't make the initial pull request plus some bug fixes. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-misc The short changelog is: Bart Van Assche (7): scsi: qla2xxx: Remove two argume

Re: [PATCH] scsi: aic7xxx: Fix unintended sign extension issue

2018-10-25 Thread James Bottomley
On Thu, 2018-10-25 at 16:13 +0100, Colin King wrote: > From: Colin Ian King > > In the expression "ahc_inb(ahc, port+3) << 24", the initial value is > a u8, but is promoted to a signed int, then sign-extended to > uint64_t. Why is this, that's highly non intuitive? The compiler is supposed to p

[GIT PULL] first round of SCSI updates for the 4.19+ merge window

2018-10-24 Thread James Bottomley
scsi: qla2xxx: Update driver to version 10.00.00.09-k scsi: qla2xxx: Fix incorrect port speed being set for FC adapters Igor Stoppa (1): scsi: core: remove unnecessary unlikely() James Bottomley (1): scsi: myrs: fix build failure on 32 bit James Smart (11): scsi: lpfc: upd

Re: [PATCH] scsi: lpfc: Uninitialized variable in lpfc_debugfs_nodelist_data()

2018-10-22 Thread James Bottomley
On Mon, 2018-10-22 at 09:50 +0300, Dan Carpenter wrote: > There was a merge problem and we accidentally removed the "nrport" > initialization. > > Fixes: 77c5bf5647b5 ("Merge branch 'misc' into for-next") > Signed-off-by: Dan Carpenter > --- > drivers/scsi/lpfc/lpfc_debugfs.c | 2 +- > 1 file ch

[PATCH] scsi: myrs: fix build failure on 32 bit

2018-10-18 Thread James Bottomley
test robot Signed-off-by: James Bottomley --- drivers/scsi/myrs.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c index b02ee0b0dd55..a9f9c77e889f 100644 --- a/drivers/scsi/myrs.c +++ b/drivers/scsi/myrs.c @@ -1978

Re: [scsi:misc 194/233] ERROR: "__aeabi_uldivmod" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread James Bottomley
On Thu, 2018-10-18 at 10:28 -0700, James Bottomley wrote: > On Fri, 2018-10-19 at 01:18 +0800, kbuild test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.g > > it > > misc > > head: 4d5b4ac1eae471bcd0fa381a

Re: [scsi:misc 194/233] ERROR: "__aeabi_uldivmod" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread James Bottomley
On Fri, 2018-10-19 at 01:18 +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git > misc > head: 4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d > commit: 77266186397c6c782a3f670d32808a9671806ec5 [194/233] scsi: > myrs: Add Mylex RAID controller (SCSI i

Re: [possible bug] critical target error (out of range) when sending UNMAP on lsi2308 (mpt3sas) for the last sector of the drive

2018-10-10 Thread James Bottomley
On Wed, 2018-10-10 at 16:55 +0200, Michal Soltys wrote: > Hi, > > I have a server with old server with lsi2308 ("it" mode) and sas2x36 > expander in front. I've been testing how it handles ssd drives (among > those if/how it copes with unmap). And it looks like > stomped on a bug (it's 100% reprod

[GIT PULL] SCSI fixes for 4.19-rc5

2018-10-06 Thread James Bottomley
Small fix for an unititialized mutex in the qedi driver. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Nilesh Javali (1):   scsi: qedi: Initialize the stats mutex lock and the diffstat:  drivers/scsi/qedi/qedi_m

[GIT PULL] SCSI fixes for 4.19-rc5

2018-09-25 Thread James Bottomley
Nine obvious bug fixes mostly in individual drivers. The target fix is of particular importance because it's CVE related. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Adrian Hunter (1):   scsi: ufs: Disable blk-

[GIT PULL] SCSI fixes for 4.19-rc3

2018-09-19 Thread James Bottomley
A couple of small but important fixes, one affecting big endian and the other fixing a BUG_ON in scatterlist processing. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Dan Carpenter (1): scsi: qla2xxx: Fix an end

Re: [PATCH v4] libata: Add hwmon support for SMART temperature sensors

2018-09-14 Thread James Bottomley
On Thu, 2018-09-13 at 16:22 +0200, Linus Walleij wrote: [...] > + /* Send ATA command to read SMART values */ > + memset(scsi_cmd, 0, sizeof(scsi_cmd)); > + scsi_cmd[0] = ATA_16; > + scsi_cmd[1] = (4 << 1); /* PIO Data-in */ > + /* > +  * No off.line or cc, read from dev, bl

[GIT PULL] SCSI fixes for 4.19-rc3

2018-09-12 Thread James Bottomley
Three fixes, all in drivers (qedi and iscsi target) so no wider impact even if the code changes are a bit extensive. The patch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-fixes The short changelog is: Mike Christie (1):   scsi: iscsi: target: Fix conn

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-07-03 Thread James Bottomley
On Tue, 2018-07-03 at 22:49 +0900, David Miller wrote: > From: Sreekanth Reddy > Date: Tue, 3 Jul 2018 17:48:49 +0530 > > > Any suggestion/update over my previous mail. I am using 4.13 > kernel. > > I think the issue is that if you are reading a 32-bit word and then > interpreting it as a struct

Re: [PATCH] mpt3sas: Fix for regression caused due to cf6bf9710c patch

2018-06-29 Thread James Bottomley
On Fri, 2018-06-29 at 10:58 -0400, Chaitra P B wrote: >  "scsi: mpt3sas: Bug fix for big endian systems" > > Above patch with commit id "cf6bf9710cabba1fe94a4349f4eb8db623c77ebc" > was posted to fix sparse warnings. While posting this patch it was > assumed that readl() & writel() APIs internally

Re: [PATCH v2] scsi: qla2xxx: Spinlock recursion in qla_target

2018-06-13 Thread James Bottomley
On Wed, 2018-06-13 at 16:13 +, Madhani, Himanshu wrote: > > On Jun 13, 2018, at 6:05 AM, Mikhail Malygin > > wrote: > > > > Here is the patch used for verification: > > > > [PATCH] scsi: qla2xxx: Fixup spinlock recursion in qla_target > > > > The patch reverts changes done in qlt_schedule_s

Re: sd 6:0:0:0: [sdb] Unaligned partial completion

2018-06-11 Thread James Bottomley
On Mon, 2018-06-11 at 14:59 -0700, Ted Cabeen wrote: > On 06/11/2018 02:40 PM, James Bottomley wrote: > > On Mon, 2018-06-11 at 12:20 -0400, Douglas Gilbert wrote: > > > I have also seen Aborted Command sense when doing heavy testing > > > on one or more SAS disks behi

Re: RAID6: "Bad block number requested"

2018-06-11 Thread James Bottomley
On Mon, 2018-06-11 at 17:56 -0400, Bryan Gurney wrote: > On Mon, Jun 11, 2018 at 1:00 PM, Anthony Youngman > wrote: > > On 11/06/18 16:06, James Bottomley wrote: > > > Well, this is the problem: a 4k logical (presumably 4k physical) > > > drive cannot be addressed

Re: sd 6:0:0:0: [sdb] Unaligned partial completion

2018-06-11 Thread James Bottomley
[readd linux-scsi] On Mon, 2018-06-11 at 14:43 -0700, Ted Cabeen wrote: > On 06/11/2018 02:40 PM, James Bottomley wrote: > > > I have also seen Aborted Command sense when doing heavy testing > > > on one or more SAS disks behind a SAS expander. I put it down to > >

Re: sd 6:0:0:0: [sdb] Unaligned partial completion

2018-06-11 Thread James Bottomley
On Mon, 2018-06-11 at 12:20 -0400, Douglas Gilbert wrote: > On 2018-06-11 12:07 PM, Ted Cabeen wrote: > > I'm seeing a similar behavior on my system, but across multiple > > devices on a SAS drive array (front bays on a Supermicro-based > > system with onboard mpt3sas card).  > > The Sense Key here

Re: RAID6: "Bad block number requested"

2018-06-11 Thread James Bottomley
On Mon, 2018-06-11 at 11:18 -0400, Douglas Gilbert wrote: > On 2018-06-11 11:06 AM, James Bottomley wrote: > > On Mon, 2018-06-11 at 16:24 +0200, Sebastian Hegler wrote: > > > Dear all, > > > > > > First off: sorry for cross-posting. I don't know if t

Re: RAID6: "Bad block number requested"

2018-06-11 Thread James Bottomley
On Mon, 2018-06-11 at 16:24 +0200, Sebastian Hegler wrote: > Dear all, > > First off: sorry for cross-posting. I don't know if this is a RAID > issue or a SCSI issue, so I'll just ask y'all. > > > For a RAID6 capacity upgrade (higher capacity drives), we bought some > 10TB disks: > =

  1   2   3   4   5   6   7   8   9   10   >