[PULL] fixes

2013-08-04 Thread Rusty Russell
The following changes since commit 3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b: Linux 3.11-rc2 (2013-07-21 12:05:29 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git tags/fixes-for-linus for you to fetch changes up to aa52aeea2725839b

Re: [PATCH] kernel/params.c: use scnprintf() instead of sprintf()

2013-08-20 Thread Rusty Russell
Chen Gang writes: > For some strings (e.g. version string), they are permitted to be larger > than PAGE_SIZE (although meaningless), so recommend to use scnprintf() > instead of sprintf(). Applied. Thanks, Rusty. > > Signed-off-by: Chen Gang > --- > kernel/params.c |7 --- > 1 files

Re: [PATCH] kernel/module.c: use scnprintf() instead of sprintf()

2013-08-20 Thread Rusty Russell
Chen Gang writes: > For some strings, they are permitted to be larger than PAGE_SIZE, so > need use scnprintf() instead of sprintf(), or it will cause issue. > > One case is: > > if a module version is crazy defined (length more than PAGE_SIZE), > 'modinfo' command is still OK (print full con

Re: [RFC PATCH next]module: Fix mod->mkobj.kobj potentially freed too early

2013-08-22 Thread Rusty Russell
Greg KH writes: > On Wed, Aug 21, 2013 at 05:49:58PM +0800, Li Zhong wrote: > > struct kobj_type module_ktype = { > > + .release =module_kobj_release, > > .sysfs_ops =&module_sysfs_ops, > > }; > > Wait, as there is no release function here for the kobject (a different > problem),

Re: [PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.

2013-08-05 Thread Rusty Russell
Sudeep Dutt writes: > On Mon, 2013-07-29 at 10:05 +0300, Michael S. Tsirkin wrote: >> On Wed, Jul 24, 2013 at 08:31:34PM -0700, Sudeep Dutt wrote: >> > From: Ashutosh Dixit >> > >> > This patch introduces the host "Virtio over PCIe" interface for >> > Intel MIC. It allows creating user space ba

Re: [PATCH] cpumask: fix cpumask leak in partition_sched_domains

2013-08-05 Thread Rusty Russell
Xiaotian Feng writes: > On Sat, Jul 27, 2013 at 3:26 PM, Xiaotian Feng wrote: >> If doms_new is NULL, partition_sched_domains() will reset ndoms_cur >> to 0, and free old sched domains with free_sched_domains(doms_cur, >> ndoms_cur). >> As ndoms_cur is 0, the cpumask will not be freed. >> >> Sig

Re: [PATCH 1/1] module: fix sprintf format specifier in param_get_byte()

2013-08-07 Thread Rusty Russell
Christoph Jaeger writes: > In param_get_byte(), to which the macro STANDARD_PARAM_DEF(byte, ...) expands, > "%c" is used to print an unsigned char. So it gets printed as a character what > is not intended here. Use "%hhu" instead. > > Signed-off-by: Christoph Jaeger Nice patch. Unfortunately, t

[PLEASE PULL] virtio fixes (again!)

2013-08-07 Thread Rusty Russell
The following changes since commit 3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b: Linux 3.11-rc2 (2013-07-21 12:05:29 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git tags/fixes-for-linus for you to fetch changes up to aa52aeea2725839b

Re: scatterlist: sg_set_buf() argument must be in linear mapping (sha1: ac4e97abce9b80c020e7113325f49e58b7b15e3f)

2013-07-21 Thread Rusty Russell
Michal Simek writes: > Hi Rusty and Jens, > > I am getting problem with your patch which you have added to the kernel. > The problem is with my arm zynq remoteproc driver where > I use dma_declare_coherent_memory() to specify memory for remoteproc > which is ioremap to the vmalloc area. > > Based

Re: [QUERY] lguest64

2013-07-22 Thread Rusty Russell
"H. Peter Anvin" writes: > On 07/19/2013 02:06 AM, Ramkumar Ramachandra wrote: >> Hi, >> >> I tried building lguest to play with it, but was disappointed to find >> this in the Kconfig: >> >> depends on X86_32 >> >> Why is this [1]? What is so hard about supporting 64-bit machines? I >> fou

Re: scatterlist: sg_set_buf() argument must be in linear mapping (sha1: ac4e97abce9b80c020e7113325f49e58b7b15e3f)

2013-07-22 Thread Rusty Russell
Michal Simek writes: > + Ohad > > On 07/22/2013 03:47 AM, Rusty Russell wrote: >> Michal Simek writes: >>> Hi Rusty and Jens, >>> >>> I am getting problem with your patch which you have added to the kernel. >>> The problem is

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] Handle non ABS crc symbols

2013-08-13 Thread Rusty Russell
Michal Marek writes: > Added Rusty to CC. > > Dne 9.8.2013 21:45, Andi Kleen napsal(a): >> From: Andi Kleen >> >> For some reason I managed to trick gcc into create CRC symbols that >> are not absolute anymore, but weak. >> >> Make modpost handle this case. >> >> Andrew, this should fix the bi

Re: [PATCH 1/3] [PATCH 1/3] module: Add flag to allow mod params to have no arguments

2013-08-14 Thread Rusty Russell
Steven Rostedt writes: > Currently the params.c code allows only two "set" functions to have > no arguments. If a parameter does not have an argument, then it > looks at the set function and tests if it is either param_set_bool() > or param_set_bint(). If it is not one of these functions, then it

Re: [PATCH 02/16] virtio_ring: virtqueue_add_sgs, to add multiple sgs.

2013-03-03 Thread Rusty Russell
Paolo Bonzini writes: > Il 27/02/2013 12:21, Rusty Russell ha scritto: >>>> >> Baseline (before add_sgs): >>>> >> 2.84-3.04(2.927292)user >>>> >> >>>> >> After add_sgs: >>>> >>

[PULL] virtio randomness fix

2013-03-04 Thread Rusty Russell
s, so it shouldn't happen again. Thanks, Rusty. -------- Rusty Russell (1): hw_random: make buffer usable in scatterlist. drivers/char/hw_random/core.c | 19 --- 1 file changed, 16 insertions(+), 3 deletion

Re: [PATCH] virtio-spec: Define virtio-mmio registers as LE

2013-03-04 Thread Rusty Russell
Pawel Moll writes: > On Fri, 2013-03-01 at 11:21 +, Marc Zyngier wrote: >> > Having said that, Rusty was contemplating enforcing LE config space in >> > the new PCI layout... >> >> I wouldn't complain about that, and would like to see a similar thing on >> MMIO. > > Wherever PCI goes, MMIO fo

Re: cgroup_release_agent() hung task warnings

2013-03-05 Thread Rusty Russell
Tejun Heo writes: > (cc'ing Rusty Russell) > > On Mon, Mar 04, 2013 at 10:59:58AM +0800, Li Zefan wrote: >> On 2013/3/3 3:23, Tommi Rantala wrote: >> > Hello, >> > >> > I'm seeing the following hung task warnings when fuzzing the kernel >&

[PATCH 1/6] virtio_ring: virtqueue_add_sgs, to add multiple sgs.

2013-03-05 Thread Rusty Russell
1.70-1.95(1.723542) After: Using CPUS 0 and 3 Guest: notified 0, pinged 39019-39063(39061) Host: notified 39019-39063(39061), pinged 0 Wall time:2.09-2.52(2.188542) Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao Reviewed-by: Asias He dif

Re: [PATCH 08/16] virtio_ring: virtqueue_add_outbuf / virtqueue_add_inbuf.

2013-03-05 Thread Rusty Russell
"Michael S. Tsirkin" writes: >> Without the inline keywords, it doesn't inline virtqueue_add, and thus >> sg_next_chained and sg_next_add aren't inlined: >> >> $ for i in `seq 50`; do /usr/bin/time --format=%U ./vringh_test --indirect >> --eventidx --parallel; done 2>&1 | stats --trim-outliers >

[PULL] virtio/lguest fixes

2013-05-11 Thread Rusty Russell
g and some fallout from the lguest pagetable rework. Thanks, Rusty. Dave Jones (1): Add missing module license tag to vring helpers. Rusty Russell (1): lguest: clear cached last cpu when guest_set_pgd() called. driv

Re: [PATCH] kernel/module.c: for looping, need use 'goto' instead of 'break' to jump out in time

2013-05-12 Thread Rusty Russell
Chen Gang writes: > On 2013年05月08日 08:29, Rusty Russell wrote: >> Chen Gang writes: >>> > In the 'for' looping, when error occurs, the 'break' only jump out of >>> > 'switch', and still in 'for' looping. If erro

Re: [PATCH V2 2/3] Documentation: virtio: Add emergency write (emerg_wr) config register in virtio console.

2013-05-12 Thread Rusty Russell
Pranavkumar Sawargaonkar writes: > Signed-off-by: Pranavkumar Sawargaonkar > Signed-off-by: Anup Patel > --- > Documentation/virtual/virtio-spec.txt |8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) OK, I applied this to the lyx master, with three changes: 1) Changed "filed" to

Re: Build failures due to commit ea4054a2384 (handle huge number of modules)

2013-05-12 Thread Rusty Russell
Guenter Roeck writes: > Attached is a failing configuration for x86_64. Note that > drivers/staging/android/logger.c fails to build with this configuration, > so you have to build it with make -i to see the problem. > > Looking through my logs, it seems that the problem may be related to other > b

Re: [PATCH] module: Add section ".ref.data" into kmemleak-scan-area.

2013-05-12 Thread Rusty Russell
nel/module.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Catalin? Acked-by: Rusty Russell Cheers, Rusty. > diff --git a/kernel/module.c b/kernel/module.c > index b049939..dafe2ea 100644 > --- a/kernel/module.c > +++ b/kernel/module.c > @@ -2434,7 +2434,8 @@ s

Re: [PATCH V2 2/3] Documentation: virtio: Add emergency write (emerg_wr) config register in virtio console.

2013-05-12 Thread Rusty Russell
Rob Landley writes: > On 05/06/2013 07:19:50 AM, Pranavkumar Sawargaonkar wrote: >> Signed-off-by: Pranavkumar Sawargaonkar >> Signed-off-by: Anup Patel >> --- >> Documentation/virtual/virtio-spec.txt |8 +++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/Documen

Re: [PATCH] module: Add section ".ref.data" into kmemleak-scan-area.

2013-05-14 Thread Rusty Russell
Catalin Marinas writes: > On Mon, May 13, 2013 at 03:24:09AM +0100, Rusty Russell wrote: >> majianpeng writes: >> >> > In commit 523c81135,it used "__refdata" on event_class_ftrace_##call. >> > It will cause kmemleak to misjudge because when loading

Re: [PATCH V2 2/3] Documentation: virtio: Add emergency write (emerg_wr) config register in virtio console.

2013-05-14 Thread Rusty Russell
Pranavkumar Sawargaonkar writes: > Hi Rusty, > > On 13 May 2013 08:22, Rusty Russell wrote: >> Pranavkumar Sawargaonkar writes: >>> Signed-off-by: Pranavkumar Sawargaonkar >>> Signed-off-by: Anup Patel >>> --- >>> Documentation/virtual/vir

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-14 Thread Rusty Russell
Asias He writes: > scsi.c includes vhost.c which uses memcpy_fromiovec. > > This patch fixes this build failure. > >From Randy Dunlap: >''' >on x86_64: > >ERROR: "memcpy_fromiovec" [drivers/vhost/vhost_scsi.ko] undefined! > >It needs to depend on NET since net/core/ provides th

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-15 Thread Rusty Russell
"Nicholas A. Bellinger" writes: > On Wed, 2013-05-15 at 14:47 +0930, Rusty Russell wrote: >> Asias He writes: >> > scsi.c includes vhost.c which uses memcpy_fromiovec. >> > >> > This patch fixes this build failure. >> > >> >From

Re: [PATCH 04/21] Generic percpu refcounting

2013-05-15 Thread Rusty Russell
Kent Overstreet writes: > This implements a refcount with similar semantics to > atomic_get()/atomic_dec_and_test() - but percpu. Ah! This is why I was CC'd... Now I understand. Thanks :) Delighted to see someone chasing this. I had an implementation of such a thing last decade, but the slowm

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-15 Thread Rusty Russell
Asias He writes: > On Wed, May 15, 2013 at 02:47:53PM +0930, Rusty Russell wrote: >> Asias He writes: >> > scsi.c includes vhost.c which uses memcpy_fromiovec. >> > >> > This patch fixes this build failure. >> > >> >From Randy Dun

Re: [PATCH] Add non-zero module sections to sysfs

2013-04-07 Thread Rusty Russell
Philip Kranz writes: > Hello. > > On Fri, Apr 05, 2013 at 12:07:15PM +0200, James Bottomley wrote: >> Just so you know: this isn't a parisc specific problem. Gcc produces >> duplicate section names under various circumstances, but the one that >> bites us is -ffunction-sections. Note that there

Re: [PATCH] Make information about modules available to kgdb.

2013-04-07 Thread Rusty Russell
Greg KH writes: > On Sat, Apr 06, 2013 at 03:00:55PM +0200, Sebastian Wankerl wrote: >> From: Philip Kranz >> >> To be able to properly debug kernel modules kgbd needs to know all SHF_ALLOC >> sections of the module. This patch add an array of those sections to struct >> module. One cannot use s

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-07 Thread Rusty Russell
Chen Gang writes: > ownername and namebuf are all NUL terminated string. > > need always let them ended by '\0'. > > Signed-off-by: Chen Gang > --- > kernel/module.c |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/module.c b/kernel/module.c > index 3c2

Re: [PATCH V7 0/5] virtio-scsi multiqueue

2013-04-08 Thread Rusty Russell
Asias He writes: > On Sat, Apr 06, 2013 at 09:40:13AM +0100, James Bottomley wrote: >> Well, I haven't had time to look at anything other than the patch I >> commented on. I'm happy with your fix, so you can add my acked by to >> that one. Since it's going through the virtio tree, don't wait for

Re: [PATCH] kernel: module: strncpy issue, using strlcpy instead of strncpy

2013-04-08 Thread Rusty Russell
Chen Gang writes: > On 2013年04月08日 13:30, Rusty Russell wrote: >> Chen Gang writes: >>> > ownername and namebuf are all NUL terminated string. >>> > >>> > need always let them ended by '\0'. >>> > >>> > Signed

Re: [PATCH -next] virtio_console: make local symbols static

2013-04-08 Thread Rusty Russell
Amit Shah writes: > On (Sat) 06 Apr 2013 [11:52:07], Wei Yongjun wrote: >> From: Wei Yongjun >> >> Those symbols only used within this file, and should be static. >> >> Signed-off-by: Wei Yongjun > > Acked-by: Amit Shah > > Amit Thanks, applied. Cheers, Rusty. -- To unsubscri

Re: [PATCH] MODSIGN: do not send garbage to stderr when enabling modules signature

2013-04-08 Thread Rusty Russell
David Cohen writes: > openssl may send garbage to stderr when generating X.509 key pair for > modules signature regardless there was an error or not. It makes more > difficult to create scripts based on kernel error/warning messages. > This patch makes sure openssl logs go to default stdout. > > S

Re: [PATCH v2] kernel: module: using strlcpy and strcpy instead of strncpy

2013-04-09 Thread Rusty Russell
Chen Gang writes: > namebuf is NUL terminated string. better always let it ended by '\0'. > ownername and module_name(owner) are the same buf len. strcpy is better. > > > Signed-off-by: Chen Gang Would be better to describe the justificaiton for strcpy in resolve_symbol(), eg. For resolve_

[PATCH] MODSIGN: do not send garbage to stderr when enabling modules signature

2013-04-10 Thread Rusty Russell
of ‘driver_for_each_device’, declared with attribute warn_unused_result Signed-off-by: David Cohen Reviewed-by: mark gross Signed-off-by: Rusty Russell --- kernel/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index bbde5f1..5a51

Re: [PATCH v2] MODSIGN: do not send garbage to stderr when enabling modules signature

2013-04-10 Thread Rusty Russell
re/mISDN/hfcpci.c: In function ‘hfcpci_softirq’: .drivers/isdn/hardware/mISDN/hfcpci.c:2298: warning: ignoring return value of ‘driver_for_each_device’, declared with attribute warn_unused_result Signed-off-by: David Cohen Reviewed-by: mark gross Signed-off-by: Rusty Russell --- kernel/Makefil

Re: [PATCH] kernel: kallsyms: parameters checking, for EXPORT_SYMBOL_GPL functions

2013-04-10 Thread Rusty Russell
Chen Gang writes: > for EXPORT_SYMBOL_GPL functions, necessary to check their parameters. > > Signed-off-by: Chen Gang Why? If someone misuses these functions, they crash and thus indicate that the caller shouldn't do that. Or is someone already doing this? Confused, Rusty. > --- > kernel

RE: [PATCH v2] MODSIGN: do not send garbage to stderr when enabling modules signature

2013-04-10 Thread Rusty Russell
"Gross, Mark" writes: > Reviewed-by: mark gross Not sure that's a valid email address, so I added a space. Cheers, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.or

Re: [PATCH v3] kernel: module: using strlcpy and strcpy instead of strncpy

2013-04-10 Thread Rusty Russell
Chen Gang writes: > namebuf is NUL terminated string. better always let it ended by '\0'. > > the module_name() is always the name field of struct module (which is > a fixed array), or a literal "kernel", so strcpy is better. Thanks, applied. Cheers, Rusty. -- To unsubscribe from this lis

Re: [PATCH] module: add kset_obj_exists() and use it

2013-04-10 Thread Rusty Russell
Veaceslav Falico writes: > Add a new function, kset_obj_exists(), which is identical to > kset_find_obj() but doesn't take a reference to the kobject > found and only returns bool if found/not found. > > The main purpose would be to avoid the possible race scenario, > when we could get the referen

Re: [PATCH 0/2] Early printk support for virtio console devices.

2013-04-30 Thread Rusty Russell
Alexander Graf writes: > Am 29.04.2013 um 05:09 schrieb Rusty Russell : > >> Alexander Graf writes: >>> On 26.04.2013, at 13:04, Pranavkumar Sawargaonkar wrote: >>> >>>> This patch-set implements early printk support for virtio console devices >>

Re: [PATCH 0/2] Early printk support for virtio console devices.

2013-04-30 Thread Rusty Russell
Alexander Graf writes: > There are not device specific registers in > virtio-console. Virtio-console lives behind a virtio bus which doesn't > know what these registers are. You're not going to make coherent arguments without reading that actual patch we're discussing. And you're going to just w

Re: [PATCH] modpost.c: Add .text.unlikely to TEXT_SECTIONS

2013-04-30 Thread Rusty Russell
Tom Rini writes: > On 04/28/2013 10:59 PM, Rusty Russell wrote: >> Tom Rini writes: >> >>> Recent gcc's may place functions into the .text.unlikely section and we >>> need to check this section as well for section mismatches now otherwise >>

[PULL] virtio & lguest

2013-05-01 Thread Rusty Russell
ction virtio-scsi: push vq lock/unlock into virtscsi_vq_done virtio-scsi: introduce multiqueue support Paul Bolle (1): virtio: do not export "u16" and "u64" to userspace Rusty Russell (31): Remove Documentation/virtual/virtio-spec.txt virtio_ring: expose v

Re: [PATCH] linkage.h: fix build breakage due to symbol prefix handling

2013-05-01 Thread Rusty Russell
James Hogan writes: > Al's commit e1b5bb6d1236d4ad2084c53aa83dde7cdf6f8eea ("consolidate > cond_syscall and SYSCALL_ALIAS declarations") broke the build on > blackfin and metag due to the following code: > > #ifndef SYMBOL_NAME > #ifdef CONFIG_SYMBOL_PREFIX > #define SYMBOL_NAME(x) CONFIG_SY

Re: modpost command line still is a problem

2013-05-03 Thread Rusty Russell
"H. Peter Anvin" writes: > At least as far as current linus, "make allmodconfig" still fails with > O= in a sufficiently deep directory due to the modpost command line > being too long. > > There was a bunch of talk about how to address that, but did anything > ever come of it? > > -hpa Th

Re: [PATCH] modpost.c: Add .text.unlikely to TEXT_SECTIONS

2013-05-06 Thread Rusty Russell
Tom Rini writes: > On 05/01/2013 07:18 AM, Tom Rini wrote: >> On 04/30/2013 10:19 PM, Rusty Russell wrote: >>> Tom Rini writes: >>>> On 04/28/2013 10:59 PM, Rusty Russell wrote: >>>>> Tom Rini writes: >>>>> >>>>&g

Re: [PATCH] virtio_blk: Add missing 'static' qualifiers

2013-05-06 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Fri, May 03, 2013 at 10:50:55AM +0900, Jonghwan Choi wrote: >> Add missing 'static' qualifiers >> >> Signed-off-by: Jonghwan Choi > > Acked-by: Michael S. Tsirkin Applied. Thanks, Rusty. >> --- >> drivers/block/virtio_blk.c |2 +- >> 1 file changed, 1 i

Re: Add missing module license tag to vring helpers.

2013-05-06 Thread Rusty Russell
Dave Jones writes: > [ 624.286653] vringh: module license 'unspecified' taints kernel. > > Signed-off-by: Dave Jones Thanks! This is exactly right. But note that the default license tag for otherwise-unlabelled modules would be "GPLv2". "GPL" means v2 or later (which is what I want, but it's

Re: [PATCH v2] lguest: rename i386_head.S

2013-05-06 Thread Rusty Russell
Daniel Baluta writes: > Since commit 9a163ed8e0 (i386: move kernel) kernel/i386_head.S > was renamed to kernel/head_32.S. We do the same for lguest/i386_head.S. > > Signed-off-by: Daniel Baluta Better. Applied. Thanks, Rusty. > --- > Changes since v1: > * use head_32.o in Makefile > >

Re: [PATCH] linkage.h: fix build breakage due to symbol prefix handling

2013-05-06 Thread Rusty Russell
Stephen Rothwell writes: > Version from today's merge fix. Rusty, you should show this to Linus > when you ask him to merge your modules tree (assuming it looks right :-)). > > From: Stephen Rothwell > Date: Thu, 14 Mar 2013 17:14:41 +1100 > Subject: [PATCH] cond_syscall and SYSCALL_ALIAS merge

Re: [PATCH 0/2] Early printk support for virtio console devices.

2013-05-06 Thread Rusty Russell
Peter Maydell writes: > On 1 May 2013 03:07, Rusty Russell wrote: >> An emergency output is a reasonable idea, and this is a reasonable >> implementation. The question is practical: will it be used? Because we >> don't implement reasonable ideas which aren't goi

Re: [PATCH 0/2] Early printk support for virtio console devices.

2013-05-07 Thread Rusty Russell
Peter Maydell writes: > On 6 May 2013 06:11, Rusty Russell wrote: >> Peter Maydell writes: >>> To be actually useful we need to also specify something in >>> the device tree to say "here is where you will find your >>> emergency output and what it is&q

Re: Add missing module license tag to vring helpers.

2013-05-07 Thread Rusty Russell
Dave Jones writes: > On Mon, May 06, 2013 at 05:06:23PM +0930, Rusty Russell wrote: > > Dave Jones writes: > > > [ 624.286653] vringh: module license 'unspecified' taints kernel. > > > > > > Signed-off-by: Dave Jones > > > > Th

Re: [PATCH] kernel/module.c: for looping, need use 'goto' instead of 'break' to jump out in time

2013-05-07 Thread Rusty Russell
Chen Gang writes: > In the 'for' looping, when error occurs, the 'break' only jump out of > 'switch', and still in 'for' looping. If error occurs multiple times, > the original error value will be overwrite. > > Currently, that will not cause issue, but still better to improve it, > so that let i

Re: Build failures due to commit ea4054a2384 (handle huge number of modules)

2013-05-08 Thread Rusty Russell
Guenter Roeck writes: > Hi all, > > I started seeing build failures such as the following in the last week or so. > > make[2]: [__modpost] Error 1 > > followed by lots of messages such as > > gcc: error: arch/x86/crypto/ablk_helper.mod.c: No such file or directory > gcc: fatal error: no input file

Re: [PATCH] lguest: improve code readability in lg_cpu_start.

2013-04-28 Thread Rusty Russell
Cosmin Paraschiv writes: > Make the container_of call friendlier and fix some comment slip-ups. > > Signed-off-by: Cosmin Paraschiv > Cc: Daniel Baluta Applied. Thanks! Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger

Re: [PATCH v2] modpost: fix unwanted VMLINUX_SYMBOL_STR expansion

2013-04-28 Thread Rusty Russell
by VMLINUX_SYMBOL_STR. Use > __VMLINUX_SYMBOL_STR instead which doesn't expand the argument. > > Reported-by: Tetsuo Handa > Reported-by: Andy Shevchenko > Signed-off-by: James Hogan > Cc: Rusty Russell > Cc: H. Peter Anvin > Tested-by: Tetsuo Handa > Tested-by: An

Re: [PATCH 0/2] Early printk support for virtio console devices.

2013-04-28 Thread Rusty Russell
Alexander Graf writes: > On 26.04.2013, at 13:04, Pranavkumar Sawargaonkar wrote: > >> This patch-set implements early printk support for virtio console devices >> without using any hypercalls. >> >> The current virtio early printk code in kernel expects that hypervisor will >> provide some mec

Re: [PATCH 1/2] virtio: console: Add early writeonly register to config space

2013-04-28 Thread Rusty Russell
Pranavkumar Sawargaonkar writes: > This patch adds a early_wr register (writeonly) in config space of virtio > console device which can be used for debugging. > > The patch also updates virtio-spec in Documentation to reflect this feature > addition in virtio console. Perhaps change the name to

Re: [PATCH] modpost.c: Add .text.unlikely to TEXT_SECTIONS

2013-04-28 Thread Rusty Russell
-O2', `-O3', `-Os'. The comment is the same in in gcc 4.7. So is your real issue that this section is generated with -fprofile-arcs, or has something changed with gcc 4.8, or...? Thanks, Rusty. > Cc: Rusty Russell > Cc: Greg Kroah-Hartman > Cc: linux-kernel@vger.ker

Re: [PATCH] module: add kset_obj_exists() and use it

2013-04-10 Thread Rusty Russell
Greg KH writes: > On Tue, Apr 09, 2013 at 01:22:09PM +0200, Veaceslav Falico wrote: >> Add a new function, kset_obj_exists(), which is identical to >> kset_find_obj() but doesn't take a reference to the kobject >> found and only returns bool if found/not found. >> >> The main purpose would be to

Re: [PATCH] kernel: kallsyms: parameters checking, for EXPORT_SYMBOL_GPL functions

2013-04-10 Thread Rusty Russell
Chen Gang writes: > On 2013年04月10日 14:57, Rusty Russell wrote: >> Chen Gang writes: >>> > for EXPORT_SYMBOL_GPL functions, necessary to check their parameters. >>> > >>> > Signed-off-by: Chen Gang >> Why? >> >> If someone mi

Re: [PATCH v2] MODSIGN: do not send garbage to stderr when enabling modules signature

2013-04-10 Thread Rusty Russell
David Cohen writes: > On 04/10/2013 03:32 AM, Rusty Russell wrote: >> David Cohen writes: >>> openssl may send garbage to stderr when generating X.509 key pair for >>> modules signature regardless there was an error or not. It makes more >>> difficult to

Re: [PATCH] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-10 Thread Rusty Russell
d string is too long (>= maxlen), it will be truncated. > not check the parameters whether valid, since it is a static function. > > > Signed-off-by: Chen Gang > Signed-off-by: Rusty Russell ??!!! I never signed this off! I've never seen it before! Minor comments bel

Re: [PATCH] module: add kset_obj_exists() and use it

2013-04-14 Thread Rusty Russell
Veaceslav Falico writes: > On Wed, Apr 10, 2013 at 04:47:34PM +0930, Rusty Russell wrote: >>That's a bug. We should be cleaning up sysfs before we unlike the >>removed module from the list. >> >>Because the same thing applies to ddebug info, which is also keyed

Re: [PATCH v2] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-14 Thread Rusty Russell
Chen Gang writes: > We don't export any symbols > 128 characters, but if we did then > kallsyms_expand_symbol() would overflow the buffer handed to it. > So we need check destination buffer length when copying. > > the related test: > if we define an EXPORT function which name more tha

Re: [PATCH] virtio-spec: document virtio-9p

2013-04-15 Thread Rusty Russell
Sasha Levin writes: > Add basic documentation for virtio-9p. I can expand more on device operation, > but I don't think there's anything significant enough for the spec to be > mentioned there. Please let me know if I'm wrong. > > Signed-off-by: Sasha Levin Hmm, I guess so. I was happy to leave

Re: [PATCH v3] kernel: kallsyms: memory override issue, need check destination buffer length

2013-04-15 Thread Rusty Russell
Chen Gang writes: > We don't export any symbols > 128 characters, but if we did then > kallsyms_expand_symbol() would overflow the buffer handed to it. > So we need check destination buffer length when copying. > > the related test: > if we define an EXPORT function which name more th

Re: New AIO API

2013-04-15 Thread Rusty Russell
Andrew Morton writes: > On Fri, 12 Apr 2013 15:28:56 -0700 Kent Overstreet > wrote: >> Those are the main changes (besides adding attributes, of course) that >> I've made so far. >> >> * Get rid of the parallel syscall interface >> >>AIO really shouldn't be implementing its own slightly

Re: [PATCH V2 1/3] virtio: console: Add emergency writeonly register to config space

2013-05-16 Thread Rusty Russell
gt;> Signed-off-by: Anup Patel >> Signed-off-by: Rusty Russell > > OK, this change by itself looks harmless. > > Acked-by: Amit Shah > > Amit Thanks. This is queued for *next* merge window. Cheers, Rusty. -- To unsubscribe from this list: send the line &quo

Re: V3.10-rc1 memory leak

2013-05-16 Thread Rusty Russell
ata. >> >> Signed-off-by: Steven Rostedt > > That's even better. I tested the two patches as well, added a subject > and a bit of clean-up and pushed them to this branch: > > git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64.git > kmemleak &g

Re: [PATCH] virtio_pci: fix macro exported in uapi

2013-05-16 Thread Rusty Russell
"Michael S. Tsirkin" writes: > macro VIRTIO_PCI_CONFIG except in the unlikely event userspace > actually has a structure with a field named msix_enabled. > Get the msix_enabled by value instead, to make it useful > for userspace. > > Signed-off-by: Michael S. Tsirkin Macro still isn't usable, be

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-16 Thread Rusty Russell
Joe Perches writes: > On Thu, 2013-05-16 at 13:04 +0930, Rusty Russell wrote: >> Asias He writes: >> > On Wed, May 15, 2013 at 02:47:53PM +0930, Rusty Russell wrote: > [] >> > Other users are using memcpy_fromiovec and friends outside net. It seems >> >

Re: [PATCH] virtio_console: fix uapi header

2013-05-16 Thread Rusty Russell
"Michael S. Tsirkin" writes: > uapi should use __u32 not u32. > Fix a macro in virtio_console.h which uses u32. > > Signed-off-by: Michael S. Tsirkin Ouch. Added CC:stable, and put into fixes. Mainly because it's embarrassing :) Cheers, Rusty. -- To unsubscribe from this list: send the line "

Re: [PATCH] vhost-scsi: Depend on NET for memcpy_fromiovec

2013-05-19 Thread Rusty Russell
Randy Dunlap writes: > On 05/16/13 16:42, Rusty Russell wrote: >> Joe Perches writes: >>> On Thu, 2013-05-16 at 13:04 +0930, Rusty Russell wrote: >>>> Asias He writes: >>>>> On Wed, May 15, 2013 at 02:47:53PM +0930, Rusty Russell wrote: >>&g

Re: [PATCHv2] virtio_pci: better macro exported in uapi

2013-05-19 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Macro VIRTIO_PCI_CONFIG assumes that userspace actually has a structure > with a field named msix_enabled. Add VIRTIO_PCI_CONFIG_OFF that gets > the msix_enabled by value instead, to make it useful for userspace. We > still keep VIRTIO_PCI_CONFIG around for now, i

Re: [PATCH] virtio_pci: fix macro exported in uapi

2013-05-19 Thread Rusty Russell
David Howells writes: > Rusty Russell wrote: > >> Macro still isn't usable, because userspace can't know whether it's the >> new or old. >> >> We need to either remove it from UAPI, or rename it to >> VIRTIO_PCI_CONFIG_OFF. > > Surely, if

Re: linux-next: build failure after merge of the rr-fixes tree

2013-05-19 Thread Rusty Russell
Stephen Rothwell writes: > Hi Rusty, > > After merging the rr-fixes tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/dma/iovlock.c: In function 'dma_pin_iovec_pages': > drivers/dma/iovlock.c:98:21: error: dereferencing pointer to incomplete type >down_read(¤

Re: [RFC PATCH] kmod: add ability to swap root in usermode helper

2013-05-21 Thread Rusty Russell
Stanislav Kinsbursky writes: > Usermode helper executes all binaries in global "init" root context. This > doesn't allow to call to call the binary from other root (for example in a > container). > Currently, containerized NFS server requires an ability to execute a binary in > a other context, th

Re: [PATCH] usermodehelper: kill the sub_info->path[0] check

2013-05-21 Thread Rusty Russell
uot; case. > > Kill it. Not only it looks strange, it can confuse other callers. > And this allows us to revert 264b83c0 "usermodehelper: check > subprocess_info->path != NULL", do_execve(NULL) is safe. > > Signed-off-by: Oleg Nesterov Nice cleanup. It was definit

[PULL] virtio fixes

2013-05-21 Thread Rusty Russell
x is later than I liked, but my first version broke linux-next due to overzealous header clean. Thanks, Rusty. Michael S. Tsirkin (1): virtio_console: fix uapi header Rusty Russell (1): Hoist memcpy_fromiovec/memcpy_toiove

Re: [PATCH V2] virtio_net: enable napi for all possible queues during open

2013-05-22 Thread Rusty Russell
er changing the number of queues. > > This patch fixes this by enabling napi for all possible queues during open. > > Cc: Sasha Levin > Signed-off-by: Jason Wang Acked-by: Rusty Russell Dave, please send to Linus (fixes master). Cheers, Rusty. > --- > Changes from V1

Re: [PATCH v3] kernel/module.c: need return the first error code to upper caller when error occurs

2013-05-22 Thread Rusty Russell
Chen Gang writes: > Hello Maintainers: > > Please help check the patch whether OK or not, when you have time. Hi Chen, There's nothing *wrong* with the patch, but I don't think it's worthwhile. If this were your very first kernel patch, I'd probably apply it just to encourage you, but y

Re: [RESEND][PATCH] mtd: refactor call to request_module

2013-05-22 Thread Rusty Russell
Kees Cook writes: > This reduces the size of the stack frame when calling request_module(). > Performing the sprintf before the call is not needed. > > Signed-off-by: Kees Cook I like the patch. If dwmw2 doesn't grab it, Andrew please take. Thanks, Rusty. > --- > drivers/mtd/chips/gen_probe

Re: [PATCH mainline] lib: make iovec obj instead of lib

2013-05-23 Thread Rusty Russell
Randy Dunlap writes: > when CONFIG_VMWARE_VMCI=m: > > ERROR: "memcpy_toiovec" [drivers/misc/vmw_vmci/vmw_vmci.ko] undefined! > ERROR: "memcpy_fromiovec" [drivers/misc/vmw_vmci/vmw_vmci.ko] undefined! > > Changing iovec.o from lib-y to obj-y fixes the

Re: BUG_ON in virtio-ring.c

2013-05-26 Thread Rusty Russell
Dave Airlie writes: > Hi Rusty, > > current virtio-ring.c has a BUG_ON in virtqueue_add that checks > total_sg > vg->vring.num, however I'm not sure it really is 100% > correct. > > If I have an indirect ring and I'm adding sgs to it and the host is > delayed (say I've got a thread consuming thing

Re: BUG_ON in virtio-ring.c

2013-05-26 Thread Rusty Russell
Dave Airlie writes: >>> correct. >>> >>> If I have an indirect ring and I'm adding sgs to it and the host is >>> delayed (say I've got a thread consuming things from the vring and its >>> off doing something interesting), >>> I'd really like to get ENOSPC back from virtqueue_add. However if the >>

Re: [PATCH] modules: insert mods sorted

2013-05-27 Thread Rusty Russell
Andrew Jones writes: > While there isn't a big difference between typing 'lsmod' and > 'lsmod | sort', the module listing in Oopses isn't so easily sorted. > Attempting to search these quickly by eye for particular modules while > rapidly triaging bugs can be a pain. Sort the list and reduce the p

Re: [PATCH rusty/virtio-pci-new-layout] virtio: new layout minor header fixups

2013-05-27 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Fix issues observed with the new layout code, seen > when implementing device in qemu: > - use of uXX in uapi header > - incorrect readonly tag on one field > - unconditional warning breaks builds with -Werr > > Signed-off-by: Michael S. Tsirkin H

Re: [PATCH 04/21] Generic percpu refcounting

2013-05-28 Thread Rusty Russell
Kent Overstreet writes: > On Wed, May 15, 2013 at 10:37:20AM -0700, Tejun Heo wrote: >> Can you please expand it on a bit and, more importantly, describe in >> what limits, it's safe? This should be safe as long as the actual sum >> of refcnts given out doesn't overflow the original type, right?

Re: [PATCH] drivers: virtio: Use PTR_RET function

2013-03-26 Thread Rusty Russell
Andru Gheorghiu writes: > PTR_RET does return. It's perfectly equivalent to using IS_ERR and the > returning PTR_ERR. The implementation is here [1]. Um, I read the implementation, thanks. > The reason for using it is this: if you have a function that does > something why not call it instead of

[PULL] virtio fixes

2013-04-01 Thread Rusty Russell
The following changes since commit e84e7a56a3aa2963db506299e29a5f3f09377f9b: virtio: rng: disallow multiple device registrations, fixes crashes (2013-03-08 11:30:43 +1100) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git tags/fixes-for-l

Re: [PATCH 3/8] virtio: do not export "u16" and "u64" to userspace

2013-04-01 Thread Rusty Russell
Paul Bolle writes: > virtio_balloon.h exports "u16" and "u64" to userspace. Use "__u16" and > "__u64" instead. > > Signed-off-by: Paul Bolle > --- > 0) Tested with a kernel build. > > 1) Both types are used in this header for quite some time now. So is my > patch flawed or doesn't userspace actua

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