> Yes, things like kvm_lapic_state are way too big to be on the stack.
I had a quick look at the code, and my worry about dynamic allocation
would be that handling allocation failure seems like it might get
tricky. Eg for handling struct kvm_pv_mmu_op_buffer (which is 528 bytes
on the stack in kvm_pv_mmu_op()) can you deal with an mmu op failing?
(maybe in that case you can easily by just setting *ret to 0?)
> There's an additional problem here, that apparently your gcc (which
> version?) doesn't fold objects in a switch statement into the same
> stack slot:
>
> switch (...) {
> case x: {
> struct medium a;
> ...
> }
> case y:
> struct medium b;
> ...
> }
> };
A trick for this is to do:
union {
struct medium1 a;
struct medium2 b;
} u;
switch (...) {
case x:
use u.a;
...
case y:
use u.b;
...
}
--
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Linus Torvalds | Linux 2.6.27 |
| Eric Paris | [RFC 0/5] [TALPA] Intro to a linux interface for on access scanning |
git: | |
| Denis Bueno | Recovering from repository corruption |
| Linus Torvalds | I'm a total push-over.. |
| J. Bruce Fields | "failed to read delta base object at..." |
| Robin Rosenberg | Re: [wishlist] graphical diff |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Richard Stallman | Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Paolo Supino | order |
| Simon Horman | Possible regression in HTB |
| Corey Hickey | SFQ: backport some features from ESFQ (try 4) |
| KOSAKI Motohiro | [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Ingo Molnar | Re: [crash] kernel BUG at net/core/dev.c:1328! |
| usb mic not detected | 6 minutes ago | Applications and Utilities |
| Problem in Inserting a module | 58 minutes ago | Linux kernel |
| Treason Uncloaked | 6 hours ago | Linux kernel |
| Shared swap partition | 17 hours ago | Linux general |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 2 days ago | Applications and Utilities |
| the kernel how to power off the machine | 2 days ago | Linux kernel |
| Easter Eggs in windows XP | 2 days ago | Windows |
| Root password | 2 days ago | Linux general |
| Where/when DNOTIFY is used? | 2 days ago | Linux kernel |
