Re: [PATCH] cdrom: information leak in cdrom_ioctl_media_changed()

2018-04-18 Thread Christoph Hellwig
On Wed, Apr 18, 2018 at 12:51:31PM +0300, Dan Carpenter wrote: > This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned > long. The way the check is written now, if one of the high 32 bits is > set then we could read outside the info->slots[] array. > > This bug is pretty old

Re: [PATCH] lightnvm: pblk: take bitmap alloc. out of critical section

2018-04-18 Thread Javier González
> On 17 Apr 2018, at 04.48, Matias Bjørling wrote: > > On 4/16/18 12:21 PM, Javier González wrote: >> Allocate line bitmaps outside of the line lock on line preparation. >> Signed-off-by: Javier González > > > The patch description tells what the patch

Re: [RFC PATCH 00/79] Generic page write protection and a solution to page waitqueue

2018-04-18 Thread Jan Kara
Hello, so I finally got to this :) On Wed 04-04-18 15:17:50, jgli...@redhat.com wrote: > From: Jérôme Glisse > > https://cgit.freedesktop.org/~glisse/linux/log/?h=generic-write-protection-rfc > > This is an RFC for LSF/MM discussions. It impacts the file subsystem, > the

Re: [PATCH 3/4] blk: add blk_queue_fua() helper function

2018-04-18 Thread Jens Axboe
On 4/17/18 10:08 PM, Dave Chinner wrote: > From: Dave Chinner > > So we can check FUA support status from the iomap direct IO code. Applied, thanks. -- Jens Axboe

Re: [PATCH] cdrom: information leak in cdrom_ioctl_media_changed()

2018-04-18 Thread Jens Axboe
On 4/18/18 3:51 AM, Dan Carpenter wrote: > This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned > long. The way the check is written now, if one of the high 32 bits is > set then we could read outside the info->slots[] array. > > This bug is pretty old and it predates git.

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Jens Axboe
On 4/18/18 3:18 AM, jiang.bi...@zte.com.cn wrote: > Hi, >>> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao >>> ha scritto: >>> >>> As described in the comment of blkcg_activate_policy(), >>> *Update of each blkg is protected by both queue and blkcg locks so >>> that

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-18 Thread Jens Axboe
On 4/18/18 3:08 AM, Paolo Valente wrote: > > >> Il giorno 18 apr 2018, alle ore 00:57, Jens Axboe ha >> scritto: >> >> On 4/17/18 3:48 PM, Jens Axboe wrote: >>> On 4/17/18 3:47 PM, Kees Cook wrote: On Tue, Apr 17, 2018 at 2:39 PM, Jens Axboe wrote: >

Re: [PATCH 3/4] blk: add blk_queue_fua() helper function

2018-04-18 Thread Christoph Hellwig
s/blk/block/ for block patches. Otherwise looks fine: Reviewed-by: Christoph Hellwig

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Paolo Valente
> Il giorno 18 apr 2018, alle ore 11:18, jiang.bi...@zte.com.cn ha scritto: > > Hi, >>> Il giorno 17 apr 2018, alle ore 09:10, Jiang Biao >>> ha scritto: >>> >>> As described in the comment of blkcg_activate_policy(), >>> *Update of each blkg is protected by both

[PATCH] lightnvm: pblk: take bitmap alloc. out of critical section

2018-04-18 Thread Javier González
pblk allocates line bitmaps within the line lock unnecessarily. In order to take pressure out of the fast patch, allocate line bitmaps outside of this lock and refactor accordingly. Signed-off-by: Javier González --- drivers/lightnvm/pblk-core.c | 97

[PATCH V2] lightnvm: pblk: take bitmap alloc. out of critical section

2018-04-18 Thread Javier González
Changes since V1 - from Matias: - rename a function to line__reinit - propagate error code - improve commit message Javier González (1): lightnvm: pblk: take bitmap alloc. out of critical section drivers/lightnvm/pblk-core.c | 97 +--- 1 file

Re: Multi-Actuator SAS HDD First Look

2018-04-18 Thread Tim Walker
On Sun, Apr 15, 2018 at 10:31 PM, Bart Van Assche wrote: > On Sun, 2018-04-15 at 19:35 -0600, Tim Walker wrote: >> I also believe the dual-actuator, or any significant HDD parallelism, >> would map well onto an NVMe target, or NVMe-oF behind nvmet. Maybe a >> lightweight

Re: [PATCH 08/11] lightnvm: pblk: remove unnecessary argument

2018-04-18 Thread Javier González
Javier > On 17 Apr 2018, at 05.12, Matias Bjørling wrote: > > On 4/16/18 12:25 PM, Javier González wrote: >> Remove unnecessary argument on pblk_line_free() > > Why was the argument no longer needed? You can see it is not used... It a straightforward clean up. Javier

Re: [PATCH 03/11] lightnvm: pblk: check read lba on gc path

2018-04-18 Thread Javier González
> On 17 Apr 2018, at 05.03, Matias Bjørling wrote: > > On 4/16/18 12:25 PM, Javier González wrote: >> Check that the lba stored in the LBA metadata is correct in the GC path >> too. This requires a new helper function to check random reads in the >> vector read. >>

Re: [PATCH 3/4] blk: add blk_queue_fua() helper function

2018-04-18 Thread Matthew Wilcox
On Wed, Apr 18, 2018 at 12:34:03PM +0200, Christoph Hellwig wrote: > s/blk/block/ for block patches. I think this is something we should put in MAINTAINERS. Eventually some tooling can pull it out, but I don't think this is something that people can reasonably be expected to know. diff --git

Re: [RFC PATCH 00/79] Generic page write protection and a solution to page waitqueue

2018-04-18 Thread Jerome Glisse
On Wed, Apr 18, 2018 at 04:13:37PM +0200, Jan Kara wrote: > Hello, > > so I finally got to this :) > > On Wed 04-04-18 15:17:50, jgli...@redhat.com wrote: > > From: Jérôme Glisse [...] > > -- > > The Why ?

Re: [PATCH v4] blk-mq: Fix race conditions in request timeout handling

2018-04-18 Thread Bart Van Assche
On 04/10/18 14:54, t...@kernel.org wrote: On Tue, Apr 10, 2018 at 09:46:23PM +, Bart Van Assche wrote: On Tue, 2018-04-10 at 14:33 -0700, t...@kernel.org wrote: + else + rq->missed_completion = true; In this patch I found code that sets rq->missed_completion but no

Re: [PATCH V4 0/2] blk-mq: fix race between completion and BLK_EH_RESET_TIMER

2018-04-18 Thread Ming Lei
On Mon, Apr 16, 2018 at 03:12:30PM +0200, Martin Steigerwald wrote: > Ming Lei - 16.04.18, 02:45: > > On Sun, Apr 15, 2018 at 06:31:44PM +0200, Martin Steigerwald wrote: > > > Hi Ming. > > > > > > Ming Lei - 15.04.18, 17:43: > > > > Hi Jens, > > > > > > > > This two patches fixes the recently

Re: [RFC PATCH 00/79] Generic page write protection and a solution to page waitqueue

2018-04-18 Thread Darrick J. Wong
On Wed, Apr 18, 2018 at 11:54:30AM -0400, Jerome Glisse wrote: > On Wed, Apr 18, 2018 at 04:13:37PM +0200, Jan Kara wrote: > > Hello, > > > > so I finally got to this :) > > > > On Wed 04-04-18 15:17:50, jgli...@redhat.com wrote: > > > From: Jérôme Glisse > > [...] > > > >

Re: Multi-Actuator SAS HDD First Look

2018-04-18 Thread Tim Walker
On Wed, Apr 18, 2018 at 10:20 AM, Bart Van Assche wrote: > On Wed, 2018-04-18 at 05:16 -0600, Tim Walker wrote: >> It would be good if we could set up an informal meeting time and >> location at LSFMM to discuss these dual actuator topics. so far you, >> Doug, Hannes, and

Re: Multi-Actuator SAS HDD First Look

2018-04-18 Thread Bart Van Assche
On Wed, 2018-04-18 at 05:16 -0600, Tim Walker wrote: > It would be good if we could set up an informal meeting time and > location at LSFMM to discuss these dual actuator topics. so far you, > Doug, Hannes, and Christoph have expressed the most interest, plus > Damien. Can we set an hour aside one

Re: [PATCH 07/11] lightnvm: pblk: remove unnecessary indirection

2018-04-18 Thread Javier Gonzalez
> On 17 Apr 2018, at 05.11, Matias Bjørling wrote: > > On 4/16/18 12:25 PM, Javier González wrote: >> Remove unnecessary indirection on the read path. > > Title and description are the same. Can you elaborate what changed > since pblk_submit_io now directly can be returned,

[LSF/MM] schedule suggestion

2018-04-18 Thread Jerome Glisse
Just wanted to suggest to push HMM status down one slot in the agenda to avoid having FS and MM first going into their own room and then merging back for GUP and DAX, and re-splitting after. More over HMM and NUMA talks will be good to have back to back as they deal with same kind of thing mostly.

Re: [PATCH v2 02/10] m68k/mac: Fix SWIM memory resource end address

2018-04-18 Thread Geert Uytterhoeven
Hi Finn, On Thu, Apr 12, 2018 at 2:50 AM, Finn Thain wrote: > The resource size is 0x2000 == end - start + 1. > Therefore end == start + 0x2000 - 1. > > Cc: Laurent Vivier > Cc: sta...@vger.kernel.org # v4.14+ > Tested-by: Stan Johnson

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-18 Thread Paolo Valente
> Il giorno 18 apr 2018, alle ore 00:57, Jens Axboe ha > scritto: > > On 4/17/18 3:48 PM, Jens Axboe wrote: >> On 4/17/18 3:47 PM, Kees Cook wrote: >>> On Tue, Apr 17, 2018 at 2:39 PM, Jens Axboe wrote: On 4/17/18 3:25 PM, Kees Cook wrote: > On Tue,

Re: [PATCH] blktests: regression test "block: do not use interruptible wait anywhere"

2018-04-18 Thread Johannes Thumshirn
On Tue, Apr 17, 2018 at 04:55:51PM +0100, Alan Jenkins wrote: > On 17/04/18 08:21, Johannes Thumshirn wrote: > > On Mon, Apr 16, 2018 at 10:52:47PM +0100, Alan Jenkins wrote: > > > > Without this fix, I get an IO error in this test: > > > > > > > > # dd if=/dev/sda of=/dev/null iflag=direct & \ >

Re: [PATCH] blk-mq: Clear out elevator private data

2018-04-18 Thread Paolo Valente
> Il giorno 17 apr 2018, alle ore 23:42, Kees Cook ha > scritto: > > Some elevators may not correctly check rq->rq_flags & RQF_ELVPRIV, and > may attempt to read rq->elv fields. When requests got reused, this > caused BFQ to think it already had a bfqq (rq->elv.priv[1])

Re: [PATCH v2 2/4] bcache: calculate the number of incremental GC nodes according to the total of btree nodes

2018-04-18 Thread Coly Li
On 2018/4/16 2:33 PM, tang.jun...@zte.com.cn wrote: > From: Tang Junhui > > This patch base on "[PATCH] bcache: finish incremental GC". > > Since incremental GC would stop 100ms when front side I/O comes, so when > there are many btree nodes, if GC only processes

[PATCH] cdrom: information leak in cdrom_ioctl_media_changed()

2018-04-18 Thread Dan Carpenter
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Cc: sta...@vger.kernel.org Signed-off-by: Dan

Re: [PATCH 03/11] fs: add frozen sb state helpers

2018-04-18 Thread Jan Kara
On Tue 17-04-18 17:59:36, Luis R. Rodriguez wrote: > On Thu, Dec 21, 2017 at 12:03:29PM +0100, Jan Kara wrote: > > On Fri 01-12-17 22:13:27, Luis R. Rodriguez wrote: > > > > > > I'll note that its still not perfectly clear if really the semantics > > > behind > > > freeze_bdev() match what I

extra part in bcache patch commit 539d39eb2708

2018-04-18 Thread Coly Li
Hi Michael and Jens When I do back port of bcache patches, I find commit 539d39eb2708 ("bcache: fix wrong return value in bch_debug_init()") has extra part from the original patch which Junhui Tanng posted. The patch posted by Junhui Tang was, From: Tang Junhui in

[PATCH 1/2] blkcg: small fix on comment in blkcg_init_queue

2018-04-18 Thread Jiang Biao
The comment before blkg_create() in blkcg_init_queue() was moved from blkcg_activate_policy() by commit ec13b1d6f0a0457312e615, but it does not suit for the new context. Signed-off-by: Jiang Biao Signed-off-by: Wen Yang CC: Tejun Heo

Re: [PATCH] target: fix crash with iscsi target and dvd

2018-04-18 Thread Martin K. Petersen
Ming, > When the current page can't be added to bio, one new bio should be > created for adding this page again, instead of ignoring this page. > > This patch fixes kernel crash with iscsi target and dvd, as reported > by Wakko. I queued this up in 4.17/scsi-fixes. -- Martin K. Petersen

Re: [PATCH] target: fix crash with iscsi target and dvd

2018-04-18 Thread Bart Van Assche
On Wed, 2018-04-18 at 23:27 -0400, Martin K. Petersen wrote: > Christoph, > > > Btw, seems like someone needs to volunteer for putting together a pull > > request with target fixes for Linus - I haven't heard from Nic for a > > while, and we've got quite a few fixes out on the list. > > Still

[PATCH 2/2] blkcg: init root blkcg_gq under lock

2018-04-18 Thread Jiang Biao
The initializing of q->root_blkg is currently outside of queue lock and rcu, so the blkg may be destroied before the initializing, which may cause dangling/null references. On the other side, the destroys of blkg are protected by queue lock or rcu. Put the initializing inside the queue lock and

Re: [PATCH 01/12] iscsi_tcp: don't set a bounce limit

2018-04-18 Thread Martin K. Petersen
Christoph, > The default already is to never bounce, so the call is a no-op. Applied to 4.18/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 02/12] storsvc: don't set a bounce limit

2018-04-18 Thread Martin K. Petersen
Christoph, > The default already is to never bounce, so the call is a no-op. Applied to 4.18/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] target: fix crash with iscsi target and dvd

2018-04-18 Thread Martin K. Petersen
Christoph, > Btw, seems like someone needs to volunteer for putting together a pull > request with target fixes for Linus - I haven't heard from Nic for a > while, and we've got quite a few fixes out on the list. Still happy to take things through SCSI if Nic doesn't materialize. -- Martin K.

Re: [LSF/MM] schedule suggestion

2018-04-18 Thread Dave Chinner
On Wed, Apr 18, 2018 at 05:19:39PM -0400, Jerome Glisse wrote: > Just wanted to suggest to push HMM status down one slot in the > agenda to avoid having FS and MM first going into their own > room and then merging back for GUP and DAX, and re-splitting > after. More over HMM and NUMA talks will be

[PATCH] block: Verify whether blk_queue_enter() is used when necessary

2018-04-18 Thread Bart Van Assche
It is required to protect blkg_lookup() calls with a blk_queue_enter() / blk_queue_exit() pair. Since it is nontrivial to verify whether this is the case, verify this at runtime. Only perform this verification if CONFIG_LOCKDEP=y to avoid that unnecessary runtime overhead is added. Introduce

Re: [LSF/MM] schedule suggestion

2018-04-18 Thread Dave Chinner
On Wed, Apr 18, 2018 at 05:19:39PM -0400, Jerome Glisse wrote: > Just wanted to suggest to push HMM status down one slot in the > agenda to avoid having FS and MM first going into their own > room and then merging back for GUP and DAX, and re-splitting > after. More over HMM and NUMA talks will be

Re: [PATCH] blkcg: not hold blkcg lock when deactivating policy.

2018-04-18 Thread Jens Axboe
On 4/18/18 6:54 PM, jiang.bi...@zte.com.cn wrote: by chance, did you check whether this may cause problems with bfq, being the latter not protected by the queue lock as cfq? >>> Checked the bfq code, bfq seems never used blkcg lock derectly, and >>> update of blkg in the common code is