Re: [REVIEW][PATCH 0/6] Wrapping up the vfs support for unprivileged mounts

2018-05-29 Thread Dongsu Park
s in my branch: https://github.com/kinvolk/linux/tree/dongsu/fuse-userns-for-4.18 With this branch, I tested sshfs/fuse from non-init user namespace. It works fine as expected. So you can add: Tested-by: Dongsu Park Thanks! Dongsu > These changes are also available at: > git://git.k

[RFC PATCH v5 1/2] ima: force re-appraisal on filesystems with FS_IMA_NO_CACHE

2018-02-07 Thread Dongsu Park
y-mod...@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Cc: Alexander Viro Cc: Miklos Szeredi Cc: Mimi Zohar Cc: Dmitry Kasatkin Cc: James Morris Cc: Christoph Hellwig Acked-by: "Serge E. Hallyn" Acked-by: Seth Forshee Tested-by: Dongsu Park Signed-off-by: Alban Crequy Signed-off-

[RFC PATCH v5 0/2] ima,fuse: introduce new fs flag FS_IMA_NO_CACHE

2018-02-07 Thread Dongsu Park
This patchset v5 introduces a new fs flag FS_IMA_NO_CACHE and uses it in FUSE. This forces files to be re-measured, re-appraised and re-audited on file systems with the feature flag FS_IMA_NO_CACHE. In that way, cached integrity results won't be used. There was a previous attempt (unmerged) with a

[RFC PATCH v5 2/2] fuse: introduce new fs_type flag FS_IMA_NO_CACHE

2018-02-07 Thread Dongsu Park
es Morris Cc: Christoph Hellwig Acked-by: Miklos Szeredi Acked-by: "Serge E. Hallyn" Acked-by: Seth Forshee Tested-by: Dongsu Park Signed-off-by: Alban Crequy --- fs/fuse/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode

Re: [RFC PATCH v3 2/2] ima: force re-appraisal on filesystems with FS_IMA_NO_CACHE

2018-01-30 Thread Dongsu Park
Hi, On Mon, Jan 29, 2018 at 6:40 PM, Dongsu Park wrote: > On Mon, Jan 29, 2018 at 5:33 PM, Mimi Zohar wrote: >> On Thu, 2018-01-25 at 06:56 -0500, Mimi Zohar wrote: ... >> Did you get a chance to make the change and test it? > > Alban has been on holidays, so he will be ba

[RFC PATCH v4 0/2] ima,fuse: introduce new fs flag FS_IMA_NO_CACHE

2018-01-30 Thread Dongsu Park
This patchset v4 introduces a new fs flag FS_IMA_NO_CACHE and uses it in FUSE. This forces files to be re-measured, re-appraised and re-audited on file systems with the feature flag FS_IMA_NO_CACHE. In that way, cached integrity results won't be used. There was a previous attempt (unmerged) with a

[RFC PATCH v4 2/2] ima: force re-appraisal on filesystems with FS_IMA_NO_CACHE

2018-01-30 Thread Dongsu Park
es/commit/cf1f5750cab0 Cc: linux-kernel@vger.kernel.org Cc: linux-integr...@vger.kernel.org Cc: linux-security-mod...@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Cc: Miklos Szeredi Cc: Alexander Viro Cc: Mimi Zohar Cc: Dmitry Kasatkin Cc: James Morris Cc: Christoph Hellwig Acked-by: "Serge E. Hallyn

[RFC PATCH v4 1/2] fuse: introduce new fs_type flag FS_IMA_NO_CACHE

2018-01-30 Thread Dongsu Park
rge E. Hallyn" Acked-by: Seth Forshee Tested-by: Dongsu Park Signed-off-by: Alban Crequy --- fs/fuse/inode.c| 2 +- include/linux/fs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 624f18bb..0a9e5164 100644 --- a/fs/fuse/inode.

Re: [RFC PATCH v3 2/2] ima: force re-appraisal on filesystems with FS_IMA_NO_CACHE

2018-01-29 Thread Dongsu Park
Hi Mimi, On Mon, Jan 29, 2018 at 5:33 PM, Mimi Zohar wrote: > Hi Alban, > > On Thu, 2018-01-25 at 06:56 -0500, Mimi Zohar wrote: >> > > @@ -228,9 +229,28 @@ static int process_measurement(struct file *file, >> > > char *buf, loff_t size, >> > >IMA_APPRAISE_SUBMASK | I

Re: [PATCH 0/2] turn on force option for FUSE in builtin policies

2018-01-16 Thread Dongsu Park
Hi Mimi, On Tue, Jan 16, 2018 at 12:23 PM, Mimi Zohar wrote: > On Tue, 2018-01-16 at 12:09 +0100, Dongsu Park wrote: >> Since yesterday Alban and I have been working on a different approach >> that does not depend on IMA rules, nor fsmagic. Please see: >> https://www.m

Re: [PATCH 0/2] turn on force option for FUSE in builtin policies

2018-01-16 Thread Dongsu Park
Hi, On Thu, Jan 11, 2018 at 8:51 PM, Dongsu Park wrote: > In case of FUSE filesystem, cached integrity results in IMA could be > reused, when the userspace FUSE process has changed the > underlying files. To be able to avoid such cases, we need to turn on > the force option in buil

Re: [PATCH 2/2] ima: turn on force option for FUSE in builtin policies

2018-01-16 Thread Dongsu Park
n the commit message, this patch depends on patches that are not yet in the mainline, or not even in next-integrity. So please make it excluded from kbuild. Thanks, Dongsu > url: > https://github.com/0day-ci/linux/commits/Dongsu-Park/turn-on-force-option-for-FUSE-in-builtin-polici

[PATCH 1/2] fs/fuse: move SUPER_MAGIC definitions to linux/magic.h

2018-01-11 Thread Dongsu Park
: linux-integr...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Alban Crequy Cc: Miklos Szeredi Cc: Mimi Zohar Cc: Seth Forshee Signed-off-by: Dongsu Park --- fs/fuse/control.c | 3 +-- fs/fuse/inode.c| 3 +-- include/uapi/linux/magic.h | 3 +++ 3 files changed, 5

[PATCH 2/2] ima: turn on force option for FUSE in builtin policies

2018-01-11 Thread Dongsu Park
/kinvolk/fuse-userns-patches/commit/cf1f5750cab0 Cc: linux-integr...@vger.kernel.org Cc: linux-security-mod...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Miklos Szeredi Cc: Mimi Zohar Cc: Seth Forshee Tested-by: Alban Crequy Signed-off-by: Dongsu Park --- security/integrity/ima/ima_po

[PATCH 0/2] turn on force option for FUSE in builtin policies

2018-01-11 Thread Dongsu Park
://marc.info/?l=linux-integrity&m=151559360514676&w=2 Dongsu Park (2): fs/fuse: move SUPER_MAGIC definitions to linux/magic.h ima: turn on force option for FUSE in builtin policies fs/fuse/control.c | 3 +-- fs/fuse/inode.c | 3 +-- include/uapi/lin

Re: [PATCH 03/11] fs: Allow superblock owner to change ownership of inodes

2018-01-09 Thread Dongsu Park
Hi, On Fri, Jan 5, 2018 at 8:24 PM, Luis R. Rodriguez wrote: > On Fri, Dec 22, 2017 at 03:32:27PM +0100, Dongsu Park wrote: >> diff --git a/fs/attr.c b/fs/attr.c >> index 12ffdb6f..bf8e94f3 100644 >> --- a/fs/attr.c >> +++ b/fs/attr.c >> @@ -18,6 +18

Re: [PATCH v5 00/11] FUSE mounts from non-init user namespaces

2018-01-09 Thread Dongsu Park
Hi, On Mon, Dec 25, 2017 at 8:05 AM, Eric W. Biederman wrote: > Dongsu Park writes: > >> This patchset v5 is based on work by Seth Forshee and Eric Biederman. >> The latest patchset was v4: >> https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1132206.

Re: [PATCH 04/11] fs: Don't remove suid for CAP_FSETID for userns root

2017-12-23 Thread Dongsu Park
Hi, On Sat, Dec 23, 2017 at 4:26 AM, Serge E. Hallyn wrote: > On Fri, Dec 22, 2017 at 03:32:28PM +0100, Dongsu Park wrote: >> From: Seth Forshee >> >> Expand the check in should_remove_suid() to keep privileges for > > I realize this description came from Seth, bu

Re: [PATCH 02/11] mtd: Check permissions towards mtd block device inode when mounting

2017-12-23 Thread Dongsu Park
Hi, On Fri, Dec 22, 2017 at 10:06 PM, Richard Weinberger wrote: > Dongsu, > > On Fri, Dec 22, 2017 at 3:32 PM, Dongsu Park wrote: >> From: Seth Forshee >> >> Unprivileged users should not be able to mount mtd block devices >> when they lack sufficient pr

Re: [PATCH 01/11] block_dev: Support checking inode permissions in lookup_bdev()

2017-12-23 Thread Dongsu Park
Hi, On Fri, Dec 22, 2017 at 7:59 PM, Coly Li wrote: > On 22/12/2017 10:32 PM, Dongsu Park wrote: > Hi Dongsu, > > Could you please use a macro like NO_PERMISSION_CHECK to replace hard > coded 0 ? At least for me, I don't need to check what does 0 mean in the > new lookup_

[PATCH 01/11] block_dev: Support checking inode permissions in lookup_bdev()

2017-12-22 Thread Dongsu Park
...@redhat.com Cc: linux-bca...@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Cc: linux-...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: Alexander Viro Cc: Jan Kara Cc: Serge Hallyn Signed-off-by: Seth Forshee Signed-off-by: Dongsu Park --- drivers/md/bcache/super.c | 2 +- drivers/md/dm

[PATCH 02/11] mtd: Check permissions towards mtd block device inode when mounting

2017-12-22 Thread Dongsu Park
CAP_SYS_ADMIN, so privileged mounts will continue working as before. Patch v3 is available: https://patchwork.kernel.org/patch/7640011/ Cc: linux-...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Seth Forshee Signed-off-by: Dongsu Park --- drivers/mtd/mtdsuper.c | 6 +- 1

[PATCH 11/11] evm: Don't update hmacs in user ns mounts

2017-12-22 Thread Dongsu Park
@vger.kernel.org Cc: James Morris Cc: Mimi Zohar Cc: "Serge E. Hallyn" Signed-off-by: Seth Forshee Signed-off-by: Dongsu Park --- security/integrity/evm/evm_crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/integrity/evm/evm_crypto.c b/security

[PATCH 10/11] fuse: Allow user namespace mounts

2017-12-22 Thread Dongsu Park
igned-off-by: Seth Forshee [dongsu: add a simple commit messasge] Signed-off-by: Dongsu Park --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 7f6b2e55..8c98edee 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1

[PATCH 09/11] fuse: Restrict allow_other to the superblock's namespace or a descendant

2017-12-22 Thread Dongsu Park
. Patch v4 is available: https://patchwork.kernel.org/patch/8944671/ Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: "Eric W. Biederman" Cc: Serge Hallyn Cc: Miklos Szeredi Signed-off-by: Seth Forshee Signed-off-by: Dongsu Park --- fs/fuse/dir.c | 2

[PATCH 07/11] fs: Allow CAP_SYS_ADMIN in s_user_ns to freeze and thaw filesystems

2017-12-22 Thread Dongsu Park
: Seth Forshee Signed-off-by: Dongsu Park --- fs/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ioctl.c b/fs/ioctl.c index 5ace7efb..8c628a8d 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -549,7 +549,7 @@ static int ioctl_fsfreeze(struct file *filp

[PATCH 06/11] capabilities: Allow privileged user in s_user_ns to set security.* xattrs

2017-12-22 Thread Dongsu Park
check in commoncap is safe in this respect as well. Patch v4 is available: https://patchwork.kernel.org/patch/8944641/ Cc: linux-security-mod...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: James Morris Cc: Serge Hallyn Signed-off-by: Seth Forshee Signed-off-by: Dongsu Park

[PATCH 08/11] fuse: Support fuse filesystems outside of init_user_ns

2017-12-22 Thread Dongsu Park
@vger.kernel.org Cc: Miklos Szeredi Signed-off-by: Seth Forshee Signed-off-by: Dongsu Park --- fs/fuse/cuse.c | 3 ++- fs/fuse/dev.c| 11 --- fs/fuse/dir.c| 14 +++--- fs/fuse/fuse_i.h | 6 +- fs/fuse/inode.c | 31 +++ 5 files changed, 41

[PATCH 05/11] fs: Allow superblock owner to access do_remount_sb()

2017-12-22 Thread Dongsu Park
originally mounted the filesystem. Patch v4 is available: https://patchwork.kernel.org/patch/8944631/ Cc: linux-fsde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Alexander Viro Cc: "Eric W. Biederman" Cc: Serge Hallyn Signed-off-by: Seth Forshee Signed-off-by: Dongsu Par

[PATCH 03/11] fs: Allow superblock owner to change ownership of inodes

2017-12-22 Thread Dongsu Park
Signed-off-by: Eric W. Biederman [saf: Resolve conflicts caused by s/inode_change_ok/setattr_prepare/] Signed-off-by: Dongsu Park --- fs/attr.c | 34 ++ fs/proc/base.c| 7 +++ fs/proc/generic.c | 7 +++ fs/proc/proc_sysctl.c | 7

[PATCH 04/11] fs: Don't remove suid for CAP_FSETID for userns root

2017-12-22 Thread Dongsu Park
sde...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Alexander Viro Cc: Serge Hallyn Signed-off-by: Seth Forshee Signed-off-by: Dongsu Park --- fs/inode.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index fd401028..6459a437 100644 --- a

[PATCH v5 00/11] FUSE mounts from non-init user namespaces

2017-12-22 Thread Dongsu Park
This patchset v5 is based on work by Seth Forshee and Eric Biederman. The latest patchset was v4: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1132206.html At the moment, filesystems backed by physical medium can only be mounted by real root in the initial user namespace. This rest

Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t

2015-08-29 Thread Dongsu Park
On 28.08.2015 15:33, Peter Hurley wrote: > On 08/18/2015 11:18 AM, Dongsu Park wrote: > > --- > > fs/devpts/inode.c | 20 > > 1 file changed, 16 insertions(+), 4 deletions(-) > > > > diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c >

Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t

2015-08-19 Thread Dongsu Park
Hi, thanks for the review. On 18.08.2015 16:44, Andrew Morton wrote: > On Tue, 18 Aug 2015 17:18:19 +0200 Dongsu Park wrote: > > > To allow devpts to be mounted with options of uid/gid of uint32_t, > > use kstrtouint() instead of match_int(). Doing that, mounting devpts &

[PATCH v2] devpts: allow mounting with uid/gid of uint32_t

2015-08-18 Thread Dongsu Park
gid=3598450693 It was originally by reported on systemd github issues: https://github.com/systemd/systemd/issues/956 from v1: fix patch format correctly Reported-by: Alban Crequy Signed-off-by: Dongsu Park --- fs/devpts/inode.c | 20 1 file changed, 16 insertions(+)

[PATCH] devpts: allow mounting with uid/gid of uint32_t

2015-08-18 Thread Dongsu Park
gid=3598450693 It was originally by reported on systemd github issues: https://github.com/systemd/systemd/issues/956 Reported-by: Alban Crequy Signed-off-by: Dongsu Park --- fs/devpts/inode.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/fs/devpts/inode.

Re: panic with CPU hotplug + blk-mq + scsi-mq

2015-04-20 Thread Dongsu Park
otplug issue. Yes, it works indeed. Thanks a lot! :-) You can add: Tested-by: Dongsu Park As the original patch didn't apply, I had to change some nitpicks though. (see below) Cheers, Dongsu >From 8c0edcbbdfbab67dc8ae2fd46cca6a86e0cadcba Mon Sep 17 00:00:00 2001 From: Ming Lei Da

Re: panic with CPU hotplug + blk-mq + scsi-mq

2015-04-20 Thread Dongsu Park
On 20.04.2015 21:12, Ming Lei wrote: > On Mon, Apr 20, 2015 at 4:07 PM, Dongsu Park > wrote: > > Hi Ming, > > > > On 18.04.2015 00:23, Ming Lei wrote: > >> > Does anyone have an idea? > >> > >> As far as I can see, at least two problems exist:

Re: panic with CPU hotplug + blk-mq + scsi-mq

2015-04-20 Thread Dongsu Park
00 00 00 0f 1f 44 00 00 48 8b 87 20 04 00 00 55 48 89 e5 > > <48> 8b 40 98 5d c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 > > [ 47.816324] RIP [] kthread_data+0x10/0x20 > > [ 47.816324] RSP > > [ 47.816324] CR2: ff98 > > [ 47.81632

panic with CPU hotplug + blk-mq + scsi-mq

2015-04-17 Thread Dongsu Park
Hi, there's a critical bug regarding CPU hotplug, blk-mq, and scsi-mq. Every time when a CPU is offlined, some arbitrary range of kernel memory seems to get corrupted. Then after a while, kernel panics at random places when block IOs are issued. (for example, see the call traces below) This bug c

Re: [PATCH] dm: fix multipath regression due to initializing wrong request

2015-02-10 Thread Dongsu Park
On 09.02.2015 10:47, Jens Axboe wrote: > On 02/09/2015 10:35 AM, Mike Snitzer wrote: > >On Mon, Feb 09 2015 at 12:13P -0500, > >Mike Snitzer wrote: > > > >Jens and I discussed this further and given that linux-block breaks > >dm-multipath it is best to fix linux-block and let Linus resolve the > >

blk-mq crash with dm-multipath in for-3.20/core

2015-02-09 Thread Dongsu Park
Hi Jens, during testing with the linux-block for-3.20/core branch, I hit a BUG like below. It's reproducible by running xfstests/xfs/279. Bisecting showed that the first bad commit is 6d6285c45f5a ("block: require blk_rq_prep_clone() be given an initialized clone request"). With reverting this co

Re: cleanup and refactor BLOCK_PC mapping helpers V2

2015-02-09 Thread Dongsu Park
On 05.02.2015 09:28, Jens Axboe wrote: > On 02/02/2015 06:19 AM, Christoph Hellwig wrote: > >Jens, do these patches look fine to you? Any chance to get them into > >the tree for the 3.20 merge window? > > Yes, I think they look fine. I'll throw them into the testing mix and merge > them for 3.20.

Re: [PATCH v2 2/7] block: rewrite __bio_copy_iov()

2015-01-16 Thread Dongsu Park
Hi Christoph, On 16.01.2015 03:31, Christoph Hellwig wrote: > On Thu, Jan 15, 2015 at 10:18:17AM -0800, Christoph Hellwig wrote: > > This breaks booting a simple KVM VM for me: > Seems like the issue actually is in the patch before this one, but > only shows up with this one applied. > The root ca

[PATCH v2 3/9] block: allow __blk_queue_bounce() to handle bios larger than BIO_MAX_PAGES

2015-01-12 Thread Dongsu Park
_request(). Cc: Christoph Hellwig Cc: Jens Axboe Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- block/bounce.c | 60 ++ 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a

[PATCH v2 4/9] bcache: clean up hacks around bio_split_pool

2015-01-12 Thread Dongsu Park
dpark: add more description in commit message] Signed-off-by: Dongsu Park --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c | 16 +++ drive

[PATCH v2 5/9] btrfs: remove bio splitting and merge_bvec_fn() calls

2015-01-12 Thread Dongsu Park
Cc: Chris Mason Cc: Josef Bacik Cc: linux-bt...@vger.kernel.org Signed-off-by: Kent Overstreet Signed-off-by: Chris Mason [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- fs/btrfs/volumes.c | 73 -- 1 file chan

[PATCH v2 6/9] md/raid5: get rid of bio_fits_rdev()

2015-01-12 Thread Dongsu Park
ption in commit message] Signed-off-by: Dongsu Park --- drivers/md/raid5.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index c1b0d52..40e464c 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4218,25

[PATCH v2 2/9] block: simplify bio_add_page()

2015-01-12 Thread Dongsu Park
s, change a couple of comments, make bio_add_page() warn once upon a cloned bio.] Signed-off-by: Dongsu Park --- block/bio.c | 135 +--- 1 file changed, 55 insertions(+), 80 deletions(-) diff --git a/block/bio.c b/block/bio.c index 7ff846d.

[PATCH v2 8/9] fs: use helper bio_add_page() instead of open coding on bi_io_vec

2015-01-12 Thread Dongsu Park
-fsde...@vger.kernel.org Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- fs/buffer.c | 7 ++- fs/jfs/jfs_logmgr.c | 14 -- mm/page_io.c| 8 +++- 3 files changed, 9 insertions(+), 20 deletions(-)

[PATCH v2 7/9] block: kill merge_bvec_fn() completely

2015-01-12 Thread Dongsu Park
Overstreet [dpark: also remove ->merge_bvec_fn() in dm-thin as well as dm-era-target, and resolve merge conflicts] Signed-off-by: Dongsu Park --- block/blk-merge.c | 17 +- block/blk-settings.c | 22 drivers/block/drbd/drbd_int.h | 1 - drivers/block/d

[PATCH v2 9/9] Documentation: update notes in biovecs about arbitrarily sized bios

2015-01-12 Thread Dongsu Park
Update block/biovecs.txt so that it includes a note on what kind of effects arbitrarily sized bios would bring to the block layer. Also fix a trivial typo, bio_iter_iovec. Cc: Christoph Hellwig Cc: Kent Overstreet Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org Signed-off-by: Dongsu Park

[PATCH v2 2/7] block: rewrite __bio_copy_iov()

2015-01-12 Thread Dongsu Park
repeatedly. This commit should contain only literal replacements, without functional changes. Suggested-by: Christoph Hellwig Cc: Kent Overstreet Cc: Jens Axboe Cc: Al Viro Signed-off-by: Dongsu Park --- block/bio.c | 113 1 file

[RFC PATCH v2 0/9] simplify block layer based on immutable biovecs

2015-01-12 Thread Dongsu Park
org/lkml/2014/11/23/263 [2] https://lkml.org/lkml/2013/11/25/732 [3] https://lkml.org/lkml/2014/2/26/618 [4] https://lkml.org/lkml/2014/12/22/128 [5] https://lkml.org/lkml/2015/1/12/255 Dongsu Park (1): Documentation: update notes in biovecs about arbitrarily sized bios Kent Overstreet (8):

[PATCH v2 1/9] block: make generic_make_request handle arbitrarily sized bios

2015-01-12 Thread Dongsu Park
rris Cc: Philip Kelleher Cc: Minchan Kim Cc: Nitin Gupta Cc: Oleg Drokin Cc: Andreas Dilger Signed-off-by: Kent Overstreet [dpark: skip more mq-based drivers, resolve merge conflicts, etc.] Signed-off-by: Dongsu Park --- block/blk-core.c| 1

[PATCH v2 4/7] block: refactor bio_get_user_pages() from __bio_map_user_iov()

2015-01-12 Thread Dongsu Park
() take arbitrarily sized bios - we're not using bio_add_page() here. Cc: Christoph Hellwig Cc: Jens Axboe Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- block/bio.c

[PATCH v2 1/7] block: replace sg_iovec with iov_iter

2015-01-12 Thread Dongsu Park
changes. Cc: Christoph Hellwig Cc: Jens Axboe Cc: Doug Gilbert Cc: "James E.J. Bottomley" Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- block/bio.c| 114 + block

[PATCH v2 3/7] block: refactor iov_count_pages() from bio_{copy,map}_user_iov()

2015-01-12 Thread Dongsu Park
changes. Cc: Christoph Hellwig Cc: Jens Axboe Cc: "Hans J. Koch" Cc: Greg Kroah-Hartman Cc: Al Viro Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- block/bio.c | 43 ++- inc

[PATCH v2 6/7] fs: make _submit_bh consistent with generic bio chaining

2015-01-12 Thread Dongsu Park
that, calling convention can be consistent with the immutable biovecs API. Cc: Christoph Hellwig Cc: Al Viro Cc: linux-fsde...@vger.kernel.org Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- fs/buffer.c | 4 ++-- 1 file changed, 2 ins

[PATCH v2 5/7] md/raid10: make sync_request_write() call bio_copy_data()

2015-01-12 Thread Dongsu Park
: Dongsu Park --- drivers/md/raid10.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 32e282f..4a40354 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -2107,18 +2107,11 @@ static void

[RFC PATCH v2 0/7] preparation for block layer simplification

2015-01-12 Thread Dongsu Park
[1] https://lkml.org/lkml/2014/12/22/128 Dongsu Park (1): block: rewrite __bio_copy_iov() Kent Overstreet (6): block: replace sg_iovec with iov_iter block: refactor iov_count_pages() from bio_{copy,map}_user_iov() block: refactor bio_get_user_pages() from __bio_map_user_iov() md/ra

[PATCH v2 7/7] PM: submit bio in a sane way in cases without bio_chain

2015-01-12 Thread Dongsu Park
only when bio_chain is given. Cc: Christoph Hellwig Cc: linux...@vger.kernel.org Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park --- kernel/power/block_io.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-)

Re: [PATCH 3.12 11/78] perf/x86/intel: Protect LBR and extra_regs against KVM lying

2015-01-10 Thread Dongsu Park
Hi Jiry, On 09.01.2015 11:31, Jiri Slaby wrote: > From: Kan Liang > > 3.12-stable review patch. If anyone has any objections, please let me know. Thanks for taking this patch to 3.12-stable. I've just tested 3.12.36 from your stable-3.12-queue tree. Unfortunately, the kernel still crashes at i

Re: [RFC PATCH 01/17] block: make generic_make_request handle arbitrarily sized bios

2014-12-24 Thread Dongsu Park
On 23.12.2014 11:14, Geoff Levand wrote: > On Mon, 2014-12-22 at 12:48 +0100, Dongsu Park wrote: > > From: Kent Overstreet > > > --- a/drivers/block/ps3vram.c > > +++ b/drivers/block/ps3vram.c > > @@ -603,6 +603,8 @@ static void ps3vram_make_request(struct request_

Re: [RFC PATCH 17/17] Documentation: update notes in biovecs about arbitrarily sized bios

2014-12-23 Thread Dongsu Park
On 23.12.2014 02:52, Christoph Hellwig wrote: > > + * As of 3.18, block layer is written based on merging biovecs. Its goal is > > I don't think this is true.. Okay, I'll try to describe it more accurately in the next round. Thanks, Dongsu -- To unsubscribe from this list: send the line "unsubsc

Re: [RFC PATCH 16/17] fs: convert buffer head etc. to use immutable biovecs API.

2014-12-23 Thread Dongsu Park
On 23.12.2014 02:51, Christoph Hellwig wrote: > On Mon, Dec 22, 2014 at 12:48:43PM +0100, Dongsu Park wrote: > > From: Kent Overstreet > > > > Increase bio->bi_remaining instead of calling bio_get(), > > and call bio_end() instead of bio_put() upon buffer

Re: [RFC PATCH 12/17] md/raid10: make sync_request_write() call bio_copy_data()

2014-12-23 Thread Dongsu Park
On 23.12.2014 02:48, Christoph Hellwig wrote: > On Mon, Dec 22, 2014 at 12:48:39PM +0100, Dongsu Park wrote: > > From: Kent Overstreet > > > > Refactor sync_request_write() of md/raid10 to use bio_copy_data() > > instead of open coding bio_vec iterations. > > Se

Re: [RFC PATCH 08/17] block: refactor __bio_copy_iov()

2014-12-23 Thread Dongsu Park
On 23.12.2014 02:45, Christoph Hellwig wrote: > > static int __bio_copy_iov(struct bio *bio, const struct iov_iter *iter, > > + int to_iov) > > { > > + int i; > > struct bio_vec *bvec; > > struct iov_iter iov_iter = *iter; > > Why not pass the iov_iter by value? Ag

Re: [RFC PATCH 07/17] block: replace sg_iovec with iov_iter

2014-12-23 Thread Dongsu Park
On 23.12.2014 02:44, Christoph Hellwig wrote: > Does this and the next three patches really depend on the earlier ones? > Unless I'm missing something they are cleanups on their own. > > It might make sense to get all these cleanups out as a preparatory > series first. I think so too. Patches #07

Re: [RFC PATCH 06/17] btrfs: make use of immutable biovecs

2014-12-23 Thread Dongsu Park
On 23.12.2014 02:35, Christoph Hellwig wrote: > This seems like it could be applied without the rest of the series, > right? Might be worth to get it into the btrfs tree ASAP? Ah, you're right. While patch #5 must be in this series, patch #6 does not necessarily have to be included. This conversi

Re: [RFC PATCH 02/17] block: simplify bio_add_page()

2014-12-23 Thread Dongsu Park
On 23.12.2014 02:22, Christoph Hellwig wrote: > On Mon, Dec 22, 2014 at 12:48:29PM +0100, Dongsu Park wrote: > > From: Kent Overstreet > > > > Since generic_make_request() can now handle arbitrary size bios, all we > > have to do is make sure the bvec array doesn

Re: [RFC PATCH 01/17] block: make generic_make_request handle arbitrarily sized bios

2014-12-23 Thread Dongsu Park
Hi Christoph, On 23.12.2014 02:16, Christoph Hellwig wrote: > > +void blk_queue_split(struct request_queue *q, struct bio **bio, > > +struct bio_set *bs) > > +{ > > + struct bio *split; > > + > > + if ((*bio)->bi_rw & REQ_DISCARD) > > + split = blk_bio_discard_split(q

[RFC PATCH 07/17] block: replace sg_iovec with iov_iter

2014-12-22 Thread Dongsu Park
changes. Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Cc: Jens Axboe Cc: Doug Gilbert Cc: "James E.J. Bottomley" --- block/bio.c| 114 + block/blk-map.c

[RFC PATCH 04/17] bcache: clean up hacks around bio_split_pool

2014-12-22 Thread Dongsu Park
ommit message] Signed-off-by: Dongsu Park Cc: linux-bca...@vger.kernel.org --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c | 16 +++ drive

[RFC PATCH 06/17] btrfs: make use of immutable biovecs

2014-12-22 Thread Dongsu Park
. This is going to be important for future block layer refactoring, and using the standard primitives makes the code easier to audit. Signed-off-by: Kent Overstreet [dpark: apply this conversion also in check-integrity.c, and add more descrption in commit message] Signed-off-by: Dongsu Park Cc: Chris

[RFC PATCH 11/17] block: allow __blk_queue_bounce() to handle bios larger than BIO_MAX_PAGES

2014-12-22 Thread Dongsu Park
uest(). Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Cc: Jens Axboe --- block/bounce.c | 60 ++ 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/block/bounce.c b/block

[RFC PATCH 08/17] block: refactor __bio_copy_iov()

2014-12-22 Thread Dongsu Park
ommit message] Signed-off-by: Dongsu Park Cc: Jens Axboe Cc: Al Viro --- block/bio.c | 62 + 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/block/bio.c b/block/bio.c index 4731c4a..524b401 100644 --- a/block/bio.c +++ b/

[RFC PATCH 10/17] block: refactor bio_get_user_pages() from __bio_map_user_iov()

2014-12-22 Thread Dongsu Park
() take arbitrarily sized bios - we're not using bio_add_page() here. Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Cc: Jens Axboe --- block/bio.c | 130 +++- include/linux/

[RFC PATCH 17/17] Documentation: update notes in biovecs about arbitrarily sized bios

2014-12-22 Thread Dongsu Park
Update block/biovecs.txt so that it includes a note on what kind of effects arbitrarily sized bios would bring to the block layer. Also fix a trivial typo, bio_iter_iovec. Signed-off-by: Dongsu Park Cc: Kent Overstreet Cc: Jonathan Corbet Cc: linux-...@vger.kernel.org --- Documentation/block

[RFC PATCH 12/17] md/raid10: make sync_request_write() call bio_copy_data()

2014-12-22 Thread Dongsu Park
From: Kent Overstreet Refactor sync_request_write() of md/raid10 to use bio_copy_data() instead of open coding bio_vec iterations. Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Cc: Neil Brown Cc: linux-r...@vger.kernel.org

[RFC PATCH 15/17] fs: use helper bio_add_page() instead of open coding on bi_io_vec

2014-12-22 Thread Dongsu Park
ssage] Signed-off-by: Dongsu Park Cc: Al Viro Cc: Dave Kleikamp Cc: linux-fsde...@vger.kernel.org --- fs/buffer.c | 7 ++- fs/jfs/jfs_logmgr.c | 14 -- mm/page_io.c| 8 +++- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/fs/buffer.c b/fs/buf

[RFC PATCH 16/17] fs: convert buffer head etc. to use immutable biovecs API.

2014-12-22 Thread Dongsu Park
ome codes that have been still using the older API can be converted in order to use the immutable biovecs API. Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Cc: Al Viro Cc: linux-fsde...@vger.kernel.org Cc: linux...@vger.kernel.org ---

[RFC PATCH 13/17] md/raid5: get rid of bio_fits_rdev()

2014-12-22 Thread Dongsu Park
From: Kent Overstreet Remove bio_fits_rdev() completely, because ->merge_bvec_fn() has now gone. There's no point in calling bio_fits_rdev() only for ensuring aligned read from rdev. Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu

[RFC PATCH 14/17] block: kill merge_bvec_fn() completely

2014-12-22 Thread Dongsu Park
o remove ->merge_bvec_fn() in dm-thin as well as dm-era-target, and resolve merge conflicts] Signed-off-by: Dongsu Park Cc: Jens Axboe Cc: drbd-...@lists.linbit.com Cc: Jiri Kosina Cc: Yehuda Sadeh Cc: Sage Weil Cc: Alex Elder Cc: ceph-de...@vger.kernel.org Cc: Alasdair Kergon Cc: Mike Snitzer

[RFC PATCH 02/17] block: simplify bio_add_page()

2014-12-22 Thread Dongsu Park
treet [dpark: rebase and resolve merge conflicts] Signed-off-by: Dongsu Park Cc: Jens Axboe Cc: Ming Lin --- block/bio.c | 135 +--- 1 file changed, 55 insertions(+), 80 deletions(-) diff --git a/block/bio.c b/block/bio.c index 471d738..9

[RFC PATCH 05/17] btrfs: remove bio splitting and merge_bvec_fn() calls

2014-12-22 Thread Dongsu Park
ths. Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Cc: Chris Mason Cc: Josef Bacik Cc: linux-bt...@vger.kernel.org --- fs/btrfs/volumes.c | 73 -- 1 file changed, 73 deletions(-) diff --

[RFC PATCH 09/17] block: refactor iov_count_pages() from bio_{copy,map}_user_iov()

2014-12-22 Thread Dongsu Park
changes. Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Cc: Jens Axboe Cc: "Hans J. Koch" Cc: Greg Kroah-Hartman Cc: Al Viro --- block/bio.c | 43 ++- include/linux/uio.h |

[RFC PATCH 01/17] block: make generic_make_request handle arbitrarily sized bios

2014-12-22 Thread Dongsu Park
e left for future patches. Signed-off-by: Kent Overstreet [dpark: skip more mq-based drivers, resolve merge conflicts, etc.] Signed-off-by: Dongsu Park Cc: Ming Lin Cc: Jens Axboe Cc: Christoph Hellwig Cc: Al Viro Cc: Ming Lei Cc: Neil Brown Cc: Alasdair Kergon Cc: Mike Snitzer Cc: dm-

[RFC PATCH 03/17] block: simplify issueing discard, write_same, zeroout

2014-12-22 Thread Dongsu Park
ned-off-by: Dongsu Park Cc: Jens Axboe --- block/blk-lib.c | 173 ++-- 1 file changed, 29 insertions(+), 144 deletions(-) diff --git a/block/blk-lib.c b/block/blk-lib.c index 8411be3..deef044 100644 --- a/block/blk-lib.c +++ b/block/blk-lib.c @@

[RFC PATCH 00/17] simplify block layer based on immutable biovecs

2014-12-22 Thread Dongsu Park
e experimental patches are also available on other branches on my git tree. Once they are done, I'm also going to post them to get reviews. Comments are welcome. Dongsu [1] https://lkml.org/lkml/2014/11/23/263 [2] https://lkml.org/lkml/2013/11/25/732 [3] https://lkml.org/lkml/2014/2/26/

Re: Block layer projects that I haven't had time for

2014-12-12 Thread Dongsu Park
On 11.12.2014 22:32, Ming Lin wrote: > On 12/11/2014 02:07 AM, Dongsu Park wrote: > > On 10.12.2014 23:11, Ming Lin wrote: > >> Just tried to edit a btrfs file. > >> > >> [ 45.216351] BTRFS error (device sdb1): partial page write in btrfs with > >>

Re: Block layer projects that I haven't had time for

2014-12-11 Thread Dongsu Park
Hi Kent, On 10.12.2014 14:49, Kent Overstreet wrote: > On Mon, Dec 08, 2014 at 12:48:13PM +0100, Dongsu Park wrote: > > Thanks for the reply. > > > > On 05.12.2014 19:02, Kent Overstreet wrote: > > > On Thu, Dec 04, 2014 at 12:00:27PM +0100, Dongsu Park wrote: >

Re: Block layer projects that I haven't had time for

2014-12-11 Thread Dongsu Park
d to see this error as you're testing with a SCSI device, not virtio-blk device like me. Are you seeing it without any back traces? Does the attached patch fix your issue? (This is already included in the branch block-mpage-bvecs-for-next.) Thanks, Dongsu >From 7cef37e357b4fd636b3d4

Re: Block layer projects that I haven't had time for

2014-12-08 Thread Dongsu Park
Thanks for the reply. On 05.12.2014 19:02, Kent Overstreet wrote: > On Thu, Dec 04, 2014 at 12:00:27PM +0100, Dongsu Park wrote: > > Playing a little with your block_stuff tree based on 3.15, however, > > I think there still seems to be a couple of issues. > > First of all,

Re: Block layer projects that I haven't had time for

2014-12-04 Thread Dongsu Park
Hi Kent, On 23.11.2014 20:16, Kent Overstreet wrote: > Since I'm starting to resign myself to the fact that I'm probably not going to > have much time for upstream development again any time soon, I figured maybe I > should try writing down all the things I was working on or planning on working >

Re: [PATCH - v3?] workqueue: allow rescuer thread to do more work.

2014-12-03 Thread Dongsu Park
Hi Tejun, On 03.12.2014 13:02, Tejun Heo wrote: > So, something like the following. Only compile tested. I'll test it > and post proper patches w/ due credits. I have been already satisfied with Neil's patch, but your patch looks indeed a lot cleaner, I like it. I just compiled and tested it sh

Re: [PATCH/RFC] workqueue: allow rescuer thread to do more work.

2014-11-06 Thread Dongsu Park
to_create_worker() as Tejun suggested. Test is running with this patch, which seems to be working for now. But I'm going to observe the test result carefully for a few more days. Regards, Dongsu >From de9aadd6fb742ea8acce4245a27946d3f233ab7f Mon Sep 17 00:00:00 2001 From: Dongsu Park Date: W

Re: [PATCH] block/bio.c: update bi_iter.bi_size before recounting segments

2014-05-30 Thread Dongsu Park
nt is too big to handle. > > The patch fixes the virtio-blk oops bug reported from Jet Chen in > below link: > > http://marc.info/?l=linux-kernel&m=140113053817095&w=2 A great patch description, thanks! :-) You can add: Tested-by: Dongsu Park > Cc: Jens Axboe &g

Re: [PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-30 Thread Dongsu Park
ference. (The same kernel, the same qemu version, the same xfstests version, etc.) Anyway, coming back to my office, now I can confirm that your patch fixes the bug. You can add: Tested-by: Dongsu Park Thanks, Dongsu > [tom@localhost xfstests]$ sudo ./check ext4/271 ext4/301 ext4/305 > FS

[PATCH] bio: decrease bi_iter.bi_size by len in the fail path

2014-05-28 Thread Dongsu Park
From: Dongsu Park Commit 3979ef4dcf3d1de55a560a3a4016c30a835df44d ("bio-modify- __bio_add_page-to-accept-pages-that-dont-start-a-new-segment-v3") introduced a regression as reported by Jet Chen. That results in a kernel BUG at drivers/block/virtio_blk.c:166. To fix that, bi_iter.bi_si

  1   2   >