LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Pavel Roskin <proski@gnu.org>, Zan Lynx <zlynx@acm.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Jon Masters <jcm@jonmasters.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [PATCH 2.6.25] module: allow ndiswrapper to use GPL-only symbols
Date: Tue, 4 Mar 2008 21:51:17 +0100	[thread overview]
Message-ID: <20080304205117.GA21803@elte.hu> (raw)
In-Reply-To: <alpine.LFD.1.00.0803040907420.12253@woody.linux-foundation.org>


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Tue, 4 Mar 2008, Ingo Molnar wrote:
> > 
> > so ... i suspect the requirement would be for 
> > NdisMAllocateSharedMemory() to return a linear address that is 
> > DMA-able, and to properly map it to a physical address via 
> > dma_map_single(). I can see only one complication in pushing this to 
> > user-space: physical fragmentation of allocations. What are the 
> > typical buffer sizes that NDIS drivers request from the kernel? Is 
> > it frequently above 4K?
> 
> Ingo, i's simply not possible to put ndiswrapper in user-space sanely.
> 
> Drivers are drivers. They'll want (shared) interrupts, they want DMA, 
> they want to do things like cli/sti.
> 
> The USB drivers *may* be abstracted enough that they don't do any of
> that, but quite frankly, I doubt it.

yeah, i agree that putting it into userspace is quite insane.

it might possible to do it halfways sanely via existing arch/x86/kvm/ 
infrastructure though. VMX/SVM context will properly emulate the IRQ 
flag so cli/sti will work fine, and as long as DMA is properly 
quarantined via an iommu it might even not corrupt the rest of the 
system. Right now KVM is tailored for full system emulation but there's 
no strong reason why it couldnt emulate just a single hardware domain, 
with an NDIS driver sitting in that domain - talking to the rest of the 
system via hypercalls.

> It sounds like there aren't that many symbols affected at the core: 
> the workqueue stuff certainly isn't worth bothering about. The USB 
> things that ndiswrapper wants is much more involved, and more likely 
> to have issues, but I'm cc'ing Greg here to see.
> 
> IOW: I _personally_ don't think there are any license issues, but I do 
> want to have the situation clear to people involved.

the ugliest technical aspect of them being in the Linux host kernel is 
that NDIS drivers are used to a larger kernel stack, so they very 
frequently overflow the Linux kernel stack. Not sure whether recent 
versions of ndiswrapper have solved this problem.

	Ingo

  parent reply	other threads:[~2008-03-04 20:52 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-28 22:11 Pavel Roskin
2008-02-28 23:25 ` Linus Torvalds
2008-02-29  6:20   ` Pavel Roskin
2008-02-29 16:08     ` Linus Torvalds
2008-02-29 16:54       ` Chris Friesen
2008-02-29 17:06         ` Linus Torvalds
2008-02-29 17:59           ` Chris Friesen
2008-03-06 14:56         ` David Woodhouse
2008-02-29 16:59       ` Zan Lynx
2008-02-29 17:07         ` Linus Torvalds
2008-02-29 17:20           ` Pavel Roskin
2008-02-29 17:33             ` Linus Torvalds
2008-02-29 19:39               ` Pavel Roskin
2008-02-29 19:53                 ` Linus Torvalds
2008-02-29 20:08                   ` Pavel Roskin
2008-02-29 20:28                     ` Linus Torvalds
2008-02-29 21:13                       ` Pavel Roskin
2008-02-29 20:17                 ` John W. Linville
2008-02-29 20:40                   ` David Newall
2008-02-29 20:59                     ` Pavel Roskin
2008-02-29 21:08                       ` David Newall
2008-02-29 22:17                         ` Pavel Roskin
2008-03-01  8:15                           ` David Newall
2008-02-29 20:44                   ` Pavel Roskin
2008-02-29 21:15                 ` Ingo Molnar
2008-02-29 22:31                   ` Pavel Roskin
2008-03-03 10:57                     ` Ingo Molnar
2008-03-04  5:37                       ` Pavel Roskin
2008-03-04 12:57                         ` Ingo Molnar
2008-03-04 17:19                           ` Linus Torvalds
2008-03-04 17:38                             ` Greg KH
2008-03-04 17:45                             ` Pavel Roskin
2008-03-04 21:20                               ` Ingo Molnar
2008-03-04 23:23                                 ` Pavel Roskin
2008-03-04 20:51                             ` Ingo Molnar [this message]
2008-03-04 23:25                               ` Jiri Kosina
2008-03-05 13:21                                 ` Ingo Molnar
2008-02-29 17:18         ` Jon Masters
2008-02-29 21:55           ` Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080304205117.GA21803@elte.hu \
    --to=mingo@elte.hu \
    --cc=gregkh@suse.de \
    --cc=jcm@jonmasters.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=proski@gnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@linux-foundation.org \
    --cc=zlynx@acm.org \
    --subject='Re: [PATCH 2.6.25] module: allow ndiswrapper to use GPL-only symbols' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).