F_DUPFD_CLOEXEC broken in 3.7.0

2012-10-08 Thread Richard W.M. Jones
Let's move this to LKML ... On Mon, Oct 08, 2012 at 10:53:25PM +0100, Richard W.M. Jones wrote: On Mon, Oct 08, 2012 at 10:50:30PM +0100, Richard W.M. Jones wrote: [.. discussion on gnulib test-cloexec test snipped ..] I'm suspicious this is a kernel bug: creat(test-cloexec.tmp, 0600

Re: F_DUPFD_CLOEXEC broken in 3.7.0

2012-10-09 Thread Richard W.M. Jones
On Tue, Oct 09, 2012 at 10:07:22PM +0800, Cong Wang wrote: On Tue, Oct 9, 2012 at 6:05 AM, Richard W.M. Jones rjo...@redhat.com wrote: Let's move this to LKML ... On Mon, Oct 08, 2012 at 10:53:25PM +0100, Richard W.M. Jones wrote: On Mon, Oct 08, 2012 at 10:50:30PM +0100, Richard W.M

[PATCH] x86: Expose loops_per_jiffy through /proc/cpuinfo.

2013-03-01 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com When we run the current kernel using qemu with TCG (software emulation of x86), adding the lpj= option to the guest kernel helps greatly with clock stability especially when the host is heavily loaded. Currently the calculated 'lpj=...' argument

Re: [PATCH] x86: Expose loops_per_jiffy through /proc/cpuinfo.

2013-03-01 Thread Richard W.M. Jones
Ignore this patch, it's obviously wrong. Too late in the afternoon ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported.

Re: [PATCH] x86: Expose loops_per_jiffy through /proc/cpuinfo.

2013-03-01 Thread Richard W.M. Jones
On Fri, Mar 01, 2013 at 04:46:43PM +, Richard W.M. Jones wrote: Ignore this patch, it's obviously wrong. Too late in the afternoon ... Actually, NOT wrong. You can't get HZ from userspace, so exporting loops_per_jiffy like this is necessary. Rich. -- Richard Jones, Virtualization Group

Re: [PATCH 0/4] vfs: fix file creation mode bugs

2012-08-10 Thread Richard W.M. Jones
deletions(-) I added these four patches to the Fedora Rawhide kernel and these fix the problems with ntfs-3g and my FUSE module. Tested-by: Richard W.M. Jones rjo...@redhat.com Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows

Re: [PATCH] block: replace __getblk_slow misfix by grow_dev_page fix

2012-08-22 Thread Richard W.M. Jones
On Tue, Aug 21, 2012 at 06:33:45PM -0700, Hugh Dickins wrote: Jeff, Your commit 91f68c89d8f3 (block: fix infinite loop in __getblk_slow), already gone into 3.* stable, is not good. Could you and your testers please give this alternative a try - I think it should work, and have started it

Re: [PATCH] block: replace __getblk_slow misfix by grow_dev_page fix

2012-08-22 Thread Richard W.M. Jones
On Tue, Aug 21, 2012 at 06:33:45PM -0700, Hugh Dickins wrote: Jeff, Your commit 91f68c89d8f3 (block: fix infinite loop in __getblk_slow), already gone into 3.* stable, is not good. Could you and your testers please give this alternative a try - I think it should work, and have started it

Re: [PATCH] block: replace __getblk_slow misfix by grow_dev_page fix

2012-08-28 Thread Richard W.M. Jones
On Wed, Aug 22, 2012 at 09:56:12PM -0700, Hugh Dickins wrote: On Wed, 22 Aug 2012, Richard W.M. Jones wrote: On Tue, Aug 21, 2012 at 06:33:45PM -0700, Hugh Dickins wrote: Jeff, Your commit 91f68c89d8f3 (block: fix infinite loop in __getblk_slow), already gone into 3.* stable

[PATCH] [SCSI] virtio-scsi: Initialize scatterlist structure.

2012-08-20 Thread Richard W.M. Jones
From: Richard W.M. Jones rjo...@redhat.com The sg struct is used without being initialized. https://bugzilla.redhat.com/show_bug.cgi?id=847548 Signed-off-by: Richard W.M. Jones rjo...@redhat.com --- drivers/scsi/virtio_scsi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] [SCSI] virtio-scsi: Initialize scatterlist structure.

2012-10-01 Thread Richard W.M. Jones
On Mon, Oct 01, 2012 at 03:13:01PM +0200, Paolo Bonzini wrote: Il 20/08/2012 16:05, Paolo Bonzini ha scritto: Il 20/08/2012 16:04, Richard W.M. Jones ha scritto: From: Richard W.M. Jones rjo...@redhat.com The sg struct is used without being initialized. https://bugzilla.redhat.com

[PATCH] blkdev_wait_scan module to help initrd scripts

2007-06-12 Thread Richard W.M. Jones
) +{ +} + +MODULE_DESCRIPTION(Block device wait for probing to finish); +MODULE_AUTHOR(Richard W.M. Jones); +MODULE_LICENSE(GPL); + +module_init(blkdev_wait_scan_init); +module_exit(blkdev_wait_scan_exit); diff --git a/fs/block_dev.c b/fs/block_dev.c index ea1480a..9fa5547 100644 --- a/fs/block_dev.c +++ b/fs

Re: [PATCH] um: ubd: Add REQ_FLUSH suppport

2013-08-19 Thread Richard W.M. Jones
. This fixes the sync problem I saw before. So: Tested-by: Richard W.M. Jones rjo...@redhat.com Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn

Re: [uml-devel] [PATCH] um: ubd: Add REQ_FLUSH suppport

2013-08-19 Thread Richard W.M. Jones
On Mon, Aug 19, 2013 at 12:13:14PM +0200, Geert Uytterhoeven wrote: Hi Richard, On Mon, Aug 19, 2013 at 11:18 AM, Richard W.M. Jones rjo...@redhat.com wrote: On Sun, Aug 18, 2013 at 12:09:34AM +0200, Richard Weinberger wrote: UML's block device driver does not support write barriers

Re: [PATCH] block: Fix cloning of discard/write same bios

2014-02-11 Thread Richard W.M. Jones
. Fortunately discard and write same bios never have more than a single biovec, so bio_for_each_segment() is unnecessary and not terribly meaningful for them, but we still have to special case them in a few places. Signed-off-by: Kent Overstreet k...@daterainc.com Tested-by: Richard W.M. Jones rjo

Re: [PATCH] md: Partially revert 2f6db2a7, which broke raid5

2013-05-29 Thread Richard W.M. Jones
On Sun, May 19, 2013 at 10:51:45AM -0700, Kent Overstreet wrote: Sorry for the delay - been vacationing. Reproduced the original bug, here's a patch that fixes it: commit 402f5db3708b2062795a384a3d8397cf702e27bc Author: Kent Overstreet koverstr...@google.com Date: Sun May 19 10:27:07

Re: [PATCH] md: Partially revert 2f6db2a7, which broke raid5

2013-05-30 Thread Richard W.M. Jones
On Thu, May 30, 2013 at 09:22:43AM +1000, NeilBrown wrote: On Wed, 29 May 2013 15:03:40 +0200 Jens Axboe ax...@kernel.dk wrote: On Wed, May 29 2013, Richard W.M. Jones wrote: On Sun, May 19, 2013 at 10:51:45AM -0700, Kent Overstreet wrote: Sorry for the delay - been vacationing

Re: intel_pstate divide error with v3.13-rc4-256-gb7000ad

2013-12-27 Thread Richard W.M. Jones
Probably the qemu command line is more interesting, which is in this comment and reproduced below. https://bugzilla.redhat.com/show_bug.cgi?id=1046317#c1 /usr/bin/qemu-kvm \ -global virtio-blk-pci.scsi=off \ -nodefconfig \ -enable-fips \ -nodefaults \ -display none \

Re: intel_pstate divide error with v3.13-rc4-256-gb7000ad

2013-12-27 Thread Richard W.M. Jones
On Fri, Dec 27, 2013 at 07:01:48PM +0200, Gleb Natapov wrote: On Fri, Dec 27, 2013 at 06:52:48PM +0200, Gleb Natapov wrote: On Fri, Dec 27, 2013 at 03:15:39PM +0100, Kashyap Chamarthy wrote: [. . .] KVM does not emulate P-states at all. intel_pstate_init() calls

Re: [QUERY] lguest64

2013-08-08 Thread Richard W.M. Jones
On Wed, Jul 31, 2013 at 12:39:23PM +0300, Mike Rapoport wrote: On Tue, Jul 23, 2013 at 4:28 AM, Rusty Russell ru...@rustcorp.com.au wrote: Yes, the subset of x86-64 machines for which there isn't hardware virtualization support is pretty uninteresting. There are plenty virtual machines in

Re: [RFC 1/2] target: Add documentation on the target userspace pass-through driver

2014-08-30 Thread Richard W.M. Jones
On Tue, Jul 01, 2014 at 12:11:14PM -0700, Andy Grover wrote: Describes the driver and its interface to make it possible for user programs to back a LIO-exported LUN. Signed-off-by: Andy Grover agro...@redhat.com --- Documentation/target/tcmu-design.txt | 210

Re: [RFC 1/2] target: Add documentation on the target userspace pass-through driver

2014-08-31 Thread Richard W.M. Jones
On Sun, Aug 31, 2014 at 12:49:26PM -0700, Andy Grover wrote: Thanks for the feedback. I am undoubtedly too close to the details, because I thought I *was* explaining things :) Yeah, sorry it came across as a bit harsh. Benoit did explain it to me so I understood it in the end (I think!) This

Re: [PATCH] arm64: annotate psci invoke functions as notrace

2015-02-24 Thread Richard W.M. Jones
On Wed, Feb 18, 2015 at 12:26:38PM -0500, Kyle McMartin wrote: Using GCC 5 to build the kernel with ftrace enabled, we encounter the following error as a result of the mcount prologue changing the expected register use of the function parameters, /tmp/cc8Kpn7A.s: Assembler messages:

Re: [RFC PATCH 00/28] Linux Kernel Library

2015-11-03 Thread Richard W.M. Jones
On Tue, Nov 03, 2015 at 10:40:29PM +0100, Richard Weinberger wrote: > On Tue, Nov 3, 2015 at 9:20 PM, Octavian Purdila > wrote: > > LKL (Linux Kernel Library) is aiming to allow reusing the Linux kernel code > > as extensively as possible with minimal effort and

Re: [RFC PATCH 00/28] Linux Kernel Library

2015-11-07 Thread Richard W.M. Jones
I just pushed a (very early) WIP branch that contains changes to libguestfs to add an LKL backend: https://github.com/rwmjones/libguestfs/tree/lkl Read the README file in the libguestfs sources before starting, followed by the instructions in the commit message:

Re: [RFC PATCH 00/28] Linux Kernel Library

2015-11-06 Thread Richard W.M. Jones
On Sat, Nov 07, 2015 at 01:35:36AM +0100, Richard Weinberger wrote: > Am 04.11.2015 um 15:15 schrieb Octavian Purdila: > > We could redefine the syscalls/libc symbols to call lkl_sys_ functions > > in launch-lkl, e.g.: > > > > int opendir(const char *path) > > { > >return

Re: [RFC PATCH 00/28] Linux Kernel Library

2015-11-04 Thread Richard W.M. Jones
On Wed, Nov 04, 2015 at 01:24:03AM +0200, Octavian Purdila wrote: > Thanks for the pointers Richard, I am going to take a look at it. Now I've had a chance to look at some of the example LKL tools, here's what this actually involves. It's not actually a great deal of work, it could probably be

Re: __blkg_lookup oops with 4.2-rcX

2015-08-30 Thread Richard W.M. Jones
On Sun, Aug 30, 2015 at 08:30:41AM -0400, Josh Boyer wrote: Hi Tejun, Mike and Jeff suggested you be informed of the oops one of our community members is hitting in Fedora with 4.2-rcX. I thought they had already sent this upstream to you, but apparently they didn't. The latest oops is

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-01 Thread Richard W.M. Jones
On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > [0.036000] BUG: unable to handle kernel paging request at 55501e06 [...] > [0.036000] [] ? add_nops+0x90/0xa0 > [0.036000] []

Re: __blkg_lookup oops with 4.2-rcX

2015-09-04 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 11:32:55AM -0400, Tejun Heo wrote: > Hello, > > On Wed, Sep 02, 2015 at 10:53:07AM -0400, Tejun Heo wrote: > > On Sun, Aug 30, 2015 at 08:30:41AM -0400, Josh Boyer wrote: > > I think the offending commit is 776687bce42b ("block, blk-mq: draining > > can't be skipped even

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Richard W.M. Jones
that optimize_nops() is missing a sync_core(). > > Updated patch below. The V2 patch has got to 900 iterations without hitting the problem. As that is a lot more than without the patch, you can add: Tested-by: Richard W.M. Jones <rjo...@redhat.com> I will leave it going overnight just in c

Re: __blkg_lookup oops with 4.2-rcX

2015-09-04 Thread Richard W.M. Jones
On Fri, Sep 04, 2015 at 01:13:02PM -0400, Tejun Heo wrote: > The only struct which is large enough for 0xbb8 offset is > request_queue. Hmm can you please try the brute force debug patch > below and report the kernel log after the crash? So the good(?) news is this bug is not reproducible

Re: __blkg_lookup oops with 4.2-rcX

2015-09-05 Thread Richard W.M. Jones
On Fri, Sep 04, 2015 at 09:42:44PM +0100, Richard W.M. Jones wrote: > On Fri, Sep 04, 2015 at 01:13:02PM -0400, Tejun Heo wrote: > > The only struct which is large enough for 0xbb8 offset is > > request_queue. Hmm can you please try the brute force debug patch > > below

Re: __blkg_lookup oops with 4.2-rcX

2015-09-05 Thread Richard W.M. Jones
On Sat, Sep 05, 2015 at 04:34:39PM +0100, Richard W.M. Jones wrote: > [ 52.259269] BUG: unable to handle kernel NULL pointer dereference at > 09c8 > [ 52.259269] IP: [] __blkg_lookup+0x40/0xe0 And also: $ addr2line -e /usr/lib/debug/lib/modules/4.3.0-0.rc0.git7.1.r

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-02 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > > > This is from https://bugzilla.redhat.com/show_bug.cgi?id=1258223 > > > >

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-03 Thread Richard W.M. Jones
On Wed, Sep 02, 2015 at 08:05:12PM +0100, Richard W.M. Jones wrote: > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > On Tue, 1 Sep 2015, Richard W.M. Jones wrote: > > > On Sun, Aug 30, 2015 at 10:37:57PM -0400, Chuck Ebbert wrote: > >

Re: [PATCH block/for-linus] block: blkg_destroy_all() should clear q->root_blkg and ->root_rl.blkg

2015-09-06 Thread Richard W.M. Jones
lkg release is RCU protected and the rest of exit > path usually finishes before RCU grace period. > > This patch fixes the bug by updating blkg_destro_all() to clear > q->root_blkg and ->root_rl.blkg. > > Signed-off-by: Tejun Heo <t...@kernel.org> > Reported-by: &qu

Re: __blkg_lookup oops with 4.2-rcX

2015-09-04 Thread Richard W.M. Jones
On Fri, Sep 04, 2015 at 01:13:02PM -0400, Tejun Heo wrote: > > [6.784689] BUG: unable to handle kernel NULL pointer dereference at > > 0bb8 > > [6.787605] IP: [] blk_throtl_drain+0x80/0x220 > > The only struct which is large enough for 0xbb8 offset is > request_queue.

Re: [BUG 4.2-rc8] Interrupt occurs while apply_alternatives() is patching the handler

2015-09-04 Thread Richard W.M. Jones
On Thu, Sep 03, 2015 at 12:41:47PM +0200, Thomas Gleixner wrote: > On Thu, 3 Sep 2015, Borislav Petkov wrote: > > On Wed, Sep 02, 2015 at 11:11:55AM +0200, Thomas Gleixner wrote: > > > static void __init_or_module add_nops(void *insns, unsigned int len) > > > { > > > + unsigned long flags; > > >

Re: [PATCH v3 0/7] User namespace mount updates

2015-11-19 Thread Richard W.M. Jones
On Thu, Nov 19, 2015 at 03:49:00PM +0100, Richard Weinberger wrote: > Am 19.11.2015 um 15:37 schrieb Colin Walters: > > On Thu, Nov 19, 2015, at 02:53 AM, Richard Weinberger wrote: > > > >> Erm, I don't want this in the kernel. That's why I've proposed the lklfuse > >> approach. > > > > I

Re: [PATCH] x86/tsc: Prevent NULL pointer deref in calibrate_delay_is_known()

2016-03-19 Thread Richard W.M. Jones
t() call dereferences a NULL pointer. > > Add a proper check to prevent this. > > Reported-by: Richard W.M. Jones <rjo...@redhat.com> > Fixes: c25323c07345 "x86/tsc: Use topology functions" > Signed-off-by: Thomas Gleixner <t...@linutronix.de> > Cc: Josh Boyer &l

[PATCH 0/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
It's not possible to read the process umask without also modifying it, which is what umask(2) does. A library cannot read umask safely, especially if the main program might be multithreaded. This patch series adds a trivial system call "getumask" which returns the umask of the current process.

[PATCH 2/2] x86: Wire up new getumask system call on x86.

2016-04-13 Thread Richard W.M. Jones
Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index b

[PATCH 1/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
Define a system call for reading the current umask value. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- include/linux/syscalls.h | 1 + kernel/sys.c | 5 + 2 files changed, 6 insertions(+) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index d

[PATCH v2 1/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
Define a system call for reading the current umask value. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- include/linux/syscalls.h | 1 + kernel/sys.c | 5 + 2 files changed, 6 insertions(+) diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index d

[PATCH v2 2/2] x86: Wire up new getumask system call on x86.

2016-04-13 Thread Richard W.M. Jones
Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index b

[PATCH v2 0/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
v1 -> v2: - Use current_umask() instead of current->fs->umask. - Retested it. -- It's not possible to read the process umask without also modifying it, which is what umask(2) does. A library cannot read umask safely,

Re: Oops from calibrate_delay_is_known on qemu machine with Linux v4.5-1523-g271ecc5253e2

2016-03-19 Thread Richard W.M. Jones
On Thu, Mar 17, 2016 at 01:54:36PM -0400, Josh Boyer wrote: > Hi Thomas, > > We've had a report [1] of the mainline kernel crashing on a single-cpu > QEMU machine (not kvm) in Fedora. It looks as if the emulated machine > is failing to provide a TSC and the calibrate_delay_is_known function > is

[PATCH v3 0/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
v2 -> v3: - Add the syscall to uapi/asm-generic/unistd.h. - Retest. -- It's not possible to read the process umask without also modifying it, which is what umask(2) does. A library cannot read umask safely, especially if

[PATCH v3 1/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
Define a system call for reading the current umask value. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- include/linux/syscalls.h | 1 + include/uapi/asm-generic/unistd.h | 4 +++- kernel/sys.c | 5 + 3 files changed, 9 insertions(+), 1 de

Re: [PATCH v2 1/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
On Wed, Apr 13, 2016 at 04:20:32PM +0300, Cyrill Gorcunov wrote: > On Wed, Apr 13, 2016 at 01:57:51PM +0100, Richard W.M. Jones wrote: > > Define a system call for reading the current umask value. > > > > Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> >

[PATCH v3 2/2] x86: Wire up new getumask system call on x86.

2016-04-13 Thread Richard W.M. Jones
Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index b

Re: [PATCH v2 0/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
On Wed, Apr 13, 2016 at 11:41:45AM -0400, Colin Walters wrote: > On Wed, Apr 13, 2016, at 08:57 AM, Richard W.M. Jones wrote: > > > It's not possible to read the process umask without also modifying it, > > which is what umask(2) does. A library cannot read umask safe

[PATCH v2] procfs: expose umask in /proc//status

2016-04-14 Thread Richard W.M. Jones
v1 -> v2: - Change printf format to %#04o. - Retest and update examples accordingly. -- It's not possible to read the process umask without also modifying it, which is what umask(2) does. A library cannot read umask safely, especially if the main program might be multithreaded. Add

[PATCH v2] procfs: expose umask in /proc//status

2016-04-14 Thread Richard W.M. Jones
ask (umask) in octal. It is only shown for tasks which have task->fs. This patch is adapted from one originally written by Pierre Carrier. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- Documentation/filesystems/proc.txt | 1 + fs/proc/array.c| 20 ++

Re: [PATCH v3 0/2] vfs: Define new syscall getumask.

2016-04-13 Thread Richard W.M. Jones
On Wed, Apr 13, 2016 at 11:52:53AM -0700, Davidlohr Bueso wrote: > ENOMANPAGE Where do man pages go? In the man-pages project? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com

[PATCH v4 3/3] vfs: selftests: Add test for umask2 system call.

2016-04-13 Thread Richard W.M. Jones
Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/fs/.gitignore | 1 + tools/testing/selftests/fs/Makefile | 9 tools/testing/selftests/fs/umask2-tests.c | 77

[PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Richard W.M. Jones
v3 -> v4: - Rename the syscall: getumask becomes umask2. - Add flags parameter, with one flag (UMASK_GET_MASK). - Expand the rationale for this change in the first commit message. - Add a selftest. - Retest everything. It's not possible to read the process umask

[PATCH v4 1/3] vfs: Define new syscall umask2.

2016-04-13 Thread Richard W.M. Jones
=UMASK_GET_MASK it reads the umask of the current process without modifying it. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- include/linux/syscalls.h | 1 + include/uapi/asm-generic/fcntl.h | 2 ++ include/uapi/asm-generic/unistd.h | 4 +++- kernel/sys.c

[PATCH v4 2/3] x86: Wire up new umask2 system call on x86.

2016-04-13 Thread Richard W.M. Jones
Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- arch/x86/entry/syscalls/syscall_32.tbl | 1 + arch/x86/entry/syscalls/syscall_64.tbl | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index b

Re: [PATCH] 8250: Hypervisors always export working 16550A UARTs.

2016-04-29 Thread Richard W.M. Jones
On Thu, Apr 28, 2016 at 03:56:33PM -0700, Greg KH wrote: > On Thu, Apr 28, 2016 at 11:18:33PM +0100, Richard W.M. Jones wrote: > > Currently autoconf spends 25ms (on my laptop) testing if the UART > > exported to it by KVM is an 8250 without FIFO and/or with strange > > quirk

Re: [PATCH] 8250: Hypervisors always export working 16550A UARTs.

2016-04-29 Thread Richard W.M. Jones
On Fri, Apr 29, 2016 at 10:01:08AM +0300, Matwey V. Kornilov wrote: > 2016-04-29 1:18 GMT+03:00 Richard W.M. Jones <rjo...@redhat.com>: > > [This is an opinionated patch, mainly for discussion.] > > > > I'm trying to reduce the time taken in the kernel in initcalls, with

[PATCH v2] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-04-29 Thread Richard W.M. Jones
Running self-tests for a short-lived KVM VM takes 28ms on my laptop. This commit adds a flag 'cryptomgr.notests' which allows them to be disabled. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- Documentation/kernel-parameters.txt | 3 +++ crypto/testmgr.c

[PATCH v2] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-04-29 Thread Richard W.M. Jones
v1 -> v2: - Use printk_once. Because the serial console is so slow, printing the message multiple times consumed about 6ms extra later on in the boot. Printing it only once is both neater and avoids this extra overhead. Rich. - - - I'm trying to reduce the time taken in the kernel in

Re: [PATCH] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-04-29 Thread Richard W.M. Jones
On Fri, Apr 29, 2016 at 12:59:57PM +0200, Stephan Mueller wrote: > Am Freitag, 29. April 2016, 11:07:43 schrieb Richard W.M. Jones: > > Hi Richard, [...] > > + if (notests) { > > What about if (!fips_enabled && notests) ? > > I am not sure whether the ker

[PATCH] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-04-29 Thread Richard W.M. Jones
I'm trying to reduce the time taken in the kernel in initcalls, with my aim being to reduce the current ~700ms spent in initcalls before userspace, down to something like 100ms. All times on my Broadwell-U laptop, under virtualization. The purpose of this is to be able to launch VMs around

[PATCH] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-04-29 Thread Richard W.M. Jones
Running self-tests for a short-lived KVM VM takes 28ms on my laptop. This commit adds a flag 'cryptomgr.notests' which allows them to be disabled. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- Documentation/kernel-parameters.txt | 3 +++ crypto/testmgr.c

Re: [PATCH] 8250: Hypervisors always export working 16550A UARTs.

2016-04-29 Thread Richard W.M. Jones
On Fri, Apr 29, 2016 at 08:54:13AM -0700, Greg KH wrote: > You are trying to take a generalized kernel and somehow "know" about the > hardware ahead of time it is going to run on. That seems like two > conflicting requirements, don't you agree? We would have the 8250 serial port in any kernel.

Re: [PATCH] 8250: Hypervisors always export working 16550A UARTs.

2016-04-29 Thread Richard W.M. Jones
On Fri, Apr 29, 2016 at 08:16:35AM -0700, Greg KH wrote: > On Fri, Apr 29, 2016 at 09:10:06AM +0100, Richard W.M. Jones wrote: > > On Thu, Apr 28, 2016 at 03:56:33PM -0700, Greg KH wrote: > > > On Thu, Apr 28, 2016 at 11:18:33PM +0100, Richard W.M. Jones wrote: > > >

[PATCH] 8250: Hypervisors always export working 16550A UARTs.

2016-04-28 Thread Richard W.M. Jones
Currently autoconf spends 25ms (on my laptop) testing if the UART exported to it by KVM is an 8250 without FIFO and/or with strange quirks, which it obviously isn't. Assume it is exported to us by a hypervisor, it's a normal, working 16550A. Signed-off-by: Richard W.M. Jones <rjo...@redhat.

[PATCH] 8250: Hypervisors always export working 16550A UARTs.

2016-04-28 Thread Richard W.M. Jones
[This is an opinionated patch, mainly for discussion.] I'm trying to reduce the time taken in the kernel in initcalls, with my aim being to reduce the current ~700ms spent in initcalls before userspace, down to something like 100ms. All times on my Broadwell-U laptop, under virtualization. The

[PATCH v3] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-05-03 Thread Richard W.M. Jones
v2 -> v3: - Ignore the flag if FIPS mode is enabled. v1 -> v2: - Use printk_once. Because the serial console is so slow, printing the message multiple times actually consumed about 6ms extra later on during the boot. - - - I'm trying to reduce the time taken in the kernel in

[PATCH v3] crypto: Add a flag allowing the self-tests to be disabled at runtime.

2016-05-03 Thread Richard W.M. Jones
Running self-tests for a short-lived KVM VM takes 28ms on my laptop. This commit adds a flag 'cryptomgr.notests' which allows them to be disabled. However if fips=1 as well, we ignore this flag as FIPS mode mandates that the self-tests are run. Signed-off-by: Richard W.M. Jones <

Re: [PATCH v2] procfs: expose umask in /proc//status

2016-04-15 Thread Richard W.M. Jones
On Fri, Apr 15, 2016 at 03:13:10PM +0200, Michal Hocko wrote: > On Thu 14-04-16 12:08:15, Richard W.M. Jones wrote: > > It's not possible to read the process umask without also modifying it, > > which is what umask(2) does. A library cannot read umask safely, > > especiall

Re: [PATCH] procfs: expose umask in /proc//status (formerly umask2, formerly getumask)

2016-04-14 Thread Richard W.M. Jones
On Thu, Apr 14, 2016 at 10:34:48AM +0100, Richard W.M. Jones wrote: > It's not possible to read the process umask without also modifying it, > which is what umask(2) does. A library cannot read umask safely, > especially if the main program might be multithreaded. > > Add a

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-14 Thread Richard W.M. Jones
On Thu, Apr 14, 2016 at 09:09:38AM +1000, Stephen Rothwell wrote: > Hi Richard, > > On Wed, 13 Apr 2016 20:05:33 +0100 "Richard W.M. Jones" <rjo...@redhat.com> > wrote: > > > > It's not possible to read the process umask without also modifying it, >

[PATCH] procfs: expose umask in /proc//status

2016-04-14 Thread Richard W.M. Jones
ask (umask) in octal. It is only shown for tasks which have task->fs. This patch is adapted from one originally written by Pierre Carrier. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- Documentation/filesystems/proc.txt | 1 + fs/proc/array.c| 20 ++

[PATCH] procfs: expose umask in /proc//status (formerly umask2, formerly getumask)

2016-04-14 Thread Richard W.M. Jones
It's not possible to read the process umask without also modifying it, which is what umask(2) does. A library cannot read umask safely, especially if the main program might be multithreaded. Add a new status line ("Umask") in /proc//status. It contains the file mode creation mask (umask) in

umask2 man page (was: Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask])

2016-04-13 Thread Richard W.M. Jones
UMASK(2) Linux Programmer's Manual UMASK(2) NAME umask, umask2 - get and set file mode creation mask SYNOPSIS #include #include mode_t umask(mode_t mask); #define _GNU_SOURCE #include #include

Re: [PATCH v4 0/3] vfs: Define new syscall umask2 [formerly getumask]

2016-04-13 Thread Richard W.M. Jones
On Wed, Apr 13, 2016 at 10:45:05PM +0200, Florian Weimer wrote: > * H. Peter Anvin: > > > I have to say I'm skeptic to the need for umask2() as opposed to > > getumask(). > > I find the extension with a set-the-thread umask somewhat unlikely. > How would a potential per-thread umask interact

Re: [PATCH v2 0/2] vfs: Define new syscall getumask.

2016-04-18 Thread Richard W.M. Jones
On Sun, Apr 17, 2016 at 06:57:36PM -0700, Josh Triplett wrote: > O_NOUMASK seems potentially useful to support implementation of umask > entirely in userspace, which also addresses thread-safety. A program > could read its process umask out at startup, handle umask entirely in > userspace

Re: Warning from free_init_pages with large initrd

2016-09-27 Thread Richard W.M. Jones
On Tue, Sep 27, 2016 at 11:20:06AM +0100, Sitsofe Wheeler wrote: > (See http://www.gossamer-threads.com/lists/linux/kernel/2534175 for > the history of this thread ) > > On 26 September 2016 at 20:00, Randy Dunlap wrote: > > > > but the warning in free_init_pages() is

Re: [PATCH RESEND] hwrng: core - don't pass stack allocated buffer to rng->read()

2016-10-21 Thread Richard W.M. Jones
On Fri, Oct 21, 2016 at 02:04:27PM -0700, Andy Lutomirski wrote: > https://git.kernel.org/cgit/linux/kernel/git/herbert/cryptodev-2.6.git/commit/?id=6d4952d9d9d4dc2bb9c0255d95a09405a1e958f7 I have tested this one, and it also fixes the bug I was seeing. Thanks Laszlo as well for his fix, and

Re: [REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest

2017-03-23 Thread Richard W.M. Jones
six_names > > Signed-off-by: Jason Wang <jasow...@redhat.com> I tested this, and it does appear to fix the crashes in vp_modern_find_vqs. Therefore: Tested-by: Richard W.M. Jones <rjo...@redhat.com> Thanks, Rich. > drivers/virtio/virtio_pci_common.c | 9 + >

Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

2017-03-23 Thread Richard W.M. Jones
inux 4.11-rc/mainline in a Fedora 26 guest under a CentOS7 host > (CPU: Intel(R) Pentium(R) CPU G3220) using KVM. Sometimes when the guest > actually booted the network did not work. To get some impressions of the > crashes I got see this gallery: > https://plus.google.com/+ThorstenLeemhuis/p

Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

2017-03-23 Thread Richard W.M. Jones
On Thu, Mar 23, 2017 at 03:56:22PM +0100, Christoph Hellwig wrote: > Does the patch from Jason in the > > "[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for > virtqueues") causes crashes in guest" > > thread fix the issue for you? I didn't see this thread before. I'll check

Re: Random guest crashes since 5c34d002dcc7 ("virtio_pci: use shared interrupts for virtqueues")

2017-03-23 Thread Richard W.M. Jones
On Thu, Mar 23, 2017 at 03:56:22PM +0100, Christoph Hellwig wrote: > Does the patch from Jason in the > > "[REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for > virtqueues") causes crashes in guest" > > thread fix the issue for you? In brief, yes it does. I followed up on that

Re: Increased memory usage with scsi-mq

2017-08-10 Thread Richard W.M. Jones
OK this is looking a bit better now. With scsi-mq enabled: 175 disks virtqueue_size=64: 318 disks * virtqueue_size=16: 775 disks * With scsi-mq disabled: 1755 disks * = new results I also ran the whole libguestfs test suite with

Re: Increased memory usage with scsi-mq

2017-08-10 Thread Richard W.M. Jones
On Thu, Aug 10, 2017 at 02:53:58PM +0200, Paolo Bonzini wrote: > can_queue and cmd_per_lun are different. can_queue should be set to the > value of vq->vring.num where vq is the command virtqueue (the first one > is okay if there's >1). > > If you want to change it, you'll have to do so in QEMU.

[PATCH 0/2] virtio_scsi: Set can_queue based on size of virtqueue.

2017-08-10 Thread Richard W.M. Jones
Earlier discussion: https://lkml.org/lkml/2017/8/4/601 "Increased memory usage with scsi-mq" Downstream bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1478201

[PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
If using indirect descriptors, you can make the total_sg as large as you want. If not, BUG is too serious because the function later returns -ENOSPC. Thanks Paolo Bonzini, Christoph Hellwig. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> --- drivers/virtio/virtio_ring.c | 5 ++

[PATCH v2 0/2] virtio_scsi: Set can_queue based on size of virtqueue.

2017-08-10 Thread Richard W.M. Jones
v1 was here: https://lkml.org/lkml/2017/8/10/689 v1 -> v2: Remove .can_queue field from the templates. Rich.

[PATCH v2 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Richard W.M. Jones
ch command in the queue takes 1 virtqueue entry, so the number of commands which can be queued is equal to the length of the virtqueue. Note I intend to send a patch to qemu to allow the virtqueue size to be configured from the qemu command line. Thanks Paolo Bonzini, Christoph Hellwig. Signed-off-by: R

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:21:16AM +0300, Michael S. Tsirkin wrote: > On Thu, Aug 10, 2017 at 05:40:34PM +0100, Richard W.M. Jones wrote: > > If using indirect descriptors, you can make the total_sg as large as > > you want. > > That would be a spec violation though, even if

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > Then we probably should fail probe if vq size is too small. What does this mean? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog:

Re: [PATCH 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
On Fri, Aug 11, 2017 at 12:41:47AM +0300, Michael S. Tsirkin wrote: > On Thu, Aug 10, 2017 at 10:35:11PM +0100, Richard W.M. Jones wrote: > > On Fri, Aug 11, 2017 at 12:31:44AM +0300, Michael S. Tsirkin wrote: > > > Then we probably should fail probe if vq size is too small.

[PATCH 2/2] virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

2017-08-10 Thread Richard W.M. Jones
ch command in the queue takes 1 virtqueue entry, so the number of commands which can be queued is equal to the length of the virtqueue. Note I intend to send a patch to qemu to allow the virtqueue size to be configured from the qemu command line. Thanks Paolo Bonzini, Christoph Hellwig. Signed-off-by: R

[PATCH v2 1/2] virtio: Reduce BUG if total_sg > virtqueue size to WARN.

2017-08-10 Thread Richard W.M. Jones
If using indirect descriptors, you can make the total_sg as large as you want. If not, BUG is too serious because the function later returns -ENOSPC. Thanks Paolo Bonzini, Christoph Hellwig. Signed-off-by: Richard W.M. Jones <rjo...@redhat.com> Reviewed-by: Paolo Bonzini <pbonz...@r

Re: Increased memory usage with scsi-mq

2017-08-10 Thread Richard W.M. Jones
23e49846189b2f55f3f02b70a290d4be237ed5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" <rjo...@redhat.com> Date: Thu, 10 Aug 2017 12:21:47 +0100 Subject: [PATCH] scsi: virtio_scsi: Set can_queue based on cmd_per_lun passed by hypervisor. Signed-off-by: Richard W.M. Jones

Increased memory usage with scsi-mq

2017-08-04 Thread Richard W.M. Jones
https://bugzilla.redhat.com/show_bug.cgi?id=1478201 We have a libguestfs test which adds 256 virtio-scsi disks to a qemu virtual machine. The VM has 500 MB of RAM, 1 vCPU and no swap. This test has been failing for a little while. It runs out of memory during SCSI enumeration in early boot.

  1   2   3   >