From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Zachary Amsden <zach@vmware.com>
Cc: Andrew Morton <akpm@osdl.org>, Zachary Amsden <zamsden@gmail.com>,
Andi Kleen <ak@muc.de>, Petr Vandrovec <petr@vmware.com>,
Chris Wright <chrisw@sous-sol.org>,
Virtualization Mailing List <virtualization@lists.osdl.org>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC, PATCH 5/5] Paravirt_ops export.patch
Date: Mon, 23 Apr 2007 15:15:40 -0700 [thread overview]
Message-ID: <462D300C.8000700@goop.org> (raw)
In-Reply-To: <462D2AF9.9010609@vmware.com>
Zachary Amsden wrote:
> Jeremy Fitzhardinge wrote:
>>
>> Well, the BUG is if the patch-size is smaller than sizeof(indirect
>> call). Or more generally, if the patch site contains bogus crud. But I
>> don't think checking for that in the patcher makes a great deal of
>> sense.
>>
>
> True, it may not make a lot of sense to check there. But it is the
> only place where we can check it at runtime. Unless you want some
> kind of compile time checking in the code which generates the patch
> data, say perhaps a .abort. Still, that is not safe against modules
> which have broken paravirt-ops embedding.
Well, they shouldn't be doing it for themselves; it will always be as a
result of some macro expansion from asm/paravirt.h. And if they're
broken in a module, they'll be broken in the kernel too.
And you should be able to check for patch-site sanity by booting on
native with patching disabled. That should fall over pretty quickly if
there's something wrong.
> Since there are so few of these sites, and they are performance
> critical, the placement of a BUG() here verifying the clobbers are ok
> effectively makes it the paravirt-op backend's responsibility to
> ensure that these sites get patched. This is what would allow the
> removal of dependence on the paravirt_ops symbol for the most
> important interrupt control operations.
I'm not keen on *requiring* patching to occur, in general. The
performance without patching is only a few percent worse than
native/patched, so its not like its a desperate problem to defer
implementing it. (I.e, requiring patching just raises the
implementation barrier for a pv_ops backend.)
Overloading patching for dealing with module exports is interesting, but
well, I guess I don't see the problem in just exporting paravirt_ops.
The two arguments I've seen against it are "security" and "GPL issues",
but neither seems particularly good.
> It's semantically the same, but the code needs to be re-usable later,
> which is where the problems arise - you can't simply cram the prelink
> code into head.S, but have to write it to be properly callable later on.
I think that's OK. It can just be plain C code, with very few
infrastructure dependencies. It wouldn't need to allocate memory, for
example. It should be fairly simple to make the code callable either
from early in the kernel's life or later on.
J
next prev parent reply other threads:[~2007-04-23 22:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 1:53 [RFC, PATCH 5/5] Paravirt_ops export.patch Zachary Amsden
2007-04-20 5:10 ` Jeremy Fitzhardinge
2007-04-22 14:28 ` Eric W. Biederman
2007-04-22 16:20 ` Jeremy Fitzhardinge
2007-04-22 16:59 ` Zachary Amsden
2007-04-22 17:31 ` Jeremy Fitzhardinge
2007-04-23 20:53 ` Zachary Amsden
2007-04-23 21:14 ` Eric W. Biederman
2007-04-23 21:40 ` Zachary Amsden
2007-04-23 21:29 ` Jeremy Fitzhardinge
2007-04-23 21:54 ` Zachary Amsden
2007-04-23 22:15 ` Jeremy Fitzhardinge [this message]
2007-04-23 22:24 ` Zachary Amsden
2007-04-23 22:29 ` Andi Kleen
2007-04-22 23:57 ` Rusty Russell
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=462D300C.8000700@goop.org \
--to=jeremy@goop.org \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=chrisw@sous-sol.org \
--cc=ebiederm@xmission.com \
--cc=mingo@elte.hu \
--cc=petr@vmware.com \
--cc=virtualization@lists.osdl.org \
--cc=zach@vmware.com \
--cc=zamsden@gmail.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).