Re: [PATCH 1/5] security, overlayfs: provide copy up security hook for unioned files

2016-07-08 Thread Vivek Goyal
On Fri, Jul 08, 2016 at 09:21:13AM +0200, Miklos Szeredi wrote: > On Thu, Jul 7, 2016 at 11:44 PM, Casey Schaufler > wrote: > > On 7/7/2016 1:33 PM, Vivek Goyal wrote: > >> On Tue, Jul 05, 2016 at 12:36:17PM -0700, Casey Schaufler wrote: > >>> On 7/

Re: [PATCH 1/5] security, overlayfs: provide copy up security hook for unioned files

2016-07-07 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 12:36:17PM -0700, Casey Schaufler wrote: > > On 7/5/2016 8:50 AM, Vivek Goyal wrote: > > Provide a security hook to label new file correctly when a file is copied > > up from lower layer to upper layer of a overlay/union mount. > > > > This ho

Re: [PATCH 5/5] overlayfs: Use vfs_getxattr_noperm() for real inode

2016-07-07 Thread Vivek Goyal
On Wed, Jul 06, 2016 at 04:58:37PM +0200, Miklos Szeredi wrote: > On Wed, Jul 6, 2016 at 12:54 PM, Vivek Goyal wrote: > > On Wed, Jul 06, 2016 at 06:36:49AM +0200, Miklos Szeredi wrote: > >> On Tue, Jul 5, 2016 at 11:16 PM, Vivek Goyal wrote: > >> > On Tue, Ju

Re: [PATCH 2/5] security,overlayfs: Provide security hook for copy up of xattrs for overlay file

2016-07-06 Thread Vivek Goyal
On Wed, Jul 06, 2016 at 01:09:00PM -0400, Vivek Goyal wrote: [..] > > >> The return should be -EOPNOTSUPP from security modules that don't > > >> support the attribute "name". This will make it possible to support > > >> multiple modules t

Re: [PATCH 2/5] security,overlayfs: Provide security hook for copy up of xattrs for overlay file

2016-07-06 Thread Vivek Goyal
On Wed, Jul 06, 2016 at 01:09:00PM -0400, Vivek Goyal wrote: > On Tue, Jul 05, 2016 at 02:34:43PM -0700, Casey Schaufler wrote: > > On 7/5/2016 2:15 PM, Vivek Goyal wrote: > > > On Tue, Jul 05, 2016 at 01:22:22PM -0700, Casey Schaufler wrote: > > >> On 7/5/2

Re: [PATCH 2/5] security,overlayfs: Provide security hook for copy up of xattrs for overlay file

2016-07-06 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 02:34:43PM -0700, Casey Schaufler wrote: > On 7/5/2016 2:15 PM, Vivek Goyal wrote: > > On Tue, Jul 05, 2016 at 01:22:22PM -0700, Casey Schaufler wrote: > >> On 7/5/2016 8:50 AM, Vivek Goyal wrote: > >>> Provide a security hook which is called w

Re: [PATCH 5/5] overlayfs: Use vfs_getxattr_noperm() for real inode

2016-07-06 Thread Vivek Goyal
On Wed, Jul 06, 2016 at 06:36:49AM +0200, Miklos Szeredi wrote: > On Tue, Jul 5, 2016 at 11:16 PM, Vivek Goyal wrote: > > On Tue, Jul 05, 2016 at 01:29:39PM -0700, Casey Schaufler wrote: > >> On 7/5/2016 8:50 AM, Vivek Goyal wrote: > >> > ovl_getxattr() currently us

Re: [PATCH 2/5] security,overlayfs: Provide security hook for copy up of xattrs for overlay file

2016-07-05 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 05:45:25PM -0400, Paul Moore wrote: > On Tue, Jul 5, 2016 at 11:50 AM, Vivek Goyal wrote: > > Provide a security hook which is called when xattrs of a file are being > > copied up. This hook is called once for each xattr and one can either > > accept

Re: [PATCH 1/5] security, overlayfs: provide copy up security hook for unioned files

2016-07-05 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 05:35:22PM -0400, Paul Moore wrote: > On Tue, Jul 5, 2016 at 11:50 AM, Vivek Goyal wrote: > > Provide a security hook to label new file correctly when a file is copied > > up from lower layer to upper layer of a overlay/union mount. > > > > This

Re: [PATCH 5/5] overlayfs: Use vfs_getxattr_noperm() for real inode

2016-07-05 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 01:29:39PM -0700, Casey Schaufler wrote: > On 7/5/2016 8:50 AM, Vivek Goyal wrote: > > ovl_getxattr() currently uses vfs_getxattr() on realinode. This fails > > if mounter does not have DAC/MAC permission to access getxattr. > > > > Specifically

Re: [PATCH 2/5] security,overlayfs: Provide security hook for copy up of xattrs for overlay file

2016-07-05 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 01:22:22PM -0700, Casey Schaufler wrote: > On 7/5/2016 8:50 AM, Vivek Goyal wrote: > > Provide a security hook which is called when xattrs of a file are being > > copied up. This hook is called once for each xattr and one can either > > accept or

Re: [PATCH 3/5] selinux: Pass security pointer to determine_inode_label()

2016-07-05 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 01:25:22PM -0700, Casey Schaufler wrote: > On 7/5/2016 8:50 AM, Vivek Goyal wrote: > > Right now selinux_determine_inode_label() works on security pointer of > > current task. Soon I need this to work on a security pointer retrieved > > from a set of cr

Re: [PATCH 1/5] security, overlayfs: provide copy up security hook for unioned files

2016-07-05 Thread Vivek Goyal
On Tue, Jul 05, 2016 at 12:36:17PM -0700, Casey Schaufler wrote: > > On 7/5/2016 8:50 AM, Vivek Goyal wrote: > > Provide a security hook to label new file correctly when a file is copied > > up from lower layer to upper layer of a overlay/union mount. > > > > This ho

Re: [PATCH 1/5] security, overlayfs: provide copy up security hook for unioned files

2016-07-05 Thread Vivek Goyal
e system] > > url: > https://github.com/0day-ci/linux/commits/Vivek-Goyal/Overlayfs-SELinux-Support/20160706-37 > base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git > overlayfs-next > config: i386-randconfig-s0-201627 (attached as .config) > compiler

[PATCH 2/5] security,overlayfs: Provide security hook for copy up of xattrs for overlay file

2016-07-05 Thread Vivek Goyal
, copy up will be aborted. In SELinux, label of lower file is not copied up. File already has been set with right label at the time of creation and we don't want to overwrite that label. Signed-off-by: David Howells Signed-off-by: Vivek Goyal --- fs/overlayfs/copy_up.c| 8 in

[PATCH 3/5] selinux: Pass security pointer to determine_inode_label()

2016-07-05 Thread Vivek Goyal
Right now selinux_determine_inode_label() works on security pointer of current task. Soon I need this to work on a security pointer retrieved from a set of creds. So start passing in a pointer and caller can decide where to fetch security pointer from. Signed-off-by: Vivek Goyal --- security

[PATCH 5/5] overlayfs: Use vfs_getxattr_noperm() for real inode

2016-07-05 Thread Vivek Goyal
tr_noperm(). Signed-off-by: Vivek Goyal --- fs/overlayfs/inode.c | 7 +-- fs/xattr.c| 28 +++- include/linux/xattr.h | 1 + 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c index 36dfd86..a5d3320 100

[PATCH 1/5] security, overlayfs: provide copy up security hook for unioned files

2016-07-05 Thread Vivek Goyal
creation. In SELinux, newly copied up file gets same label as lower file for non-context mounts. But it gets label specified in mount option context= for context mounts. Signed-off-by: Vivek Goyal --- fs/overlayfs/copy_up.c| 8 include/linux/lsm_hooks.h | 13 + include/linux

[PATCH 0/5][RFC] Overlayfs SELinux Support

2016-07-05 Thread Vivek Goyal
ck is welcome. Thanks Vivek Vivek Goyal (5): security, overlayfs: provide copy up security hook for unioned files security,overlayfs: Provide security hook for copy up of xattrs for overlay file selinux: Pass security pointer to determine_inode_label() overlayfs: Correctly label newly crea

[PATCH 4/5] overlayfs: Correctly label newly created file over whiteout

2016-07-05 Thread Vivek Goyal
should be such that as if task had created file in upper/. This patch introduces a new hook which determines the label dentry will get if it had been created by task in upper and sets the secid of label in passed set of creds. Caller makes use of these new creds for file creation. Signed-off-by: V

[PATCH] overlayfs: Warn instead of error if d_type is not supported

2016-07-01 Thread Vivek Goyal
should allow existing docker setups to continue working after kernel upgrade. Signed-off-by: Vivek Goyal --- fs/overlayfs/super.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) Index: rhvgoyal-linux/fs/overlayfs/super.c

Re: [PATCH] ovl: fix uid/gid when creating over whiteout

2016-06-15 Thread Vivek Goyal
On Wed, Jun 15, 2016 at 04:09:47PM +0200, Miklos Szeredi wrote: > On Wed, Jun 15, 2016 at 4:01 PM, Vivek Goyal wrote: > > On Wed, Jun 15, 2016 at 03:30:02PM +0200, Miklos Szeredi wrote: > > >> --- a/fs/overlayfs/dir.c > >> +++ b/fs/overlayfs/dir.c > &g

Re: [PATCH] ovl: fix uid/gid when creating over whiteout

2016-06-15 Thread Vivek Goyal
On Wed, Jun 15, 2016 at 03:30:02PM +0200, Miklos Szeredi wrote: > Hi Vivek, > > I've tested this to fix the regresion that Stephen reported. I think this > also is a good base for the selinux fix. > > Pushed to overlayfs-linus and overlayfs-next branches of > > git://git.kernel.org/pub/scm/li

Re: [PATCH] ovl: xattr filter fix

2016-06-02 Thread Vivek Goyal
> For listxattrs it might be measurable in pathological cases, but I very > much hope nobody cares. If they do, we'll fix it then. > > Reported-by: Vivek Goyal > Signed-off-by: Miklos Szeredi > Fixes: b96809173e94 ("security_d_instantiate(): move to the point prior to >

Re: [PATCH] MAINTAINERS: Kdump maintainers update

2016-05-25 Thread Vivek Goyal
On Wed, May 25, 2016 at 06:24:10AM -0700, Joe Perches wrote: > On Wed, 2016-05-25 at 09:16 -0400, Vivek Goyal wrote: > > I am proposing following updates to kdump maintainership. I have got > > busy in other things and not getting time to spend on kdump.  > > > > Rem

[PATCH] MAINTAINERS: Kdump maintainers update

2016-05-25 Thread Vivek Goyal
they have been contributing to kdump for a long time now and they are in a much better position to spend time on this than me. Signed-off-by: Vivek Goyal --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9c567a4..c030267 100644

[PATCH] overlayfs: Do d_type check only if work dir creation was successful

2016-05-20 Thread Vivek Goyal
r creation failed in previous step. Signed-off-by: Vivek Goyal --- fs/overlayfs/super.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 791235e..48234425 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlay

Re: [PATCH 00/10]block-throttle: add low/high limit

2016-05-18 Thread Vivek Goyal
On Fri, May 13, 2016 at 03:59:50PM -0700, Shaohua Li wrote: > On Fri, May 13, 2016 at 03:12:45PM -0400, Vivek Goyal wrote: > > On Tue, May 10, 2016 at 05:16:30PM -0700, Shaohua Li wrote: > > > Hi, > > > > > > This patch set adds low/high limit for blk-thro

Re: 45aebeaf4f67 "ovl: Ensure upper filesystem supports d_type" breaking Docker

2016-05-17 Thread Vivek Goyal
On Tue, May 17, 2016 at 10:15:21AM +0200, Miklos Szeredi wrote: > On Tue, May 17, 2016 at 8:28 AM, Al Viro wrote: > > On Mon, May 16, 2016 at 09:07:27AM -0400, Vivek Goyal wrote: > >> So it became clear that we need a check at mount time to make sure > >> d_type is su

Re: 45aebeaf4f67 "ovl: Ensure upper filesystem supports d_type" breaking Docker

2016-05-16 Thread Vivek Goyal
On Mon, May 16, 2016 at 04:45:09PM +1000, Daniel Axtens wrote: > Hi, > > I installed a fresh 4.6.0 kernel on my ppc64le system, and tried to run > a docker container. It failed. > > Docker gave me errors like this: > > docker: Error response from daemon: error creating overlay mount to > /var/l

Re: [PATCH 00/10]block-throttle: add low/high limit

2016-05-13 Thread Vivek Goyal
On Tue, May 10, 2016 at 05:16:30PM -0700, Shaohua Li wrote: > Hi, > > This patch set adds low/high limit for blk-throttle cgroup. The interface is > io.low and io.high. > > low limit implements best effort bandwidth/iops protection. If one cgroup > doesn't reach its low limit, no other cgroups ca

Re: [PATCH v2 1/1] OverlayFS: Fix checking permissions during lookup.

2016-02-29 Thread Vivek Goyal
On Sat, Feb 27, 2016 at 01:40:02PM +0300, Nazarov Sergey wrote: > 26.02.2016, 22:41, "Vivek Goyal" : > > > > So what's the problem we are trying to solve. Why should we able to > > override the DAC checks of lower layer if same directory in upper > > is se

Re: [PATCH v2 1/1] OverlayFS: Fix checking permissions during lookup.

2016-02-29 Thread Vivek Goyal
On Sun, Feb 28, 2016 at 12:09:42PM +0100, Ignacy Gawędzki wrote: > On Fri, Feb 26, 2016 at 02:41:43PM -0500, thus spake Vivek Goyal: > > CCing linux-fsdevel as it is a wider issue. > > > > > > On Wed, Feb 24, 2016 at 02:55:52PM +0100, Ignacy Gawędzki

Re: [PATCH v2 1/1] OverlayFS: Fix checking permissions during lookup.

2016-02-26 Thread Vivek Goyal
CCing linux-fsdevel as it is a wider issue. On Wed, Feb 24, 2016 at 02:55:52PM +0100, Ignacy Gawędzki wrote: > Add alternate lookup_one_len_check function to fs/namei.c which does > what lookup_one_len did until now with a boolean argument telling > whether to check that the base directory is tra

Re: [PATCH] ovl: ignore lower entries when checking purity of non-directory entries

2016-02-03 Thread Vivek Goyal
On Mon, Feb 01, 2016 at 06:43:19PM +0300, Konstantin Khlebnikov wrote: [..] > > Hi Konstantin, > > > > Thanks for the patch. This patch works for me also does not break > > unionmount-testsuite. > > Interesting. I haven't heard about this testsuite. Never read Documentation. > =) > > I've send

Re: [PATCH] ovl: ignore lower entries when checking purity of non-directory entries

2016-02-01 Thread Vivek Goyal
be > pure upper hence whiteout is left. > > So why file was not PURE_UPPER in this case? I think because dentry is > still carrying some leftover state which was valid before rename. For example, > od->numlower was set to 1 as it was a lower file. After rename, this state > is no

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-22 Thread Vivek Goyal
On Fri, Jan 22, 2016 at 11:45:51AM -0800, Shaohua Li wrote: > On Fri, Jan 22, 2016 at 02:09:10PM -0500, Vivek Goyal wrote: > > On Fri, Jan 22, 2016 at 10:00:19AM -0800, Shaohua Li wrote: > > > On Fri, Jan 22, 2016 at 10:52:36AM -0500, Vivek Goyal wrote: > > > > On F

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-22 Thread Vivek Goyal
On Fri, Jan 22, 2016 at 10:00:19AM -0800, Shaohua Li wrote: > On Fri, Jan 22, 2016 at 10:52:36AM -0500, Vivek Goyal wrote: > > On Fri, Jan 22, 2016 at 09:48:22AM -0500, Tejun Heo wrote: > > > Hello, Shaohua. > > > > > > On Thu, Jan 21, 2016 at 04:00:16PM -0

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-22 Thread Vivek Goyal
On Fri, Jan 22, 2016 at 09:48:22AM -0500, Tejun Heo wrote: > Hello, Shaohua. > > On Thu, Jan 21, 2016 at 04:00:16PM -0800, Shaohua Li wrote: > > > The thing is that most of the possible contentions can be removed by > > > implementing per-cpu cache which shouldn't be too difficult. 10% > > > extr

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-22 Thread Vivek Goyal
On Thu, Jan 21, 2016 at 05:41:57PM -0500, Tejun Heo wrote: [..] > A simple approximation of IO cost such as fixed cost > per IO + cost proportional to IO size would do a far better job than > just depending on bandwidth or iops and that requires approximating > two variables over time. I'm not su

Re: [RFC 3/3] blk-throttling: detect inactive cgroup

2016-01-21 Thread Vivek Goyal
On Thu, Jan 21, 2016 at 01:05:43PM -0800, Shaohua Li wrote: > On Thu, Jan 21, 2016 at 03:44:05PM -0500, Vivek Goyal wrote: > > On Wed, Jan 20, 2016 at 09:49:19AM -0800, Shaohua Li wrote: > > > If a cgroup is inactive for some time, it should be excluded from > > > bandwi

Re: [RFC 3/3] blk-throttling: detect inactive cgroup

2016-01-21 Thread Vivek Goyal
On Wed, Jan 20, 2016 at 09:49:19AM -0800, Shaohua Li wrote: > If a cgroup is inactive for some time, it should be excluded from > bandwidth calculation. I am not sure why do we require this patch. If group is inactive, it will not be on service tree and will not contribute to weight hence will not

Re: [RFC 2/3] blk-throttling: weight based throttling

2016-01-21 Thread Vivek Goyal
On Wed, Jan 20, 2016 at 09:49:18AM -0800, Shaohua Li wrote: > We know total bandwidth of a disk and can calculate cgroup's bandwidth > percentage against disk bandwidth according to its weight. We can easily > calculate cgroup bandwidth. > > Signed-off-by: Shaohua Li > --- > block/blk-throttle.c

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-20 Thread Vivek Goyal
On Wed, Jan 20, 2016 at 11:43:27AM -0800, Shaohua Li wrote: > On Wed, Jan 20, 2016 at 02:40:13PM -0500, Vivek Goyal wrote: > > On Wed, Jan 20, 2016 at 11:34:48AM -0800, Shaohua Li wrote: > > > On Wed, Jan 20, 2016 at 02:05:35PM -0500, Vivek Goyal wrote: > > > > On W

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-20 Thread Vivek Goyal
On Wed, Jan 20, 2016 at 11:43:27AM -0800, Shaohua Li wrote: > On Wed, Jan 20, 2016 at 02:40:13PM -0500, Vivek Goyal wrote: > > On Wed, Jan 20, 2016 at 11:34:48AM -0800, Shaohua Li wrote: > > > On Wed, Jan 20, 2016 at 02:05:35PM -0500, Vivek Goyal wrote: > > > > On W

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-20 Thread Vivek Goyal
On Wed, Jan 20, 2016 at 11:34:48AM -0800, Shaohua Li wrote: > On Wed, Jan 20, 2016 at 02:05:35PM -0500, Vivek Goyal wrote: > > On Wed, Jan 20, 2016 at 09:49:16AM -0800, Shaohua Li wrote: > > > Hi, > > > > > > Currently we have 2 iocontrollers. blk-throttli

Re: [RFC 0/3] block: proportional based blk-throttling

2016-01-20 Thread Vivek Goyal
On Wed, Jan 20, 2016 at 09:49:16AM -0800, Shaohua Li wrote: > Hi, > > Currently we have 2 iocontrollers. blk-throttling is bandwidth based. CFQ is > weight based. It would be great there is a unified iocontroller for the two. > And blk-mq doesn't support ioscheduler, leaving blk-throttling the onl

Re: [PATCH 2/3] block: make blk-throttle.c explicitly non-modular

2015-12-15 Thread Vivek Goyal
it ordering remains unchanged with this commit. > > Cc: Vivek Goyal > Cc: Jens Axboe > Signed-off-by: Paul Gortmaker > --- > block/blk-throttle.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/block/blk-throttle.c b/block/blk-throttle

Re: [PATCH cgroup/for-4.4 3/3] cgroup: replace unified-hierarchy.txt with a proper cgroup v2 documentation

2015-10-23 Thread Vivek Goyal
On Fri, Oct 23, 2015 at 10:18:07AM +0900, Tejun Heo wrote: > Hello, > > On Thu, Oct 22, 2015 at 11:36:05PM +0900, Tejun Heo wrote: > > It works with ext2 and 4 and btrfs. Will document it. Thanks. > > Updated to include all writeback information from > blkio-controller.txt. > Thanks Tejun. Lo

Re: [PATCH cgroup/for-4.4 3/3] cgroup: replace unified-hierarchy.txt with a proper cgroup v2 documentation

2015-10-22 Thread Vivek Goyal
On Thu, Oct 22, 2015 at 11:36:05PM +0900, Tejun Heo wrote: > On Thu, Oct 22, 2015 at 10:34:27AM -0400, Vivek Goyal wrote: > > On Thu, Oct 22, 2015 at 10:23:54AM +0900, Tejun Heo wrote: > > > > [..] > > > +5-3-2. Writeback > > > + > > > +Writeback

Re: [PATCH cgroup/for-4.4 3/3] cgroup: replace unified-hierarchy.txt with a proper cgroup v2 documentation

2015-10-22 Thread Vivek Goyal
On Thu, Oct 22, 2015 at 10:23:54AM +0900, Tejun Heo wrote: [..] > +5-3-2. Writeback > + > +Writeback of page cache manages the dirty memory ratio and is an > +integral part of memory management. The io controller, in conjunction > +with the memory controller, implements control of page cache writ

Re: [PATCH] fs/block_dev.c: Remove WARN_ON() when inode writeback fails

2015-08-10 Thread Vivek Goyal
Hi Jens, Do you have concerns with this patch? If not, can you please include it. Thanks Vivek On Mon, Jun 22, 2015 at 02:41:18PM -0400, Vivek Goyal wrote: > If a block device is hot removed and later last reference to devices > is put, we try to writeback the dirty inode. But device i

Re: [PATCHSET block/for-4.3] blkcg: implement interface for the unified hierarchy

2015-07-27 Thread Vivek Goyal
On Fri, Jul 24, 2015 at 02:43:44PM -0400, Tejun Heo wrote: > Hello, > > blkcg interface grew to be the biggest of all controllers and > unfortunately most inconsistent too. The interface files are > inconsistent with a number of cloes duplicates. Some files have > recursive variants while others

Re: [PATCH] kexec: Remove the unnecessary conditional judgement to simplify the code logic

2015-07-27 Thread Vivek Goyal
essary conditional judgement. > > Signed-off-by: Minfei Huang Looks good to me. Acked-by: Vivek Goyal Thanks Vivek > --- > kernel/kexec.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/kernel/kexec.c b/kernel/kexec.c > index 7a36fdc..458

Re: [RFC PATCH] block: xfs: dm thin: train XFS to give up on retrying IO if thinp is out of space

2015-07-23 Thread Vivek Goyal
On Fri, Jul 24, 2015 at 09:00:54AM +1000, Dave Chinner wrote: > On Thu, Jul 23, 2015 at 12:43:58PM -0400, Vivek Goyal wrote: > > On Thu, Jul 23, 2015 at 03:10:43PM +1000, Dave Chinner wrote: > > > > [..] > > > I don't think knowing the bdev timeout is necessar

Re: [RFC PATCH] block: xfs: dm thin: train XFS to give up on retrying IO if thinp is out of space

2015-07-23 Thread Vivek Goyal
On Thu, Jul 23, 2015 at 03:10:43PM +1000, Dave Chinner wrote: [..] > I don't think knowing the bdev timeout is necessary because the > default is most likely to be "fail fast" in this case. i.e. no > retries, just shut down. IOWs, if we describe the configs and > actions in neutral terms, then th

Re: [PATCH V2 2/2] kexec: split kexec_load syscall from kexec core code

2015-07-21 Thread Vivek Goyal
On Mon, Jul 20, 2015 at 04:37:15PM +0800, dyo...@redhat.com wrote: > Now there's two kexec load syscall, one is kexec_load another is > kexec_file_load, kexec_file_load has been splited as kernel/kexec_file.c. > In this patch I split kexec_load syscall code to kernel/kexec.c. Hi Dave, Nice work.

Re: [PATCH 09/10] blkcg: move io_service_bytes and io_serviced stats into blkcg_gq

2015-07-15 Thread Vivek Goyal
On Wed, Jul 15, 2015 at 12:04:25PM -0400, Tejun Heo wrote: > Hello, Vivek. > > On Tue, Jul 14, 2015 at 12:09:08PM -0400, Vivek Goyal wrote: > > So now blkio.io_serviced will switch to accounting number of bios > > instead of number of requests? I feel given other stats,

Re: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available

2015-07-14 Thread Vivek Goyal
On Tue, Jul 14, 2015 at 01:01:12PM -0500, Eric W. Biederman wrote: > Vivek Goyal writes: > > > On Tue, Jul 14, 2015 at 05:29:53PM +, dwal...@fifo99.com wrote: > > > > [..] > >> > >> > If a machine is failing, there are high

Re: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available

2015-07-14 Thread Vivek Goyal
On Tue, Jul 14, 2015 at 05:29:53PM +, dwal...@fifo99.com wrote: [..] > > >> > If a machine is failing, there are high chance it can't deliver you the > > >> > notification. Detecting that failure suing some kind of polling > > >> > mechanism > > >> > might be more reliable. And it will make e

Re: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available

2015-07-14 Thread Vivek Goyal
On Tue, Jul 14, 2015 at 03:48:33PM +, dwal...@fifo99.com wrote: > On Tue, Jul 14, 2015 at 11:40:40AM -0400, Vivek Goyal wrote: > > On Tue, Jul 14, 2015 at 03:34:30PM +, dwal...@fifo99.com wrote: > > > On Tue, Jul 14, 2015 at 11:02:08AM -0400, Vivek Goyal wrote: > >

Re: [PATCH 09/10] blkcg: move io_service_bytes and io_serviced stats into blkcg_gq

2015-07-14 Thread Vivek Goyal
On Sun, Jul 12, 2015 at 02:00:42PM -0400, Tejun Heo wrote: > Currently, both cfq-iosched and blk-throttle keep track of > io_service_bytes and io_serviced stats. While keeping track of them > separately may be useful during development, it doesn't make much > sense otherwise. Also, blk-throttle w

Re: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available

2015-07-14 Thread Vivek Goyal
On Tue, Jul 14, 2015 at 03:34:30PM +, dwal...@fifo99.com wrote: > On Tue, Jul 14, 2015 at 11:02:08AM -0400, Vivek Goyal wrote: > > On Tue, Jul 14, 2015 at 01:59:19PM +, dwal...@fifo99.com wrote: > > > On Mon, Jul 13, 2015 at 08:19:45PM -0500, Eric W. Biederman wrote: >

Re: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available

2015-07-14 Thread Vivek Goyal
On Tue, Jul 14, 2015 at 01:59:19PM +, dwal...@fifo99.com wrote: > On Mon, Jul 13, 2015 at 08:19:45PM -0500, Eric W. Biederman wrote: > > dwal...@fifo99.com writes: > > > > > On Fri, Jul 10, 2015 at 08:41:28AM -0500, Eric W. Biederman wrote: > > >> Hidehiro Kawai writes: > > >> > > >> > You c

Re: [PATCH 3/3] kexec: Change the timing of callbacks related to "crash_kexec_post_notifiers" boot option

2015-07-14 Thread Vivek Goyal
On Fri, Jul 10, 2015 at 08:33:31PM +0900, Hidehiro Kawai wrote: > This patch fixes problems reported by Daniel Walker > (https://lkml.org/lkml/2015/6/24/44), and also replaces the bug fix > commits 5375b70 and f45d85f. > > If "crash_kexec_post_notifiers" boot option is specified, > other cpus are

Re: [PATCH 1/3] panic: Disable crash_kexec_post_notifiers if kdump is not available

2015-07-14 Thread Vivek Goyal
On Tue, Jul 14, 2015 at 01:59:19PM +, dwal...@fifo99.com wrote: > On Mon, Jul 13, 2015 at 08:19:45PM -0500, Eric W. Biederman wrote: > > dwal...@fifo99.com writes: > > > > > On Fri, Jul 10, 2015 at 08:41:28AM -0500, Eric W. Biederman wrote: > > >> Hidehiro Kawai writes: > > >> > > >> > You c

Re: [PATCH v4] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-14 Thread Vivek Goyal
On Fri, Jul 10, 2015 at 11:14:06AM +0200, Michael Holzheu wrote: [..] > What about the following patch: > --- > diff --git a/kernel/kexec.c b/kernel/kexec.c > index 7a36fdc..7837c4e 100644 > --- a/kernel/kexec.c > +++ b/kernel/kexec.c > @@ -1236,10 +1236,68 @@ int kexec_load_disabled; > > stati

Re: [PATCH v3] kexec: Make a pair of map and unmap reserved pages when kdump fails to start

2015-07-07 Thread Vivek Goyal
On Thu, Jul 02, 2015 at 09:45:52AM +0800, Minfei Huang wrote: > For some arch, kexec shall map the reserved pages, then use them, when > we try to start the kdump service. > > Now kexec will never unmap the reserved pages, once it fails to continue > starting the kdump service. > > Make a pair of

Re: kexec crash kernel running with watchdog enabled

2015-06-29 Thread Vivek Goyal
On Mon, Jun 29, 2015 at 06:53:29PM +0900, Hidehiro Kawai wrote: > Hi, > > (2015/06/27 3:33), dwal...@fifo99.com wrote:> On Fri, Jun 26, 2015 at > 10:02:00AM +0900, Hidehiro Kawai wrote: > >> Hi, > >> > >> (2015/06/25 1:31), dwal...@fifo99.com wrote: > >>> On Wed, Jun 24, 2015 at 03:52:48PM +0900,

Re: [PATCH 5/6] blkcg: move io_service_bytes and io_serviced stats into blkcg_gq

2015-06-26 Thread Vivek Goyal
On Thu, Jun 25, 2015 at 05:38:56PM -0400, Tejun Heo wrote: > Currently, both cfq-iosched and blk-throttle keep track of > io_service_bytes and io_serviced stats. While keeping track of them > separately may be useful during development, it doesn't make much > sense otherwise. Also, blkcg stats ar

Re: [PATCH 2/6] blkcg: add blkg_[rw]stat->aux_cnt and replace cfq_group->dead_stats with it

2015-06-26 Thread Vivek Goyal
On Fri, Jun 26, 2015 at 09:35:40AM -0400, Tejun Heo wrote: > On Fri, Jun 26, 2015 at 09:27:02AM -0400, Vivek Goyal wrote: > > On Thu, Jun 25, 2015 at 05:38:53PM -0400, Tejun Heo wrote: > > > > [..] > > > It's planned that the core stats will be moved to blk

Re: [PATCH 2/6] blkcg: add blkg_[rw]stat->aux_cnt and replace cfq_group->dead_stats with it

2015-06-26 Thread Vivek Goyal
On Thu, Jun 25, 2015 at 05:38:53PM -0400, Tejun Heo wrote: [..] > It's planned that the core stats will be moved to blkcg_gq, so we want > to move the mechanism for keeping track of the stats of dead children > from cfq to blkcg core. This patch adds blkg_[rw]stat->aux_cnt which > are atomic64_t'

Re: [PATCH 5/7] blk-throttle: remove asynchrnous percpu stats allocation mechanism

2015-06-25 Thread Vivek Goyal
(). Rit it out. > > This ensures that an active throtl_grp always has valid non-NULL > ->stats_cpu. Remove checks on it. This is a nice cleanup. Allocating stats memory with the help of a worker thread was twisted. Thanks Vivek > > Signed-off-by: Tejun

Re: kexec_load(2) bypasses signature verification

2015-06-25 Thread Vivek Goyal
On Thu, Jun 25, 2015 at 04:48:18PM +0800, Dave Young wrote: > On 06/19/15 at 09:09am, Vivek Goyal wrote: > > On Fri, Jun 19, 2015 at 04:18:16PM +0800, Dave Young wrote: > > > > > If we want to disable unsigned kernel loading at compile time, then we > > > >

[PATCH] fs/block_dev.c: Remove WARN_ON() when inode writeback fails

2015-06-22 Thread Vivek Goyal
Kleen Signed-off-by: Vivek Goyal --- fs/block_dev.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) Index: rhvgoyal-linux/fs/block_dev.c === --- rhvgoyal-linux.orig/fs/block_dev.c 2015-06-18 15:54:52.339383237

Re: WARNING: at fs/block_dev.c:5 when removing LV on removed device

2015-06-22 Thread Vivek Goyal
On Mon, Jun 22, 2015 at 01:52:55PM -0400, Tejun Heo wrote: > Hello, > > On Mon, Jun 22, 2015 at 01:46:48PM -0400, Vivek Goyal wrote: > > Subject: fs/block_dev.c: Warn on inode writeback failure instead of > > WARN_ON() > > > > If a block device is hot removed an

Re: WARNING: at fs/block_dev.c:5 when removing LV on removed device

2015-06-22 Thread Vivek Goyal
ollowing patch look good? Thanks Vivek Subject: fs/block_dev.c: Warn on inode writeback failure instead of WARN_ON() If a block device is hot removed and later last reference to devices is put, we try to writeback the dirty inode. But device is gone and that writeback fails. Currently we

Re: kexec_load(2) bypasses signature verification

2015-06-19 Thread Vivek Goyal
On Fri, Jun 19, 2015 at 03:04:31PM +0800, Dave Young wrote: > On 06/16/15 at 09:47pm, Vivek Goyal wrote: > > On Tue, Jun 16, 2015 at 08:32:37PM -0500, Eric W. Biederman wrote: > > > Vivek Goyal writes: > > > > > > > On Tue, Jun 16, 2015 at 02

Re: kexec_load(2) bypasses signature verification

2015-06-19 Thread Vivek Goyal
On Fri, Jun 19, 2015 at 04:18:16PM +0800, Dave Young wrote: > > > If we want to disable unsigned kernel loading at compile time, then we > > > really need to work on decoupling CONFIG_KEXEC and CONFIG_FILE_KEXEC. > > > Introducing another config option is not the way forward, IMHO. > > > > Yes, le

Re: [dm-devel] WARNING: at fs/block_dev.c:5 when removing LV on removed device

2015-06-18 Thread Vivek Goyal
On Thu, Jun 18, 2015 at 03:08:15PM -0400, Vivek Goyal wrote: > On Thu, Jun 18, 2015 at 02:16:19PM -0400, Mike Snitzer wrote: > > On Thu, Jun 18 2015 at 2:08pm -0400, > > Andi Kleen wrote: > > > > > > Hmm, so you have a filesystem active on it too? &

Re: [dm-devel] WARNING: at fs/block_dev.c:5 when removing LV on removed device

2015-06-18 Thread Vivek Goyal
On Thu, Jun 18, 2015 at 02:16:19PM -0400, Mike Snitzer wrote: > On Thu, Jun 18 2015 at 2:08pm -0400, > Andi Kleen wrote: > > > > Hmm, so you have a filesystem active on it too? > > > > I unmounted it before. > > > > > > > > > Also the VG removal did not work of course. > > > > > > Once you

Re: kexec_load(2) bypasses signature verification

2015-06-18 Thread Vivek Goyal
On Thu, Jun 18, 2015 at 10:02:09AM +0800, Dave Young wrote: [..] > > Or simply add a new config option KEXEC_VERIFY_SIG_FORCE, so we can return > > error in kexec_load and print some error message. > > Just like below, does this work for you, Ted? > > --- > arch/x86/Kconfig |7 +++ > ke

Re: kexec_load(2) bypasses signature verification

2015-06-16 Thread Vivek Goyal
On Tue, Jun 16, 2015 at 08:32:37PM -0500, Eric W. Biederman wrote: > Vivek Goyal writes: > > > On Tue, Jun 16, 2015 at 02:38:31PM -0500, Eric W. Biederman wrote: > >> > >> Adding Vivek as he is the one who implemented kexec_file_load. > >> I was hoping

Re: kexec_load(2) bypasses signature verification

2015-06-16 Thread Vivek Goyal
On Tue, Jun 16, 2015 at 02:38:31PM -0500, Eric W. Biederman wrote: > > Adding Vivek as he is the one who implemented kexec_file_load. > I was hoping he would respond to this thread, and it looks like he > simply has not ever been Cc'd. > > Theodore Ts'o writes: > > > On Mon, Jun 15, 2015 at 09:

Re: [PATCH 3/3] writeback, blkio: add documentation for cgroup writeback support

2015-06-15 Thread Vivek Goyal
On Fri, Jun 12, 2015 at 04:57:34PM -0500, Tejun Heo wrote: > Update Documentation/cgroups/blkio-controller.txt to reflect the > recently added cgroup writeback support. > > Signed-off-by: Tejun Heo > Cc: Li Zefan > Cc: Vivek Goyal > Cc: cgro...@vger.kernel

Re: [PATCH 8/8] cfq-iosched: charge async IOs to the appropriate blkcg's instead of the root

2015-06-08 Thread Vivek Goyal
is patch, cfq's proportional IO control through blkio.weight > works correctly when cgroup writeback is in use. > > Signed-off-by: Tejun Heo > Cc: Vivek Goyal > Cc: Arianna Avanzini > --- > block/cfq-iosched.c | 85 > ++-

Re: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue()

2015-06-08 Thread Vivek Goyal
On Mon, Jun 08, 2015 at 04:27:10PM -0400, Jeff Moyer wrote: > Jeff Moyer writes: > > > Tejun Heo writes: > > > >> Even when allocations fail, cfq_find_alloc_queue() always returns a > >> valid cfq_queue by falling back to the oom cfq_queue. As such, there > >> isn't much point in taking @gfp_ma

Re: [PATCH 21/48] writeback: make backing_dev_info host cgroup-specific bdi_writebacks

2015-03-27 Thread Vivek Goyal
On Mon, Mar 23, 2015 at 12:54:32AM -0400, Tejun Heo wrote: [..] > +/** > + * inode_attach_wb - associate an inode with its wb > + * @inode: inode of interest > + * @page: page being dirtied (may be NULL) > + * > + * If @inode doesn't have its wb, associate it with the wb matching the > + * memcg o

Re: [PATCH 28/48] writeback: implement and use mapping_congested()

2015-03-27 Thread Vivek Goyal
writeback support. > > Signed-off-by: Tejun Heo > Cc: Jens Axboe > Cc: Jan Kara > Cc: Vivek Goyal > --- > fs/fs-writeback.c | 39 +++ > include/linux/backing-dev.h | 27 +++ > mm/fadv

Re: [PATCHSET 1/3 v2 block/for-4.1/core] writeback: cgroup writeback support

2015-03-25 Thread Vivek Goyal
On Mon, Mar 23, 2015 at 12:54:11AM -0400, Tejun Heo wrote: > > > How to test > --- > > * Boot with kernel option "cgroup__DEVEL__legacy_files_on_dfl". > > * umount /sys/fs/cgroup/memory > umount /sys/fs/cgroup/blkio > mkdir /sys/fs/cgroup/unified > mount -t cgroup -o __DEVEL__sane

Re: Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-24 Thread Vivek Goyal
On Tue, Mar 24, 2015 at 05:18:14PM +0100, Ingo Molnar wrote: > > * Vivek Goyal wrote: > > > > Yet the actual bug is in that commit, 'crash_kexec_post_notifiers' > > > was clearly not a no-op in the default case, against expectations. > > > > Hi

Re: Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-24 Thread Vivek Goyal
On Tue, Mar 24, 2015 at 08:11:29AM +0100, Ingo Molnar wrote: > > * Masami Hiramatsu wrote: > > > (2015/03/23 16:19), Ingo Molnar wrote: > > > > > > * Baoquan He wrote: > > > > > >> CC more people ... > > >> > > >> On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: > > >>> The commit f06

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-24 Thread Vivek Goyal
On Tue, Mar 24, 2015 at 05:27:10AM -0500, Eric W. Biederman wrote: > Ingo Molnar writes: > > > * Masami Hiramatsu wrote: > > > >> > > >> > f06e5153f4ae ("kernel/panic.c: add "crash_kexec_post_notifiers" option > >> > for kdump after panic_notifers") > >> > > >> > Was that crash_kexec() was

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Vivek Goyal
uences > ... > > If it crashed due to some hardware failure, there's literally an > infinite amount of failure modes that may or may not be impacted by > kexec crash-time handling ordering. We don't want to put a zillion > such flags into the kernel proper just to

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Vivek Goyal
On Mon, Mar 23, 2015 at 02:50:46PM +0100, Ingo Molnar wrote: > > * Vivek Goyal wrote: > > > On Mon, Mar 23, 2015 at 08:19:43AM +0100, Ingo Molnar wrote: > > > > > > * Baoquan He wrote: > > > > > > > CC more people ... > > > >

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-23 Thread Vivek Goyal
On Mon, Mar 23, 2015 at 08:19:43AM +0100, Ingo Molnar wrote: > > * Baoquan He wrote: > > > CC more people ... > > > > On 03/07/15 at 01:31am, "Hatayama, Daisuke/畑山 大輔" wrote: > > > The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced > > > "crash_kexec_post_notifiers" kernel boot opti

Re: [PATCH] x86/kexec: Cleanup KEXEC_VERIFY_SIG Kconfig help text

2015-03-13 Thread Vivek Goyal
On Fri, Mar 13, 2015 at 02:04:37PM +0100, Borislav Petkov wrote: > From: Borislav Petkov > > Make it much simpler without losing the gist of what it says. > > Signed-off-by: Borislav Petkov > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: "H. Peter Anvin" >

Re: [PATCH v2] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-06 Thread Vivek Goyal
xec_post_notifiers" in the condition of kexec_should_crash(). > > Also, put a comment in kexec_should_crash() to explain not obvious > things on this patch. > > Signed-off-by: HATAYAMA Daisuke > Acked-by: Baoquan He > Tested-by: Hidehiro Kawai > Reviewed-by: Masami Hira

Re: [RESEND PATCH] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-05 Thread Vivek Goyal
On Thu, Mar 05, 2015 at 05:19:30PM -0500, Vivek Goyal wrote: > On Wed, Mar 04, 2015 at 05:56:48PM +0900, HATAYAMA Daisuke wrote: > > The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced > > "crash_kexec_post_notifiers" kernel boot option, which toggles &

Re: [RESEND PATCH] kernel/panic/kexec: fix "crash_kexec_post_notifiers" option issue in oops path

2015-03-05 Thread Vivek Goyal
On Wed, Mar 04, 2015 at 05:56:48PM +0900, HATAYAMA Daisuke wrote: > The commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 introduced > "crash_kexec_post_notifiers" kernel boot option, which toggles > wheather panic() calls crash_kexec() before or after panic_notifiers > and dump kmsg. > > The proble

<    1   2   3   4   5   6   7   8   9   10   >