Rob Landley | 1 Apr 2005 05:40

Re: 2.6.10 compilation error

On Thursday 31 March 2005 08:56 am, Marcus Hardt wrote:
> Hi Guys!
>
> Whenever I try to compile a 2.6 guest kernel, I get a compilation error:

2.6.11 (stock from kernel.org) was the first version to work for me out of the 
box.  You might want to try that.

Rob

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
Rob Landley | 1 Apr 2005 06:24

Re: Re: [patch 03/12] uml: export getgid for hostfs

On Thursday 31 March 2005 09:40 am, Christoph Hellwig wrote:
> > Sorry, I wasn't clear... I read *that* answer, but it says "as mentioned
> > in the discussion about ROOT_DEV", and I couldn't find it.
>
> That'd be:
>
> http://marc.theaimsgroup.com/?l=linux-fsdevel&m=110664428918937&w=2

As the only user who seems to be crazy enough to regularly run UML with a 
hostfs root (ala "./linux rootfstype=hostfs rw init=/bin/sh"), I'd just like 
to say that I'm fairly certain I'm _not_ using ROOT_DEV special casing (my 
root files actually do belong to root, I'm just borrowing the parent's 
filesystem to avoid the trouble of setting up a whole filesystem under 
loopback.)

And actually, the ROOT_DEV hack wouldn't help me, because my project is using 
a dirty trick where I make a loopback mounted ext2 image (which could easily 
be ramfs or tmpfs if my project didn't need 500 megs of scratch space), 
--bind mount all the directories from the parent I need into it, and chroot 
into it.  (Thus I have the parent's binaries and libraries, but the rest is 
writeable space I can mknod and chown and such in.)  This is done with a 
trivial shell script, the guts of which are:

-----------------------
for i in /*
do
  i="${i:1}"
  if [ "$i" != "lost+found" ]
  then
    if [ -h "$i" ]
(Continue reading)

Marcus Hardt | 1 Apr 2005 13:26
Picon

Re: 2.6.10 compilation error

Quoting Rob Landley
> On Thursday 31 March 2005 08:56 am, Marcus Hardt wrote:
> > Hi Guys!
> >
> > Whenever I try to compile a 2.6 guest kernel, I get a compilation error:
>
> 2.6.11 (stock from kernel.org) was the first version to work for me out of
> the box.  You might want to try that.

Thank you; this did the job. Enabling the ubd0 block device gave me a bootable 
image, finally :-)

--

-- 
Marcus

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
Blaisorblade | 1 Apr 2005 20:51
Picon
Favicon

Re: question about UML sigcontext in tt mode

On Thursday 31 March 2005 12:03, Alex LIU wrote:
> Hi,all:
>
> I have a question about the sigcontext in tt mode.The union uml_pt_regs is
> defined as below(in uml-2.6.7):
>
> --------------------------------
> union uml_pt_regs {
> #ifdef UML_CONFIG_MODE_TT
>  struct tt_regs {
>   long syscall;
>   void *sc;
>  } tt;
> #endif
> #ifdef UML_CONFIG_MODE_SKAS
>  struct skas_regs {
>   unsigned long regs[HOST_FRAME_SIZE];
>   unsigned long fp[HOST_FP_SIZE];
>   unsigned long xfp[HOST_XFP_SIZE];
>   unsigned long fault_addr;
>   unsigned long fault_type;
>   unsigned long trap_type;
>   long syscall;
>   int is_user;
>  } skas;
> #endif
> };
> -------------------------------------
>
> Then why the tt.sc is defined as void while not as struct sigcontext?
(Continue reading)

blaisorblade | 1 Apr 2005 22:05
Picon
Favicon

[patch 1/1] uml: fix compilation for __CHOOSE_MODE addition


From: Paolo 'Blaisorblade' Giarrusso <blaisorblade <at> yahoo.it>

I had added the __CHOOSE_MODE syntax to fix some warnings with newer GCC's in
the uml-fix-cond-expr-as-lvalues-warning patch.

Here is the update from the version I sent to make it work also when only one
mode (TT or SKAS) is enabled.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade <at> yahoo.it>
---

 linux-2.6.11-paolo/arch/um/include/choose-mode.h |   27 ++++++++---------------
 1 files changed, 10 insertions(+), 17 deletions(-)

diff -puN arch/um/include/choose-mode.h~uml-fix-cond-expr-as-lvalues-rediffed arch/um/include/choose-mode.h
---
linux-2.6.11/arch/um/include/choose-mode.h~uml-fix-cond-expr-as-lvalues-rediffed	2005-04-01
21:48:45.000000000 +0200
+++ linux-2.6.11-paolo/arch/um/include/choose-mode.h	2005-04-01 21:50:16.000000000 +0200
 <at>  <at>  -11,6 +11,13  <at>  <at> 
 #if defined(UML_CONFIG_MODE_TT) && defined(UML_CONFIG_MODE_SKAS)
 #define CHOOSE_MODE(tt, skas) (mode_tt ? (tt) : (skas))

+extern int mode_tt;
+static inline void *__choose_mode(void *tt, void *skas) {
+	return mode_tt ? tt : skas;
+}
+
+#define __CHOOSE_MODE(tt, skas) (*( (typeof(tt) *) __choose_mode(&(tt), &(skas))))
(Continue reading)

Blaisorblade | 1 Apr 2005 22:45
Picon
Favicon

Re: [uml-devel] Re: [stable] [patch 3/8] uml: quick fix syscall table [urgent]

On Wednesday 30 March 2005 21:05, Greg KH wrote:
> On Wed, Mar 30, 2005 at 07:33:48PM +0200, blaisorblade <at> yahoo.it wrote:
> > CC: <stable <at> kernel.org>
> >
> > *) Uml 2.6.11 does not compile with gcc 2.95.4 because some entries are
> > duplicated, and that GCC does not accept this (unlike gcc 3). Plus
> > various other bugs in the syscall table definitions:
> >
> >   *) 223 is a syscall hole (i.e. ni_syscall) only on i386, on x86_64 it's
> > a valid syscall (thus a duplicated one).
> >
> >   *) __NR_vserver must be only once with sys_ni_syscall, and not multiple
> >   times with different values!
> >
> >   *) syscalls duplicated in SUBARCHs and in common files (thus assigning
> > twice to the same array entry and causing the GCC 2.95.4 failure
> > mentioned above): sys_utimes, which is common, and sys_fadvise64_64,
> > sys_statfs64, sys_fstatfs64, which exist only on i386.
> >
> >   *) syscalls duplicated in each SUBARCH, to put in common files:
> >   sys_remap_file_pages, sys_utimes, sys_fadvise64
> >
> >   *) 285 is a syscall hole (i.e. ni_syscall) only on i386, on x86_64 the
> > range does not arrive to that point.
> >
> >   *) on x86_64, the macro name is __NR_kexec_load and not
> > __NR_sys_kexec_load. Use the correct name in either case.
> >
> > Note: as you can see, part of the syscall table definition in UML is
> > arch-independent (with everywhere defined syscalls), and part is
(Continue reading)

Peter | 4 Apr 2005 00:47
Favicon

2.6.9-bs7 panic on check_sysemu

I get this error starting up a 2.6.9-bs7 guest:

Checking syscall emulation patch for ptrace...<0>Kernel panic - not 
syncing: check_sysemu : expected SIGTRAP, got status = 256

The host is 2.6.8.1 with host-skas3-2.6.7-v2.patch.

The 2.6.9-bs7 kernel runs OK on my newer host kernels.

Is this a case where I should be upgrading my host kernels (will do that 
in time anyway)?

Or is there something that can be done on the guest to make it work on 
older kernels also?

Regards, Peter

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Jeff Dike | 4 Apr 2005 16:00

Re: question about UML sigcontext in tt mode

On Thu, Mar 31, 2005 at 06:03:34PM +0800, Alex LIU wrote:
> union uml_pt_regs {
> #ifdef UML_CONFIG_MODE_TT
> 	struct tt_regs {
> 		long syscall;
> 		void *sc;
> 	} tt;
> #endif
> };
> -------------------------------------
> 
> Then why the tt.sc is defined as void while not as struct sigcontext? Thanks!

Probably because you can't get a definition of struct sigcontext into 
processor.h and have it still compile.

Try #including sigcontext.h there and you'll see what I mean.

				Jeff

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Blaisorblade | 4 Apr 2005 15:32
Picon
Favicon

Re: 2.6.9-bs7 panic on check_sysemu

On Monday 04 April 2005 00:47, Peter wrote:
> I get this error starting up a 2.6.9-bs7 guest:
>
> Checking syscall emulation patch for ptrace...<0>Kernel panic - not
> syncing: check_sysemu : expected SIGTRAP, got status = 256
>
> The host is 2.6.8.1 with host-skas3-2.6.7-v2.patch.
>
> The 2.6.9-bs7 kernel runs OK on my newer host kernels.
>
> Is this a case where I should be upgrading my host kernels (will do that
> in time anyway)?

You simply need to update the SKAS patch version. -V2 is very old, and many 
bugs (including this, that is a bug in the SYSEMU part of the SKAS patch). 
Upgrading to -V7 for the SKAS patch, even on the same host kernel version 
(i.e. against 2.6.8.1), would fix that.

Also, some older guest kernels may seem to work, because they don't diagnose 
such bugs. But actually they have problems in some situations, because of the 
host bugs. For instance panicking with a simple "echo 0 > /proc/sysemu; echo 
1 > /proc/sysemu".

>
> Or is there something that can be done on the guest to make it work on
> older kernels also?
Not a lot, except disabling SYSEMU (and its performance advantage) entirely - 
add the "nosysemu" param to the UML command line and it will work.

But it won't be as slow as if you didn't use SKAS.
(Continue reading)

Bodo Stroesser | 4 Apr 2005 18:20

UML/s390 is up in SKAS0 mode

The first UML/s390 system is running (in SKAS0).

	Bodo
140lin3:/home2/uml0 # /usr/src/tmp/linux-2.6.11/vmlinux ubd0=sles9.rootfs.img ubd1=swap.img ssl=pts
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...missing
Checking if syscall restart handling in host can be skipped...OK
Checking for the skas3 patch in the host:
  - /proc/mm...not found
  - PTRACE_FAULTINFO...found
Checking PROT_EXEC mmap in /tmp...OK
Host doesn't provide PTRACE_GETREGS, going to use PTRACE_POKEUSR_AREA
Linux version 2.6.11 (root <at> s140lin3) (gcc version 3.2.2) #14 Thu Mar 24 16:57:24 CET 2005
Built 1 zonelists
Kernel command line: ubd0=sles9.rootfs.img ubd1=swap.img ssl=pts root=98:0
PID hash table entries: 256 (order: 8, 4096 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 28584k available
Security Framework v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
Checking for /dev/anon on the host...Not available (open failed with errno 2)
NET: Registered protocol family 16
mconsole (version 2) initialized on /root/.uml/EzYeVm/mconsole
(Continue reading)


Gmane