Re: FAILED: patch "[PATCH] module: weaken locking assertion for oops path." failed to apply to 4.1-stable tree

2015-08-14 Thread Rusty Russell
. But a question: this was implied by the Fixes: tag; is there a better way to say "you need this IFF you have that"? Thanks, Rusty. > -- original commit in Linus's tree -- > >>From fe0d34d242fa1e0dec059e774d146a705420bc9a Mon Sep 17 00:00:00

Re: [PATCH] x86/cpu: Fix SMAP check in PVOPS environments

2015-06-04 Thread Rusty Russell
"H. Peter Anvin" writes: > On 06/04/2015 12:55 PM, Rusty Russell wrote: >> >> Yeah, hard cases make bad law. >> >> I'm not too unhappy with this fix; ideally we'd rename save_fl and >> restore_fl to save_eflags_if and restore_eflags_if

Re: [PATCH] x86/cpu: Fix SMAP check in PVOPS environments

2015-06-04 Thread Rusty Russell
Andrew Cooper writes: > On 04/06/15 07:38, H. Peter Anvin wrote: >> On 06/03/2015 02:31 AM, Andrew Cooper wrote: >>> There appears to be no formal statement of what pv_irq_ops.save_fl() is >>> supposed to return precisely. Native returns the full flags, while lguest >>> and >>> Xen only return t

Re: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-03-09 Thread Rusty Russell
Thomas Huth writes: > On Wed, 25 Feb 2015 16:11:27 +0100 > Cornelia Huck wrote: > >> On Wed, 25 Feb 2015 15:36:02 +0100 >> "Michael S. Tsirkin" wrote: >> >> > virtio balloon has this code: >> > wait_event_interruptible(vb->config_change, >> > (diff = tow

Re: [PATCH 3.2 082/152] virtio: use dev_to_virtio wrapper in virtio

2015-02-17 Thread Rusty Russell
Ben Hutchings writes: > On Tue, 2015-02-17 at 15:56 +1030, Rusty Russell wrote: >> Ben Hutchings writes: >> > 3.2.67-rc1 review patch. If anyone has any objections, please let me know. >> >> Ben, what are your criteria for putting patches into 3.2? >> >

Re: [PATCH 3.2 082/152] virtio: use dev_to_virtio wrapper in virtio

2015-02-17 Thread Rusty Russell
Ben Hutchings writes: > 3.2.67-rc1 review patch. If anyone has any objections, please let me know. Ben, what are your criteria for putting patches into 3.2? This patch is a trivial cleanup. It doesn't fix anything, but it does add some churn. I can see that 083 and 084 follow this, but 083 ne

[PULL] params fix

2014-11-11 Thread Rusty Russell
The following changes since commit 206c5f60a3d902bc4b56dab2de3e88de5eb06108: Linux 3.18-rc4 (2014-11-09 14:55:29 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git for you to fetch changes up to 3438cf549d2f3ee8e52c82acc8e2a9710ac21

Re: [PATCH v3.18-rc3] param: fix crash on bad kernel arguments

2014-11-11 Thread Rusty Russell
Daniel Thompson writes: > Currently if the user passes an invalid value on the kernel command line > then the kernel will crash during argument parsing. On most systems this > is very hard to debug because the console hasn't been initialized yet. Good catch, applied! Thanks, Rusty. > > This is

Re: [PATCH] x86_64, entry: Fix out of bounds read on sysenter

2014-10-31 Thread Rusty Russell
ed through this code when I wrote it to > check the offset, but I clearly screwed it up. > > Fixes 8c7aa698baca x86_64, entry: Filter RFLAGS.NT on entry from userspace > > Reported-by: Rusty Russell > Cc: stable@vger.kernel.org > Signed-off-by: Andy Lutomirski Tested-by:

Re: [PATCH v3 2/2] virtio-rng: skip reading when we start to remove the device

2014-09-12 Thread Rusty Russell
Amit Shah writes: > On (Wed) 10 Sep 2014 [14:11:37], Amos Kong wrote: >> Before we really unregister the hwrng device, reading will get stuck if >> the virtio device is reset. We should return error for reading when we >> start to remove the device. >> >> Signed-off-by: Amos Kong >> Cc: stable@v

Re: [PATCH v3 1/2] virtio-rng: fix stuck of hot-unplugging busy device

2014-09-11 Thread Rusty Russell
Amit Shah writes: > On (Wed) 10 Sep 2014 [14:11:36], Amos Kong wrote: >> When we try to hot-remove a busy virtio-rng device from QEMU monitor, >> the device can't be hot-removed. Because virtio-rng driver hangs at >> wait_for_completion_killable(). >> >> This patch exits the waiting by completing

Re: [PATCH] module: Clean up ro/nx after early module load failures

2014-08-15 Thread Rusty Russell
Andy Lutomirski writes: > The commit > > 4982223e51e8 module: set nx before marking module MODULE_STATE_COMING. > > introduced a regression: if a module fails to parse its arguments or > if mod_sysfs_setup fails, then the module's memory will be freed > while still read-only. Anything that re

Re: [PATCH V2] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2014-01-14 Thread Rusty Russell
Jason Wang writes: > From: Asias He > > vqs are freed in virtscsi_freeze but the hotcpu_notifier is not > unregistered. We will have a use-after-free usage when the notifier > callback is called after virtscsi_freeze. > > Fixes: 285e71ea6f3583a85e27cb2b9a7d8c35d4c0d558 > ("virtio-scsi: reset virt

Re: [PATCH 3.11-stable] virtio_ring: plug kmemleak false positive.

2013-11-19 Thread Rusty Russell
e. In fact, since every patch I submit should be an improvement to the kernel, I'll have to CC stable on every patch! Rusty. > -- > > From: "Rusty Russell " > > commit bb478d8b167cf875565ac7d927ffbdc0b6d280e8 upstream > > unreferenced object 0xfff

Re: [PATCH 3.11-stable] virtio_scsi: verify if queue is broken after virtqueue_get_buf()

2013-11-19 Thread Rusty Russell
- > > From: "Heinz Graalfs " > > commit 2bf4fd31394a3f875ea093ee8a209f30b378cbf3 upstream > > If virtqueue_get_buf() returned with a NULL pointer avoid a possibly > endless loop by checking for a broken virtqueue. > > Signed-off-by: Heinz Graalfs >

Re: [PATCH 3.11-stable] virtio: mmio: fix signature checking for BE guests

2013-11-19 Thread Rusty Russell
ding the magic value as an integer instead of a string. > > Cc: Michael S. Tsirkin > Signed-off-by: Marc Zyngier > Acked-by: Pawel Moll > Signed-off-by: Rusty Russell > Signed-off-by: Jonghwan Choi > --- > drivers/virtio/virtio_mmio.c |2 +- > 1 file changed, 1 in

Re: [PATCH 3.10-stable] virtio-pci: fix leaks of msix_affinity_masks

2013-08-09 Thread Rusty Russell
Jonghwan Choi writes: > This patch looks like it should be in the 3.10-stable tree, should we apply > it? No. It's a 512 byte memory leak which may occur when a virtio device is plugged in. Does that really seem like it's a real problem? AFAICT the bug has been in place for several years with

Re: [PATCH] virtio-scsi: Fix virtqueue affinity setup

2013-07-31 Thread Rusty Russell
Asias He writes: > vscsi->num_queues counts the number of request virtqueue which does not > include the control and event virtqueue. It is wrong to subtract > VIRTIO_SCSI_VQ_BASE from vscsi->num_queues. > > This patch fixes the following panic. Applied. Thanks, Rusty. > > (qemu) device_del scs

Re: [PATCH v3 2/9] virtio: console: fix race in port_fops_open() and port unplug

2013-07-29 Thread Rusty Russell
Amit Shah writes: > Between open() being called and processed, the port can be unplugged. > Check if this happened, and bail out. > > A simple test script to reproduce this is: > > while true; do for i in $(seq 1 100); do echo $i > /dev/vport0p3; done; done; > > This opens and closes the port a lo

Re: [PATCH v3 5/9] virtio: console: return -ENODEV on all read operations after unplug

2013-07-29 Thread Rusty Russell
Amit Shah writes: > If a port gets unplugged while a user is blocked on read(), -ENODEV is > returned. However, subsequent read()s returned 0, indicating there's no > host-side connection (but not indicating the device went away). > > This also happened when a port was unplugged and the user didn

Re: [PATCH v3 3/9] virtio: console: clean up port data immediately at time of unplug

2013-07-29 Thread Rusty Russell
Amit Shah writes: > We used to keep the port's char device structs and the /sys entries > around till the last reference to the port was dropped. This is > actually unnecessary, and resulted in buggy behaviour: > > 1. Open port in guest > 2. Hot-unplug port > 3. Hot-plug a port with the same 'nam

Re: [PATCH v3 4/9] virtio: console: fix raising SIGIO after port unplug

2013-07-29 Thread Rusty Russell
Amit Shah writes: > SIGIO should be sent when a port gets unplugged. It should only be sent > to prcesses that have the port opened, and have asked for SIGIO to be > delivered. We were clearing out guest_connected before calling > send_sigio_to_port(), resulting in a sigio not getting sent to >

Re: [PATCH v3 1/9] virtio: console: fix race with port unplug and open/close

2013-07-29 Thread Rusty Russell
Amit Shah writes: > There's a window between find_port_by_devt() returning a port and us > taking a kref on the port, where the port could get unplugged. Fix it > by taking the reference in find_port_by_devt() itself. > > Problem reported and analyzed by Mateusz Guzik. This fix is clearly correc

Re: [PATCH V3 0/2] [BUGFIX] virtio/console: Fix two bugs of splice_write

2013-07-22 Thread Rusty Russell
Amit Shah writes: > On (Mon) 22 Jul 2013 [13:00:43], Yoshihiro YUNOMAE wrote: >> Hi, >> >> This patch set fixes two bugs of splice_write in the virtio-console driver. >> >> [BUG1] Although pipe->nrbufs is empty, the driver tries to do splice_write. >>=> This induces oops in sg_init_table

Re: [PATCH 05/10] virtio: console: update private_data in struct file only on successful open

2013-07-22 Thread Rusty Russell
Amit Shah writes: > Mateusz Guzik points out that we update the 'file' struct's private_data > field before we've successfully done all our checks. This means we can > return an error with the private_data field updated. This could lead to > problems. > > Fix by moving the assignment after all c

Re: [ 00/19] 3.10.1-stable review

2013-07-16 Thread Rusty Russell
Sarah Sharp writes: > On Tue, Jul 16, 2013 at 02:22:14PM +0930, Rusty Russell wrote: > Linus is complaining about code here, and the effects of merging bad > code on his own tree. I personally have no qualms with this type of > harsh email, because it focuses on the code, not the p

Re: [ 00/19] 3.10.1-stable review

2013-07-15 Thread Rusty Russell
Linus Torvalds writes: > On Mon, Jul 15, 2013 at 12:17 PM, Willy Tarreau wrote: >> >> BTW, I was amazed that you managed to get him have a much softer tone inr >> his last e-mail, you probably found a weakness here in his management >> process :-) > > Hey, I _like_ arguing, and "cursing" and "arg

Re: Please add to stable: module: don't unlink the module until we've removed all exposure.

2013-06-05 Thread Rusty Russell
gt; Really? I'm totally confused... > >> On Mon, 3 Jun 2013, Joe Lawrence wrote: >> >> > [fixing Cc: sta...@kernel.org address] >> > >> > On Sun, 2 Jun 2013, Joe Lawrence wrote: >> > >> > > On Sun, 2 Jun 2013, Rusty Russell wro

Re: Please add to stable: module: don't unlink the module until we've removed all exposure.

2013-06-04 Thread Rusty Russell
Ben Greear writes: > On 06/04/2013 09:53 AM, Ben Greear wrote: >> On 06/04/2013 07:07 AM, Joe Lawrence wrote: >>> On Tue, 04 Jun 2013 15:26:28 +0930 >>> Rusty Russell wrote: >>> >>>> Do you have a backtrace of the 3.9.4 crash? You can add "C

Re: Please add to stable: module: don't unlink the module until we've removed all exposure.

2013-06-04 Thread Rusty Russell
Joe Lawrence writes: > On Tue, 04 Jun 2013 15:26:28 +0930 > Rusty Russell wrote: > >> Do you have a backtrace of the 3.9.4 crash? You can add "CFLAGS_module.o >> = -O0" to get a clearer backtrace if you want... > > Hi Rusty, > > See my 3.9 stack tra

Re: Please add to stable: module: don't unlink the module until we've removed all exposure.

2013-06-03 Thread Rusty Russell
Ben Greear writes: > On 06/03/2013 08:59 AM, Ben Greear wrote: >> On 06/03/2013 07:17 AM, Joe Lawrence wrote: >> > Hi Rusty, > > I had pointed Ben (offlist) to that bugzilla entry without realizing > there were other earlier related fixes in this space. Re-viewing bz- > 58011,

Re: Please add to stable: module: don't unlink the module until we've removed all exposure.

2013-06-03 Thread Rusty Russell
Ben Greear writes: >> It at least works around the problem for me as well. But, a more rare >> migration/[0-3] (I think) related lockup still exists in 3.9.4 for me, >> so I will also try applying that other kobject patch and continue testing >> today... > > Well, that other kobject patch is alre

Re: [PATCH] hw_random: free rng_buffer at module exit

2013-03-17 Thread Rusty Russell
Ben Hutchings writes: > On Fri, 2013-03-15 at 15:35 +1030, Rusty Russell wrote: >> Satoru Takeuchi writes: >> > At Thu, 14 Mar 2013 17:11:21 +1030, >> > Rusty Russell wrote: >> >> >> >> Satoru Takeuchi writes: >> >> > Hi Rusty

Re: [PATCH] hw_random: free rng_buffer at module exit

2013-03-14 Thread Rusty Russell
Satoru Takeuchi writes: > At Thu, 14 Mar 2013 17:11:21 +1030, > Rusty Russell wrote: >> >> Satoru Takeuchi writes: >> > Hi Rusty, >> > >> > At Tue, 12 Mar 2013 15:43:33 -0700, >> > Greg Kroah-Hartman wrote: >>

Re: [ 12/40] hw_random: make buffer usable in scatterlist.

2013-03-13 Thread Rusty Russell
Satoru Takeuchi writes: > Hi Rusty, > > At Tue, 12 Mar 2013 15:43:33 -0700, > Greg Kroah-Hartman wrote: >> @@ -307,6 +312,14 @@ int hwrng_register(struct hwrng *rng) >> >> mutex_lock(&rng_mutex); >> >> +/* kmalloc makes this safe for virt_to_page() in virtio_rng.c */ >> +err = -EN

Re: [PATCH] virtio_console: Don't access uninitialized data.

2013-02-06 Thread Rusty Russell
Greg KH writes: > On Wed, Feb 06, 2013 at 10:38:36AM +1030, Rusty Russell wrote: >> Amit Shah writes: >> > On (Mon) 04 Feb 2013 [10:09:05], Rusty Russell wrote: >> >> Amit Shah writes: >> >> > On (Thu) 17 Jan 2013 [13:21:32], sjur.brandel...@sterics

Re: [PATCH] virtio_console: Don't access uninitialized data.

2013-02-05 Thread Rusty Russell
Amit Shah writes: > On (Mon) 04 Feb 2013 [10:09:05], Rusty Russell wrote: >> Amit Shah writes: >> > On (Thu) 17 Jan 2013 [13:21:32], sjur.brandel...@stericsson.com wrote: >> >> From: Sjur Brændeland >> >> >> >> Don't access uninitializ

Re: module: put modules in list much earlier.

2013-01-21 Thread Rusty Russell
Greg KH writes: > Rusty, should the commit below be applied to the 3.7-stable kernel tree? > > thanks, > > greg k-h Good point. looks like commit which caused this (e9bda3b) went in 3.6 so I think you'll want the following: 0d21b0e3477395e7ff2acc269f15df6e6a8d356d module: add new state MODULE_S

Re: [ 11/83] module: fix out-by-one error in kallsyms

2012-12-02 Thread Rusty Russell
c7057ca00a9a3f47 (module: fix out-by-one error in kallsyms) we now loop from zero, so we don't need to add an extra byte for the first empty string. Reported-by: satoru takeuchi Signed-off-by: Rusty Russell diff --git a/kernel/module.c b/kernel/module.c index a1d2ed8..79a526d 100644 --- a/

Re: [ 84/95] virtio_blk: fix config handler race

2012-09-09 Thread Rusty Russell
Ben Hutchings writes: > 3.2-stable review patch. If anyone has any objections, please let me know. > > -- > > From: "Michael S. Tsirkin" > > commit 4678d6f970c2f7c0cbfefc0cc666432d153b321b upstream. > > Fix a theoretical race related to config work ??? >From Documentation/stab

Re: Patch Upstream: module: Remove module size limit

2012-03-28 Thread Rusty Russell
On Wed, 28 Mar 2012 16:32:52 -0700, Greg KH wrote: > On Thu, Mar 29, 2012 at 01:22:23AM +0200, Sasha Levin wrote: > > On Thu, Mar 29, 2012 at 1:09 AM, Greg KH wrote: > > > On Thu, Mar 29, 2012 at 12:57:47AM +0200, Sasha Levin wrote: > > >> On Thu, Mar 29, 2012 at 12:41 AM, Greg KH > > >> wrote:

[PULL] module and param

2012-03-25 Thread Rusty Russell
ry at: git://github.com/rustyrussell/linux.git master Dave Young (1): module: add kernel param to force disable module load Pawel Moll (1): params: _initcall-like kernel parameters Rusty Russell (1): module_param: remove support for bool parameters which are really int. Sas

Re: [PATCH] module: Remove module size limit

2012-02-03 Thread Rusty Russell
On Mon, 30 Jan 2012 23:07:22 -0500, Sasha Levin wrote: > Module size was limited to 64MB, this was legacy limitation due to vmalloc() > which was removed a while ago. > > Limiting module size to 64MB is both pointless and affects real world use > cases. > > Cc: Rusty Russ

Re: FAILED: patch "[PATCH] virtio: correct the memory barrier in" failed to apply to 3.2-stable tree

2012-01-30 Thread Rusty Russell
On Mon, 30 Jan 2012 09:06:36 -0800, Greg KH wrote: > > Note: this fixes a bug introduced by > > ee7cd8981e15bcb365fc762afe3fc47b8242f630. > > As this patch didn't go in until 3.3-rc1, why did you all mark this for > the stable tree when 3.3 isn't even out yet? The lack of barriers clearly effec