On Sun, 2007-03-25 at 10:52 -0400, Jeff Dike wrote: > On Sat, Mar 24, 2007 at 11:36:28PM -0400, Daniel Gryniewicz wrote: > > Update: isn't there either, but includes > > user_regs_struct, so that's sufficient for this problem. > > Hummph, I hope that's true of every other distro that people use UML on. Bad news: It has user_regs_struct, but not user_i387_struct or user_fxsr_struct (at least not on x86_64). > > The next problem is lack of . Most files failing to build > > with it can simply have it removed. I've temporarily replaced PAGE_SIZE > > with sysconf(_SC_PAGESIZE) for now, and we'll see how that works. > > Send patches. > > BTW, the important thing about PAGE_SIZE in the userspace side of UML > is not that it be the same as sysconf(_SC_PAGESIZE) but that it match > the value of PAGE_SIZE in the kernelspace side. Obviously, these > values will all be the same everywhere that we care about now, but I > can think of one or two situations where it would matter. On an > architecture with a variable page size, the UML kernel can have a > PAGE_SIZE of 64K but the host's sysconf can report a page size of 4K. > In this case, it's important that PAGE_SIZE in UML userspace code be > 64K. > > So, there's UM_KERN_PAGE_SIZE in kern_constants.h which is derived > from the kernel's PAGE_SIZE and is usable in userspace files. Use > that instead of sysconf(). Thanks for the pointer. Here's a patch I've used to test. There are two problems with it. First, as mentioned above, I couldn't find two user structs anywhere in the gentoo headers. It's possibly we could convince the maintainers to add those back, since they're for gdb. I'm not sure, tho, so I just defined them inline for now. Second, PAGE_MASK and PAGE_SHIFT. These should be generated like UM_KERN_PAGE_SIZE above, but I wasn't able to find where they're generated (sorry, not up on my Kconfig magic...). That said, the patch *does* work here on my x86_64 box, both in native and on SUBARCH=i386 modes. I don't have any more exotic arches than that to test on. Daniel