Re: [RFCv3] virtio_console: Add support for virtio remoteproc serial

2012-09-11 Thread Rusty Russell
sjur.brandel...@stericsson.com writes: > I actually like this new approach better. > It solves the issues Michael has pointed out, and we don't have to > think through side effects of weired combination of feature bits. Agreed. Just one thing, should it depend on CONFIG_REMOTEPROC? And have OMAP

Re: [PATCH] Add a page cache-backed balloon device driver.

2012-09-11 Thread Rusty Russell
Mike Waychison writes: > On Mon, Sep 10, 2012 at 3:59 PM, Michael S. Tsirkin wrote: >> On Mon, Sep 10, 2012 at 01:37:06PM -0400, Mike Waychison wrote: >>> On Mon, Sep 10, 2012 at 5:05 AM, Michael S. Tsirkin wrote: >>> > On Tue, Jun 26, 2012 at 01:32:58PM -0700, Frank Swiderski wrote: >>> >> This

Re: [PATCH 1/2] module: add syscall to load module from fd

2012-09-12 Thread Rusty Russell
"H. Peter Anvin" writes: > On 09/06/2012 11:13 AM, Kees Cook wrote: >> Instead of (or in addition to) kernel module signing, being able to reason >> about the origin of a kernel module would be valuable in situations >> where an OS already trusts a specific file system, file, etc, due to >> thing

Re: [PATCH] module: report -EFAULT on bytes remaining

2012-09-12 Thread Rusty Russell
Dan Carpenter writes: > On Wed, Sep 12, 2012 at 08:06:16AM -0700, Kees Cook wrote: >> Caught by smatch: >> kernel/module.c:2450 copy_module_from_user() warn: maybe return -EFAULT >> instead of the bytes remaining? >> >> Clean up the copy_from_user() call to not report a positive value. >> Wit

[PATCH 1/2] module: fix symbol waiting when module fails before init

2012-09-14 Thread Rusty Russell
tate assignment. Signed-off-by: Rusty Russell --- kernel/module.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/module.c b/kernel/module.c --- a/kernel/module.c +++ b/kernel/module.c @@ -2959,7 +2959,7 @@ static struct module *load_module(void _ /* U

module: test code for waiting.

2012-09-14 Thread Rusty Russell
From: Rusty Russell Subject: module: dummy module to test loading race. --- kernel/Makefile |1 + kernel/test-mod.c | 21 + 2 files changed, 22 insertions(+) diff --git a/kernel/Makefile b/kernel/Makefile --- a/kernel/Makefile +++ b/kernel/Makefile @@ -131,3 +131,4

[PATCH 2/2] module: wait when loading a module which is currently initializing.

2012-09-14 Thread Rusty Russell
e still loading. Suggested-by: Lucas De Marchi Signed-off-by: Rusty Russell --- kernel/module.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/kernel/module.c b/kernel/module.c --- a/kernel/module.c +++ b/kernel/module.c @@ -2845,6 +2845,2

[PATCH] lguest: fix mis-merge against hpa's TSS renaming

2008-01-30 Thread Rusty Russell
drivers/lguest/x86/core.c: In function ‘copy_in_guest_info’: drivers/lguest/x86/core.c:97: error: ‘struct x86_hw_tss’ has no member named ‘esp1’ Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r bf3a09b5070a drivers/lguest/x86/core.c --- a/drivers/lguest/x86/core.c Thu Jan 31 14

Re: [build bug] lguest build failure: drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): undefined reference to `LGUEST_PAGES_regs_trapnum'

2008-02-02 Thread Rusty Russell
On Saturday 02 February 2008 04:05:51 Ingo Molnar wrote: > looks similar to the previous one so i guess my quick fix attempt was a > bit too quick. Will turn lguest off again. And i'm willing to test > patches as well :) Yes, sorry, I've been completely busy at linux.conf.au. Will test and fix.

Re: [build bug] lguest build failure: drivers/lguest/x86/switcher_32.S:(.text+0x3815f8): undefined reference to `LGUEST_PAGES_regs_trapnum'

2008-02-03 Thread Rusty Russell
tions: they used to be tied together. Sort out which parts of asm-offsets are needed for Guest and Host. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r 7d5a5c7a4b95 arch/x86/kernel/asm-offsets_32.c --- a/arch/x86/kernel/asm-offsets_32.c Sat Feb 02 23:13:05 2008 +1100 +++ b/arch/x8

Re: [PATCH] request_irq() always returns -EINVAL with a NULL handler.

2008-02-03 Thread Rusty Russell
On Sunday 03 February 2008 17:15:02 Andrew Morton wrote: > On Thu, 17 Jan 2008 17:57:58 +1100 Rusty Russell <[EMAIL PROTECTED]> wrote: > > I assume that these ancient network drivers were trying to find out if > > an irq is available. eepro.c expecting +EBUSY was doubly w

[PATCH 5/5] typesafe: TIMER_INITIALIZER and setup_timer

2008-02-04 Thread Rusty Russell
unsigned long, due to the cast. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- include/linux/timer.h | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff -r c53eb02af893 include/linux/timer.h --- a/include/linux/timer.h Thu Jan 31 17:27:22 2008 +1

[PATCH 2/5] typesafe: Convert stop_machine

2008-02-04 Thread Rusty Russell
Using cast_if_type() we can have a callback funciton either of the exactly correct type to take "data", or to take a void *. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r e279190b7b43 include/linux/stop_machine.h --- a/include/linux/stop_machine.h Mon Jan 21 14:

[PATCH 1/5] cast_if_type: allow macros functions which take more than one type.

2008-02-04 Thread Rusty Russell
>= 3.2 anyway). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- include/linux/compiler-gcc.h | 17 + include/linux/compiler-intel.h |2 ++ 2 files changed, 19 insertions(+) diff -r e6626cc7bdc2 include/linux/compiler-gcc.h --- a/include/linux/compiler-gcc.h

[PATCH 0/5] typesafe callbacks

2008-02-04 Thread Rusty Russell
Hi all, More typesafety is usually good, and these patches apply that to some common callbacks, using a new conditional cast. (I'm nominally on holiday for all of Feb, so my replies will be sporadic. Please sort this out amongst yourselves). Cheers! Rusty. -- To unsubscribe from this list:

[PULL] virtio updates

2008-02-04 Thread Rusty Russell
virtio_blk: provide getgeo virtio_blk: Dont waste major numbers virtio_blk: implement naming for vda-vdz,vdaa-vdzz,vdaaa-vdzzz Dor Laor (1): virtio_net: parametrize the napi_weight for virtio receive queue. Rusty Russell (16): virtio: Implement skb_partial_csum_set, for setting

[PATCH 3/5] typesafe: kthread_create and kthread_run

2008-02-04 Thread Rusty Russell
Using cast_if_type() we can have a callback funciton either of the exactly correct type to take "data", or to take a void *. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- include/linux/kthread.h | 30 +++--- kernel/kthread

[PATCH 4/5] typesafe: request_irq and devm_request_irq

2008-02-04 Thread Rusty Russell
This patch lets interrupt handler functions have their natural type (ie. exactly match the data pointer type); it allows the old irq_handler_t type as well. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- include/linux/interrupt.h | 17 +++-- kernel/irq/devres.c

Re: [PATCH 5/5] typesafe: TIMER_INITIALIZER and setup_timer

2008-02-04 Thread Rusty Russell
On Tuesday 05 February 2008 01:57:37 Al Viro wrote: > On Mon, Feb 04, 2008 at 11:19:44PM +1100, Rusty Russell wrote: > > This patch lets timer callback functions have their natural type > > (ie. exactly match the data pointer type); it allows the old "unsigned > &g

Re: [PATCH] Whine about suspicious return values from module's ->init() hook

2008-02-04 Thread Rusty Russell
On Tuesday 05 February 2008 02:42:15 Alexey Dobriyan wrote: > One head-scratching session could be noticeably shorter with this patch... > > Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]> If we want to prevent > 0 returns, let's just BUG_ON(). Thanks, Rusty. -- To unsubscribe from this list:

Re: [PATCH] Whine about suspicious return values from module's ->init() hook

2008-02-04 Thread Rusty Russell
On Tuesday 05 February 2008 14:53:18 Andrew Morton wrote: > On Tue, 5 Feb 2008 14:43:31 +1100 Rusty Russell <[EMAIL PROTECTED]> wrote: > > On Tuesday 05 February 2008 02:42:15 Alexey Dobriyan wrote: > > > One head-scratching session could be noticeably short

Re: [PATCH 1/2] modsign: don't use bashism in sh scripts.

2012-10-01 Thread Rusty Russell
David Howells writes: > Rusty Russell wrote: > >> -source ./.config >> +. ./.config > > Does that make a difference? It does on Ubuntu, where /bin/sh => dash. "source" is a bashism. Cheers, Rusty. -- To unsubscribe from this list: send the line &

Re: [GIT PULL] Asymmetric keys and module signing

2012-10-01 Thread Rusty Russell
David Howells writes: > Rusty Russell wrote: > >> I noticed the Cert number didn't change with rebuilds: "distclean" >> didn't remove some files: >> >> $ git clean -f -f -x -d >> Removing extra_certificates >> Removing signing_key.

Linux-next changes for module and virtio trees.

2012-10-01 Thread Rusty Russell
Hi Stephen, Please remove my quilt tree http://ozlabs.org/~rusty/kernel/rr-latest/ from linux-next, and use my git trees from now on: git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git Branches: modules-next virtio-next For others: beware that these will rebase

Re: [GIT PULL] Asymmetric keys and module signing

2012-10-01 Thread Rusty Russell
Josh Boyer writes: > On Sat, Sep 29, 2012 at 08:13:25AM +0100, David Howells wrote: >> Rusty Russell wrote: >> >> > [2.808075] Loading module verification certificates >> > [2.809331] X.509: Cert 6e03943da0f3b015ba6ed7f5e0cac4fe48680994 has >>

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Building the latest git now... Cheers, Rusty. Subject: virtio: CONFIG_VIRTIO_DEVICE_TORTURE Virtio devices are not supposed to depend on the framing of the scatter-gather lists, but various implementations did. Safeguard this in future by adding an option to deliberately create perverse de

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Rusty Russell writes: > "Michael S. Tsirkin" writes: > >> Thinking about Sasha's patches, we can reduce ring usage >> for virtio net small packets dramatically if we put >> virtio net header inline with the data. >> This can be done for free in case

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Paolo Bonzini writes: > Il 03/10/2012 08:44, Rusty Russell ha scritto: >> There's a reason I haven't done this. I really, really dislike "my >> implemention isn't broken" feature bits. We could have an infinite >> number of them, for each bug

Re: [GIT PULL] Asymmetric keys and module signing

2012-10-03 Thread Rusty Russell
David Howells writes: > Rusty Russell wrote: > >> Right. I think we need to use different names for generated vs supplied >> files > > The problem with supplied files is people who do allyesconfig, allmodconfig > and randconfig just to test things finding that their

Re: [PATCH 2/3] virtio-net: correct capacity math on ring full

2012-10-03 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Capacity math on ring full is wrong: we are > looking at num_sg but that might be optimistic > because of indirect buffer use. > > The implementation also penalizes fast path > with extra memory accesses for the benefit of > ring full condition handling which is slow

Re: [PATCH -next] asymmetric keys: fix printk format warning

2012-10-03 Thread Rusty Russell
Stephen Rothwell writes: > [Lets also cc Rusty who committed the patch ...] > > On Wed, 03 Oct 2012 16:04:46 -0700 Randy Dunlap wrote: >> >> From: Randy Dunlap >> >> Fix printk format warning in x509_cert_parser.c: >> >> crypto/asymmetric_keys/x509_cert_parser.c: In function 'x509_note_OID':

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Anthony Liguori writes: > Rusty Russell writes: > >> "Michael S. Tsirkin" writes: >> >>> Thinking about Sasha's patches, we can reduce ring usage >>> for virtio net small packets dramatically if we put >>> virtio net header inline wi

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-03 Thread Rusty Russell
Kees Cook writes: > On Thu, Sep 20, 2012 at 3:14 PM, Kees Cook wrote: >> As part of the effort to create a stronger boundary between root and >> kernel, Chrome OS wants to be able to enforce that kernel modules are >> being loaded only from our read-only crypto-hash verified (dm_verity) >> root

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-03 Thread Rusty Russell
Anthony Liguori writes: > Rusty Russell writes: > >> "Michael S. Tsirkin" writes: >> >> There's a reason I haven't done this. I really, really dislike "my >> implemention isn't broken" feature bits. We could have an infinite

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-04 Thread Rusty Russell
are always a mistake, but I can't blame anyone else for my lack of attention :( Here's the spec change: commit 7e74459bb966ccbaad9e4bf361d1178b7f400b79 Author: Rusty Russell Date: Thu Oct 4 17:11:27 2012 +0930 No longer assume framing is independent of messages. *sniff* Signed-off-by: R

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-04 Thread Rusty Russell
Paolo Bonzini writes: > Il 04/10/2012 02:11, Rusty Russell ha scritto: >> > > There's a reason I haven't done this. I really, really dislike "my >> > > implemention isn't broken" feature bits. We could have an infinite >> > > numb

[PULL] virtio

2012-10-04 Thread Rusty Russell
ichael S. Tsirkin (3): virtio-balloon: dependency fix virtio: support reserved vqs virtio: don't crash when device is buggy Peter Senna Tschudin (1): drivers/virtio/virtio_pci.c: fix error return code Rusty Russell (4): virtio_balloon: not EXPERIMENTAL any more.

Module xattr signatures

2012-10-04 Thread Rusty Russell
Hi all, Had a talk with Mimi, and IMA still wants xattr signatures on modules like they have for other files with EVM. With Kees' patches now merged into my modules-wip branch (warning, rebases frequently), this should be pretty simple. Dmitry? The question of whether this falls

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-05 Thread Rusty Russell
Mimi Zohar writes: > Why? Not only have you had these patches sitting for a while, way > before you had the kernel module patches, they've been acked/signed off > by Kees, Serge, Eric, and myself. All security subtree maintainers. > The module patches could have easily been built on top of Kees'

Re: [PATCH 4/4] add finit_module syscall to asm-generic

2012-10-05 Thread Rusty Russell
Kees Cook writes: > This adds the finit_module syscall to the generic syscall list. This does ppc. Ben, please Ack. From: Rusty Russell Subject: powerpc: add finit_module syscall. Signed-off-by: Rusty Russell diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/

Re: [Request for review] Revised delete_module(2) manual page

2012-10-24 Thread Rusty Russell
"Michael Kerrisk (man-pages)" writes: > Ping! > > Rusty (et al.) I'm pretty sure the new page text is okay, but I would > like someone knowledgeable to confirm. Yes, sorry, I did read it, and had nothing to add. Ack, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kern

Re: linux-next: manual merge of the modules tree with the tree

2012-10-24 Thread Rusty Russell
Stephen Rothwell writes: > Hi Rusty, > > Today's linux-next merge of the modules tree got a conflict in > kernel/module.c between commit caabe240574a ("MODSIGN: Move the magic > string to the end of a module and eliminate the search") from Linus' tree > and commit 0250abdeec54 ("module: add sysca

Re: [PATCH] MODSIGN: Move the magic string to the end of a module and eliminate the search

2012-10-24 Thread Rusty Russell
David Howells writes: > Rusty Russell wrote: > >> Meh, I really wanted to separate the module signature locating (my >> problem) from the decoding and checking (your problem). > > You could split mod_verify_sig() at the: > > /* For the moment, only sup

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-24 Thread Rusty Russell
Lucas De Marchi writes: > On Tue, Oct 23, 2012 at 1:42 PM, Kees Cook wrote: >> On Mon, Oct 22, 2012 at 9:08 PM, Lucas De Marchi >> wrote: >>> sure... but do you realize this will fail in case kernel is checking >>> module signature and we passed --force to modprobe (therefore mangled >>> the dec

Re: [RESEND PATCH] module: Fix kallsyms to show the last symbol properly

2012-10-24 Thread Rusty Russell
ble for loaded modules (v2) commit: 4a4962263f07d14660849ec134ee42b63e95ea9a LKML: http://lkml.org/lkml/2012/10/24/27 Cc: sta...@kernel.org Reported-by: Masaki Kimura Signed-off-by: Rusty Russell diff --git a/kernel/module.c b/kernel/module.c index 261bf82..879a154 100644 --- a/kernel/modul

Re: [PATCH 14/16] virtio: Convert dev_printk(KERN_ to dev_(

2012-10-31 Thread Rusty Russell
Joe Perches writes: > dev_ calls take less code than dev_printk(KERN_ > and reducing object size is good. > Convert if (printk_ratelimit()) dev_printk to dev__ratelimited. > > Signed-off-by: Joe Perches Applied. Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH 1/4] module: add syscall to load module from fd

2012-10-31 Thread Rusty Russell
Kees Cook writes: > Rusty, > > I haven't seen this land in your modules-next tree. I just wanted to > make sure it hadn't gotten lost. I'd like to do some kmod tests > against linux-next, but I've been waiting for this to appear. Yes, sorting that out now, they should be in tomorrow's linux-next.

Re: [RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-11-01 Thread Rusty Russell
Sjur Brændeland writes: > Zero-Copy data transport on the modem is primary goal for CAIF Virtio. > In order to achieve Zero-Copy the direction of the Virtio rings are > flipped in the RX direction. So we have implemented the Virtio > access-function similar to what is found in vhost.c. So, this a

Re: [PATCH v2] MODSIGN: Add modules_sign make target

2012-11-01 Thread Rusty Russell
Josh Boyer writes: > If CONFIG_MODULE_SIG is set, and 'make modules_sign' is called then this > patch will cause the modules to get a signature appended. The make target > is intended to be run after 'make modules_install', and will modify the > modules in-place in the installed location. It ca

Re: [PATCH] MODSIGN: Only sign modules if built in-tree

2012-11-01 Thread Rusty Russell
Josh Boyer writes: > When building out-of-tree modules, the current modules_install target > will attempt to sign them if module signing is enabled. This will only > work if the signing keys are present in the build tree. That will > often not be the case for modules that are built out-of-tree a

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-11-01 Thread Rusty Russell
Amit Shah writes: > On (Tue) 23 Oct 2012 [12:17:49], Rusty Russell wrote: >> sjur.brandel...@stericsson.com writes: >> > From: Sjur Brændeland > >> > @@ -1415,7 +1524,16 @@ static void remove_port_data(struct port *port) >> > >> >/* Remove b

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

2012-11-01 Thread Rusty Russell
Stephen Rothwell writes: > Hi Rusty, > > After merging the modules tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: As this is in Andrew's tree, I've reverted it from my modules-next tree. Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe lin

Re: [PATCH v2] MODSIGN: Add modules_sign make target

2012-11-01 Thread Rusty Russell
Josh Boyer writes: > On Thu, Nov 01, 2012 at 06:03:18PM +1030, Rusty Russell wrote: >> Josh Boyer writes: >> >> > If CONFIG_MODULE_SIG is set, and 'make modules_sign' is called then this >> > patch will cause the modules to get a signature appended.

Re: [PATCH] MODSIGN: Only sign modules if built in-tree

2012-11-01 Thread Rusty Russell
Josh Boyer writes: > On Thu, Nov 01, 2012 at 07:26:55AM -0400, Josh Boyer wrote: >> > I prefer something like this (untested): >> > >> > diff --git a/Makefile b/Makefile >> > index 42d0e56..cb66c8d 100644 >> > --- a/Makefile >> > +++ b/Makefile >> > @@ -722,8 +722,14 @@ export mod_strip_cmd >> >

Re: [PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-11-04 Thread Rusty Russell
Sjur Brændeland writes: > From: Sjur Brændeland > > This patch-set introduces a new virtio type "rproc_serial" for communicating > with remote processors over shared memory. The driver depends on the > the remoteproc framework. As preparation for introducing "rproc_serial" > I've done a refactor

Re: [rfc net-next v6 3/3] virtio-net: change the number of queues through ethtool

2012-11-04 Thread Rusty Russell
Jason Wang writes: > This patch implement the {set|get}_channels method of ethool to allow user to > change the number of queues dymaically when the device is running. This would > let the user to tune the device for specific applications. ... > + /* Only two modes were support currently */ >

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-04 Thread Rusty Russell
Jason Wang writes: > This addes multiqueue support to virtio_net driver. There's two mode > supported: > single queue pair mode and multiple queue pairs mode. An obvious > difference compared with a physical mq card is that virtio-net reserve > first two virtqueues when it is working in multiqueu

Re: [rfc net-next v6 2/3] virtio_net: multiqueue support

2012-11-04 Thread Rusty Russell
Jason Wang writes: > +struct virtnet_info { > + u16 num_queue_pairs;/* # of RX/TX vq pairs */ > + u16 total_queue_pairs; > + > + struct send_queue *sq; > + struct receive_queue *rq; > + struct virtqueue *cvq; > + > + struct virtio_device *vdev; > + struct ne

Re: [PATCH v2] MODSIGN: Add modules_sign make target

2012-11-04 Thread Rusty Russell
Josh Boyer writes: > On Fri, Nov 02, 2012 at 01:49:14PM +1030, Rusty Russell wrote: >> My comment was more that this relies on eu-strip, because we always >> sign modules on installation, so you need eu-strip to *unsign* them >> (strip won't do it, BTW). > > Really

Re: [PATCH] utilize _Static_assert() for BUILD_BUG_ON() when the compiler supports it

2012-11-04 Thread Rusty Russell
Jan Beulich writes: > This makes the resulting diagnostics quite a bit more useful. > > Signed-off-by: Jan Beulich Nice. I'm a bit disappointed we can't just treat _Static_assert() as void, like: #define BUILD_BUG_ON_ZERO(e) (_Static_assert(!(e), "!(" #e ")"), 0) > @@ -54,6 +61,15 @@ struct p

Re: [PATCH 6/9] virtio_mmio: Cast &resources[1].start to ‘unsigned int *’ to rid compiler warning

2012-11-04 Thread Rusty Russell
Lee Jones writes: > drivers/virtio/virtio_mmio.c: In function ‘vm_cmdline_set’: > drivers/virtio/virtio_mmio.c:535:4: warning: format ‘%u’ expects argument of > type ‘unsigned int *’, but argument 4 has type ‘resource_size_t *’ [-Wformat] > > Cc: Rusty Russell > Cc: virtuali

Re: [PATCH v2] MODSIGN: Only sign modules if built in-tree

2012-11-04 Thread Rusty Russell
les: don't break modules_install on external modules with no key. The script still spits out an error ("Can't read private key") but we don't break modules_install. Reported-by: Bruno Wolff III Original-patch-by: Josh Boyer Signed-off-by: Rusty Russell diff --git a/scri

Re: [PATCH 2/3] drivers/misc: Add realtek pci card reader driver

2012-07-26 Thread Rusty Russell
On Fri, 20 Jul 2012 18:09:26 +0800, wrote: > +static int msi_en = 1; > +module_param(msi_en, int, S_IRUGO | S_IWUSR); > +MODULE_PARM_DESC(msi_en, "Enable MSI"); Should this be a bool, and a module_param(msi_en, bool, S_IRUGO | S_IWUSR);? > +static int adma_mode = 1; > +module_param(adma_mode, in

Re: [PATCH V3 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-26 Thread Rusty Russell
On Fri, 13 Jul 2012 16:38:51 +0800, Asias He wrote: > Add 'virtio_blk.use_bio=1' to kernel cmdline or 'modprobe virtio_blk > use_bio=1' to enable ->make_request_fn() based I/O path. This patch conflicts with Paolo's Bonzini's 'virtio-blk: allow toggling host cache between writeback and writethrou

[PULL] trivial comment changes, init and cpumask.

2012-07-26 Thread Rusty Russell
The following changes since commit 84a1caf1453c3d44050bd22db958af4a7f99315c: Linux 3.5-rc7 (2012-07-14 15:40:28 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git tags/cpumask-for-linus for you to fetch changes up to 2

[PATCH] x86: don't ever patch back to UP if we unplug cpus.

2012-07-27 Thread Rusty Russell
were only used to set this one flag. Signed-off-by: Rusty Russell --- Documentation/kernel-parameters.txt |3 - arch/x86/include/asm/alternative.h |4 - arch/x86/kernel/alternative.c | 104 +++- arch/x86/kernel/smpboot.c

Re: [RFC PATCH 0/6] CPU hotplug: Reverse invocation of notifiers during CPU hotplug

2012-07-27 Thread Rusty Russell
On Wed, 25 Jul 2012 18:30:41 +0200 (CEST), Thomas Gleixner wrote: > The problem with the current notifiers is, that we only have ordering > for a few specific callbacks, but we don't have the faintest idea in > which order all other random stuff is brought up and torn down. > > So I started expe

Re: [PATCH V3 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-27 Thread Rusty Russell
On Fri, 13 Jul 2012 16:38:51 +0800, Asias He wrote: > This patch introduces bio-based IO path for virtio-blk. Acked-by: Rusty Russell I just hope we can do better than a module option in future. Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-27 Thread Rusty Russell
terlist stuff is complete crack, but I lost that debate years ago.) Here's my variant. Networking, console and block seem OK, at least (ie. it booted!). From: Rusty Russell Subject: virtio: use chained scatterlists. Rather than handing a scatterlist[] and out and in numbers to virtqueue_

Re: virtio(-scsi) vs. chained sg_lists (was Re: [PATCH] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list)

2012-07-29 Thread Rusty Russell
On Fri, 27 Jul 2012 10:11:26 +0200, Paolo Bonzini wrote: > Il 27/07/2012 08:27, Rusty Russell ha scritto: > >> > +int virtqueue_add_buf_sg(struct virtqueue *_vq, > >> > + struct scatterlist *sg_out, > >> > +

Re: [PATCH] x86: don't ever patch back to UP if we unplug cpus.

2012-07-29 Thread Rusty Russell
On Fri, 27 Jul 2012 13:28:29 -0700, Suresh Siddha wrote: > On Fri, 2012-07-27 at 17:08 +0930, Rusty Russell wrote: > > Paul McKenney points out: > > > > mean offline overhead is 6251/48=130.2 milliseconds. > > > > If I remove the alternatives_smp_switch() fro

Re: [PATCH V4 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-29 Thread Rusty Russell
On Sun, 29 Jul 2012 14:11:15 +0300, "Michael S. Tsirkin" wrote: > On Sat, Jul 28, 2012 at 10:21:05AM +0800, Asias He wrote: > > This patch introduces bio-based IO path for virtio-blk. > > > > Compared to request-based IO path, bio-based IO path uses driver > > provided ->make_request_fn() method

[PATCH v2] x86: don't ever patch back to UP if we unplug cpus.

2012-07-29 Thread Rusty Russell
s wrong. It's now the default. 2) The skip_smp_alternatives flag used by suspend. 3) arch_disable_nonboot_cpus_begin() and arch_disable_nonboot_cpus_end() which were only used to set this one flag. Signed-off-by: Rusty Russell --- Documentation/kernel-parameters.txt |3 - arch/x8

Re: [PATCH] x86: don't ever patch back to UP if we unplug cpus.

2012-07-29 Thread Rusty Russell
On Fri, 27 Jul 2012 13:28:29 -0700, Suresh Siddha wrote: > if (!noreplace_smp && (num_present_cpus() == 1 || setup_max_cpus <= 1)) > > also, to be consistent with other checks, may be just use > "num_possible_cpus() == 1" check instead of "setup_max_cpus <= 1". Actually, if you specify "m

Re: [PATCH] module: add finit_module syscall to asm-generic

2012-09-20 Thread Rusty Russell
Arnd Bergmann writes: > On Thursday 20 September 2012, Kees Cook wrote: >> >> This adds the finit_module syscall to the generic syscall list. >> >> Signed-off-by: Kees Cook >> --- >> This depends on the finit_module patchset in Rusty's tree, based on >> https://lkml.org/lkml/2012/9/7/559 > > A

Re: [PATCHv4] virtio_console: Add support for remoteproc serial

2012-09-24 Thread Rusty Russell
Amit Shah writes: > On (Mon) 24 Sep 2012 [23:50:01], Sjur BRENDELAND wrote: >> Hi Amit, >> >> > I'm sorry for not being able to look at this earlier. >> >> No worries. I'll try to respin and retest this patch by tomorrow. >> If you by any chance could find time to review so could make it in tim

Re: [GIT PULL] Asymmetric keys and module signing

2012-09-25 Thread Rusty Russell
FIPS mode\n", err); if (err == -ENOKEY && !sig_enforce) err = 0; return err; In preparation, I've changed that below (and also, fixed up the -ENOKEY which I said I'd do, and didn't). Thanks, Rusty. PS. Agre

Re: Linux-next changes for module and virtio trees.

2012-10-30 Thread Rusty Russell
Stephen Rothwell writes: > Hi Rusty, > > On Tue, 02 Oct 2012 15:56:56 +0930 Rusty Russell > wrote: >> >> Please remove my quilt tree >> http://ozlabs.org/~rusty/kernel/rr-latest/ from linux-next, and use my >> git trees from now on: >> >&g

Re: [RFC][PATCH 00/23] Load keys from signed PE binaries

2012-10-30 Thread Rusty Russell
David Howells writes: > Hi Rusty, > > Here's a set of patches to load a key out of a signed PE format binary: > > > http://git.kernel.org/?p=linux/kernel/git/dhowells/linux-modsign.git;a=shortlog;h=refs/heads/devel-pekey AFAICT this is no longer a module issue, so I'm not going to take th

Re: [PATCH] kernel: Assembly: need add prefix for h8300 architecture.

2013-08-26 Thread Rusty Russell
Chen Gang writes: > If this implementation is correct, the implementation still can be > improved (at least, it is not quite well to hard code the architecture > related code in "kernel/" and "usr/" sub-directory). > > But it seems, I have no right to add or move files, so welcome any > members he

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

2013-08-26 Thread Rusty Russell
1 74 1e 48 8d 7b 38 83 6b 38 01 0f 94 c0 84 [ 1845.185026] RIP [] kobject_put+0x11/0x60 [ 1845.185026] RSP [ 1845.185026] CR2: a01601d0 [ 1845.185026] ---[ end trace 49a70afd109f5653 ]--- Signed-off-by: Li Zhong Signed-off-by: Rusty Russell --- include/linux/module.h | 1 + kernel/modul

Re: [PATCH] virtio-net: put virtio net header inline with data

2013-07-08 Thread Rusty Russell
"Michael S. Tsirkin" writes: > For small packets we can simplify xmit processing > by linearizing buffers with the header: > most packets seem to have enough head room > we can use for this purpose. > Since existing hypervisors require that header > is the first s/g element, we need a feature bit

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-09 Thread Rusty Russell
Chen Gang writes: > When sysfs_create_file() fails, recommend to print the related failure > information. And it is useless to still 'KOBJ_ADD' to user space. > > Signed-off-by: Chen Gang sysfs_create_file() should not fail during boot, should it? Cheers, Rusty. > --- > kernel/params.c |8

Re: [PATCH] virtio-net: put virtio net header inline with data

2013-07-09 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Tue, Jul 09, 2013 at 11:46:23AM +0930, Rusty Russell wrote: >> "Michael S. Tsirkin" writes: >> > For small packets we can simplify xmit processing >> > by linearizing buffers with the header: >> > most p

Re: virtio indirect with lots of descriptors

2013-07-09 Thread Rusty Russell
Dave Airlie writes: > Hi Rusty, > > playing with my virtio gpu, I started hitting the qemu > error_report("Too many read descriptors in indirect table"); > > Now I'm not sure but this doesn't seem to be a virtio limit that the > guest catches from what I can see, since my host dies quite quickly,

[PULL] modules-next

2013-07-09 Thread Rusty Russell
Rusty. Jean Delvare (2): There is no /sys/parameters ABI: Clarify when /sys/module/MODULENAME is created Mathias Krause (1): module: don't modify argument of module_kallsyms_lookup_name() Rusty Russell (3):

Re: [PATCH 1/2] virtio: support unlocked queue poll

2013-07-09 Thread Rusty Russell
to get rid of a > barrier here. Deferring this optimization until we do some > benchmarking. > > Signed-off-by: Michael S. Tsirkin Acked-by: Rusty Russell Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

[PULL] virtio-next

2013-07-09 Thread Rusty Russell
/barrier explicitly tools/virtio: move module license stub to module.h MAINTAINERS: add tools/virtio/ under virtio Paul Bolle (1): Fix comment typo "CONFIG_PAE" Rusty Russell (4): tools/lguest: fix missing rmb(). tools/lguest: real barriers. lguest: f

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

2013-07-09 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 Acked-by: Rusty Russell Thanks, Rusty. > --- > drivers/mtd/chips/gen_probe.c |4 +--- &g

Re: [PATCH] kernel/params.c: print failure information instead of 'KOBJ_ADD' to user space, when sysfs_create_file() fails.

2013-07-10 Thread Rusty Russell
Chen Gang F T writes: > On 07/09/2013 04:07 PM, Rusty Russell wrote: >> Chen Gang writes: >>> When sysfs_create_file() fails, recommend to print the related failure >>> information. And it is useless to still 'KOBJ_ADD' to user space. >>> >>

Re: [PATCH] virtio tools: add .gitignore

2013-07-10 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Jul 10, 2013 at 04:27:00PM +0530, Ramkumar Ramachandra wrote: >> Signed-off-by: Ramkumar Ramachandra >> --- > > Why not. > > Acked-by: Michael S. Tsirkin Applied. Thanks, Rusty. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH] virtio-net: put virtio net header inline with data

2013-07-11 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Tue, Jul 09, 2013 at 11:46:23AM +0930, Rusty Russell wrote: >> "Michael S. Tsirkin" writes: >> > For small packets we can simplify xmit processing >> > by linearizing buffers with the header: >> > most p

Re: [RFC PATCH 1/1] module: Make wait module's refcount to zero procedure as async

2013-09-15 Thread Rusty Russell
Lucas De Marchi writes: > On Thu, Sep 12, 2013 at 9:30 PM, Rusty Russell wrote: >> Peter Chen writes: >>> Currently, if module's refcount is not zero during the unload, >>> it waits there until the user decreases that refcount. >> >> Hi Peter, >>

Why does test_bit() take a volatile addr?

2013-09-15 Thread Rusty Russell
Predates git, does anyone remember the rationale? ie: int test_bit(int nr, const volatile unsigned long *addr) I noticed because gcc failed to elimiate some code in a patch I was playing with. I'm nervous about subtle bugs involved in ripping it out, even if noone knows why. Should I ad

Re: Please add PTR_RET tree.

2013-09-16 Thread Rusty Russell
Stephen Rothwell writes: > Hi Rusty, > > On Mon, 15 Jul 2013 14:07:03 +0930 Rusty Russell > wrote: >> >> Temporary branch for PTR_RET -> PTR_ERR_OR_ZERO and associated cleanups. >> >> git://git.kernel.org/pub/scm/linux/kernel/git/rust

Re: [PATCH v2] modpost: Fix secondary errors seen if a single module build fails

2013-09-16 Thread Rusty Russell
s doesn't matter much for normal builds, but it is annoying for builds > started with "make -i" due to the large number of secondary errors. > Those errors unnececessarily clog any error log and make it difficult > to find the real errors in the build. > > Fix the probl

Re: [PATCH] modules: add support for soft module dependencies

2013-09-17 Thread Rusty Russell
Lucas De Marchi writes: > On Thu, Sep 12, 2013 at 9:07 PM, Rusty Russell wrote: >> Lucas De Marchi writes: >>> On Wed, Jul 24, 2013 at 11:03 PM, Herbert Xu >>> wrote: >>>> On Thu, Jul 25, 2013 at 09:32:02AM +0930, Rusty Russell wrote: >

Re: [PATCH] modules: add support for soft module dependencies

2013-09-18 Thread Rusty Russell
Lucas De Marchi writes: > On Tue, Sep 17, 2013 at 11:10 PM, Rusty Russell wrote: >> Lucas De Marchi writes: >>> On Thu, Sep 12, 2013 at 9:07 PM, Rusty Russell >>> wrote: >>>> I'm happy to change this macro to create a modinfo line like >>&

Re: [PATCH v2 4/4] kernel: add support for init_array constructors

2013-09-05 Thread Rusty Russell
for modules, because gcc uses > .ctors or .init_array, but not both at the same time > > Signed-off-by: Frantisek Hrbata Might be nice to document which gcc version changed this, so people can choose whether to cherry-pick this change? Acked-by: Rusty Russell > --- > i

Re: [PATCH v2 4/4] kernel: add support for init_array constructors

2013-09-08 Thread Rusty Russell
Kyle McMartin writes: > On Fri, Sep 06, 2013 at 07:51:18PM +0200, Frantisek Hrbata wrote: >> > > v2: - reuse mod->ctors for .init_array section for modules, because gcc >> > > uses >> > > .ctors or .init_array, but not both at the same time >> > > >> > > Signed-off-by: Frantisek Hrbata >>

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