Skip to contentSkip to conversation

fix 2.6.0-test11 compilation problem

PATCH In review Ingo Molnar 8 participants 33 messages Dec 17, 2003 – Jan 5, 2004 3 messages not in the archive

Subsystems (4)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.58.0312171735540.8123@earth

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.58.0312171924290.12482@earth

#3 lore raw

PATCH 1/1 fix 2.6.0-test11 compilation problem

the simple patch below fixes 2.6.0-test11+uml-patch-2.6.0-test9-1 compilation if TT mode is disabled.

Ingo

arch/um/sys-i386/semaphore.c renamed from arch/um/sys-i386/semaphore.c.orig +1 -0
@@ -14,6 +14,7 @@
  */
 #include <linux/config.h>
 #include <linux/sched.h>
+#include <linux/errno.h>
 #include <asm/semaphore.h>
 
 /*

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#4 lore raw

Alle 22:40, mercoledì 17 dicembre 2003, Ingo Molnar ha scritto:

Quoted 2 lines

the simple patch below fixes 2.6.0-test11+uml-patch-2.6.0-test9-1 compilation if TT mode is disabled.

The error went away with 2.6.0, so the patch is no more needed.

The patched file is just a symlink to
arch/i386/kernel/semaphore.c

In fact in 2.6.0 they added at that place <linux/err.h>, which works.

Signature · 17 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#5 lore raw

[uml-devel] [bug] uml segfaults if forcing static link, 2.6.0-test11

In reply to a message not in the archive

the attached .config produces an UML binary that segfaults much the same way as before the ALIGN fixes. The thing that seems to cause it is the CONFIG_STATIC_LINK=y option. The kernel is 2.6.0-test11 + uml-patch-2.6.0-test9-1 + align_fix.

Program received signal SIGSEGV, Segmentation fault. 0xa0174578 in _dl_non_dynamic_init ()
(gdb) bt

  #0  0xa0174578 in _dl_non_dynamic_init ()
  #1  0xa0174746 in __libc_init_first ()
  #2  0xa0164a1d in __libc_start_main ()

Ingo

#
# Automatically generated make config: don't edit
#
CONFIG_USERMODE=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y

#
# UML-specific options
#
# CONFIG_MODE_TT is not set
CONFIG_STATIC_LINK=y
CONFIG_MODE_SKAS=y
CONFIG_NET=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_HOSTFS=y
# CONFIG_HPPFS is not set
CONFIG_MCONSOLE=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_HOST_2G_2G is not set
# CONFIG_UML_SMP is not set
# CONFIG_SMP is not set
CONFIG_NEST_LEVEL=0
CONFIG_KERNEL_HALF_GIGS=1
# CONFIG_HIGHMEM is not set
# CONFIG_PROC_MM is not set
CONFIG_KERNEL_STACK_ORDER=2

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
# CONFIG_CLEAN_COMPILE is not set
# CONFIG_STANDALONE is not set
CONFIG_BROKEN=y
CONFIG_BROKEN_ON_SMP=y

#
# General setup
#
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_SYSCTL=y
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_IKCONFIG is not set
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y

#
# Loadable module support
#
# CONFIG_MODULES is not set

#
# Generic Driver Options
#

#
# Character Devices
#
CONFIG_STDIO_CONSOLE=y
CONFIG_SSL=y
CONFIG_FD_CHAN=y
CONFIG_NULL_CHAN=y
CONFIG_PORT_CHAN=y
CONFIG_PTY_CHAN=y
CONFIG_TTY_CHAN=y
CONFIG_XTERM_CHAN=y
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
CONFIG_CON_CHAN="xterm"
CONFIG_SSL_CHAN="pty"
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
# CONFIG_WATCHDOG is not set
CONFIG_UML_SOUND=y
CONFIG_SOUND=y
CONFIG_HOSTAUDIO=y

#
# Block Devices
#
CONFIG_BLK_DEV_UBD=y
# CONFIG_BLK_DEV_UBD_SYNC is not set
CONFIG_BLK_DEV_COW_COMMON=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
# CONFIG_MMAPPER is not set
CONFIG_NETDEVICES=y

#
# UML Network Devices
#
CONFIG_UML_NET=y
CONFIG_UML_NET_ETHERTAP=y
CONFIG_UML_NET_TUNTAP=y
CONFIG_UML_NET_SLIP=y
CONFIG_UML_NET_DAEMON=y
CONFIG_UML_NET_MCAST=y
# CONFIG_UML_NET_PCAP is not set
CONFIG_UML_NET_SLIRP=y

#
# Networking support
#

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
# CONFIG_NETLINK_DEV is not set
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_IPV6 is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_NETFILTER is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
CONFIG_IPV6_SCTP__=y
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# QoS and/or fair queueing
#
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_DUMMY=y
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=y

#
# Ethernet (10 or 100Mbit)
#
# CONFIG_NET_ETHERNET is not set

#
# Ethernet (1000 Mbit)
#

#
# Ethernet (10000 Mbit)
#
CONFIG_PPP=y
# CONFIG_PPP_MULTILINK is not set
# CONFIG_PPP_FILTER is not set
# CONFIG_PPP_ASYNC is not set
# CONFIG_PPP_SYNC_TTY is not set
# CONFIG_PPP_DEFLATE is not set
# CONFIG_PPP_BSDCOMP is not set
# CONFIG_PPPOE is not set
CONFIG_SLIP=y
# CONFIG_SLIP_COMPRESSED is not set
# CONFIG_SLIP_SMART is not set
# CONFIG_SLIP_MODE_SLIP6 is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Token Ring devices
#
# CONFIG_SHAPER is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set

#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set

#
# IrDA (infrared) support
#
# CONFIG_IRDA is not set

#
# Bluetooth support
#
# CONFIG_BT is not set

#
# File systems
#
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT3_FS is not set
# CONFIG_JBD is not set
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
CONFIG_MINIX_FS=y
# CONFIG_ROMFS_FS is not set
CONFIG_QUOTA=y
# CONFIG_QFMT_V1 is not set
# CONFIG_QFMT_V2 is not set
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=y
CONFIG_AUTOFS4_FS=y

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_ZISOFS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
# CONFIG_DEVFS_DEBUG is not set
CONFIG_DEVPTS_FS=y
# CONFIG_DEVPTS_FS_XATTR is not set
# CONFIG_TMPFS is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_EXPORTFS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_NLS=y

#
# Native Language Support
#
CONFIG_NLS_DEFAULT="iso8859-1"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set

#
# Security options
#
# CONFIG_SECURITY is not set

#
# Cryptographic options
#
# CONFIG_CRYPTO is not set

#
# Library routines
#
# CONFIG_CRC32 is not set

#
# SCSI support
#
# CONFIG_SCSI is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Kernel hacking
#
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_INFO is not set

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#6 lore raw

Re: [uml-devel] [bug] uml segfaults if forcing static link, 2.6.0-test11

Quoted 2 lines · [email protected] said:

the attached .config produces an UML binary that segfaults much the same way as before the ALIGN fixes.

HAHAHA, there is justice in this world :-)

This one is your fault, I think.

See this patch and see if it fixes the problem:

	http://marc.theaimsgroup.com/?l=user-mode-linux-devel&m=106867347801038&w=2

				Jeff

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#7 lore raw

Re: [uml-devel] [bug] uml segfaults if forcing static link, 2.6.0-test11

Quoted 10 lines · Jeff Dike
Quoted 2 lines · [email protected] said:

the attached .config produces an UML binary that segfaults much the same way as before the ALIGN fixes.

HAHAHA, there is justice in this world :-)

This one is your fault, I think.

See this patch and see if it fixes the problem:

	http://marc.theaimsgroup.com/?l=user-mode-linux-devel&m=106867347801038&w=2

Though that isn't a complete solution, as the same issue causes a random amount less memory, averaging about 16M, to be allocated to the UML process, potentially causing out of memory problems, including a failure to boot at all.

For some other bugs you might see in FC1, see
http://toast.debian.net/~may/umlproject/bugs.html

Michael Young

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#8 lore raw

Re: [uml-devel] [bug] uml segfaults if forcing static link, 2.6.0-test11

In reply to Jeff Dike
Quoted 6 lines · Jeff Dike
Quoted 2 lines

the attached .config produces an UML binary that segfaults much the same way as before the ALIGN fixes.

HAHAHA, there is justice in this world :-)

This one is your fault, I think.

i might be at fault for the FC1 problems :-) [*], but this one doesnt seem to be my doing:

  $ uname -a
  Linux asia 2.6.0-test11 #1 Wed Dec 17 21:52:45 CET 2003 i686 i686 i386 
  $ ./linux
  Segmentation fault

i tried various other, non-Fedora kernels too, and it segfaults everywhere.

Ingo

[*] wrt. FC1, running "i386 ./linux" should solve all problems - no need
to disable randomization. (this command reverts to the stock VM layout.) Alternatively, the UML build process could strip out the PT_GNU_STACK ELF section - that triggers the 'stock layout' too.

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#9 lore raw

PATCH 1/1 fix PTRACE_LDT, skas-fix-2.4.23-A0

the patch below (against the 2.4 host-skas patch) fixes a bug in the PTRACE_LDT logic: when modifying the LDT of another MM, the new LDT must not be loaded.

Ingo

arch/i386/kernel/ldt.c renamed from arch/i386/kernel/ldt.c.orig +2 -1
@@ -104,7 +104,8 @@ static int write_ldt(struct task_struct 
 		wmb();
 		mm->context.segments = segments;
 		mm->context.cpuvalid = 1UL << smp_processor_id();
-		load_LDT(mm);
+		if (current->active_mm == mm)
+			load_LDT(mm);
 	}
 
 	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.segments);

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#10 lore raw

PATCH 1/1 host-skas support for 2.6.0, other UML fixes

Jeff,

i've ported host-skas support to the 2.6.0 kernel. (patch attached.) The patching order is:

- create the 2.6.0 tree,
- apply user-mode-linux.org/mirror/uml-patch-2.6.0-test9-1.bz2,
- apply the attached uml-host-skas-2.6.0-A0 patch

other changes:

- cleaned up the LDT changes (pass around mm not task)
- fixed LDT flush bug (similar to the 2.4.23 one)

as an additional speedup, on 2.6.0 it's not necessary to copy the segments (LDTs) explicitly anymore, so the MM_COPY_SEGMENTS call is not needed. I've removed the code from UM architecture too, but kept a 0 return value for /proc/mm, so that older UML binaries keep working.

i've tested the resulting host kernel and UML kernel as well, works as expected. (Ran some LDT testcode too - that works fine as well.)

Ingo

arch/i386/kernel/sys_i386.c renamed from arch/i386/kernel/sys_i386.c.orig +6 -6
@@ -40,7 +40,7 @@ asmlinkage int sys_pipe(unsigned long __
 }
 
 /* common code for old and new mmaps */
-static inline long do_mmap2(
+long do_mmap2(struct mm_struct *mm,
 	unsigned long addr, unsigned long len,
 	unsigned long prot, unsigned long flags,
 	unsigned long fd, unsigned long pgoff)
@@ -55,9 +55,9 @@ static inline long do_mmap2(
 			goto out;
 	}
 
-	down_write(&current->mm->mmap_sem);
-	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
-	up_write(&current->mm->mmap_sem);
+	down_write(&mm->mmap_sem);
+	error = do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
+	up_write(&mm->mmap_sem);
 
 	if (file)
 		fput(file);
@@ -69,7 +69,7 @@ asmlinkage long sys_mmap2(unsigned long 
 	unsigned long prot, unsigned long flags,
 	unsigned long fd, unsigned long pgoff)
 {
-	return do_mmap2(addr, len, prot, flags, fd, pgoff);
+	return do_mmap2(current->mm, addr, len, prot, flags, fd, pgoff);
 }
 
 /*
@@ -100,7 +100,7 @@ asmlinkage int old_mmap(struct mmap_arg_
 	if (a.offset & ~PAGE_MASK)
 		goto out;
 
-	err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
+	err = do_mmap2(current->mm, a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
 out:
 	return err;
 }
arch/i386/kernel/ptrace.c renamed from arch/i386/kernel/ptrace.c.orig +49 -0

61 lines not on this page · raw message

arch/i386/kernel/ldt.c renamed from arch/i386/kernel/ldt.c.orig +15 -10
@@ -54,7 +54,7 @@ static int alloc_ldt(mm_context_t *pc, i
 	pc->size = mincount;
 	wmb();
 
-	if (reload) {
+	if (reload && (&current->active_mm->context == pc)) {
 #ifdef CONFIG_SMP
 		cpumask_t mask;
 		preempt_disable();
@@ -121,11 +121,11 @@ void destroy_context(struct mm_struct *m
 	}
 }
 
-static int read_ldt(void __user * ptr, unsigned long bytecount)
+static int read_ldt(struct mm_struct * mm, void __user * ptr,
+		    unsigned long bytecount)
 {
 	int err;
 	unsigned long size;
-	struct mm_struct * mm = current->mm;
 
 	if (!mm->context.size)
 		return 0;
@@ -169,9 +169,8 @@ static int read_default_ldt(void __user 
 	return err;
 }
 
-static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
+static int write_ldt(struct mm_struct * mm, void __user * ptr, unsigned long bytecount, int oldmode)
 {
-	struct mm_struct * mm = current->mm;
 	__u32 entry_1, entry_2, *lp;
 	int error;
 	struct user_desc ldt_info;
@@ -195,7 +194,7 @@ static int write_ldt(void __user * ptr, 
 
 	down(&mm->context.sem);
 	if (ldt_info.entry_number >= mm->context.size) {
-		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
+		error = alloc_ldt(&mm->context, ldt_info.entry_number+1, 1);
 		if (error < 0)
 			goto out_unlock;
 	}
@@ -228,23 +227,29 @@ out:
 	return error;
 }
 
-asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
+int modify_ldt(struct mm_struct * mm, int func, void __user *ptr,
+	       unsigned long bytecount)
 {
 	int ret = -ENOSYS;
 
 	switch (func) {
 	case 0:
-		ret = read_ldt(ptr, bytecount);
+		ret = read_ldt(mm, ptr, bytecount);
 		break;
 	case 1:
-		ret = write_ldt(ptr, bytecount, 1);
+		ret = write_ldt(mm, ptr, bytecount, 1);
 		break;
 	case 2:
 		ret = read_default_ldt(ptr, bytecount);
 		break;
 	case 0x11:
-		ret = write_ldt(ptr, bytecount, 0);
+		ret = write_ldt(mm, ptr, bytecount, 0);
 		break;
 	}
 	return ret;
 }
+
+asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
+{
+	return modify_ldt(current->mm, func, ptr, bytecount);
+}
arch/i386/Kconfig renamed from arch/i386/Kconfig.orig +3 -0
@@ -692,6 +692,9 @@ config X86_PAE
 	depends on HIGHMEM64G
 	default y
 
+config PROC_MM
+	bool "/proc/mm support"
+
 # Common NUMA Features
 config NUMA
 	bool "Numa Memory Allocation Support"
arch/um/kernel/skas/process.c renamed from arch/um/kernel/skas/process.c.orig +3 -13
@@ -343,20 +343,10 @@ int new_mm(int from)
 	int n, fd = os_open_file("/proc/mm", 
 				 of_cloexec(of_write(OPENFLAGS())), 0);
 
-	if(fd < 0)
-		return(-errno);
+	if (fd < 0)
+		return -errno;
 
-	if(from != -1){
-		copy = ((struct proc_mm_op) { .op 	= MM_COPY_SEGMENTS,
-					      .u 	= 
-					      { .copy_segments	= from } } );
-		n = os_write_file(fd, &copy, sizeof(copy));
-		if(n != sizeof(copy)) 
-			printk("new_mm : /proc/mm copy_segments failed, "
-			       "errno = %d\n", errno);
-	}
-
-	return(fd);
+	return fd;
 }
 
 void switch_mm_skas(int mm_fd)
include/linux/mm.h renamed from include/linux/mm.h.orig +5 -0
@@ -520,6 +520,11 @@ extern void exit_mmap(struct mm_struct *
 
 extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
 
+extern long do_mmap2(struct mm_struct *mm, unsigned long addr,
+		     unsigned long len, unsigned long prot,
+		     unsigned long flags, unsigned long fd,
+		     unsigned long pgoff);
+
 extern unsigned long do_mmap_pgoff(struct mm_struct *mm, struct file *file, 
 				   unsigned long addr, unsigned long len,
 				   unsigned long prot, unsigned long flag,
include/linux/ptrace.h renamed from include/linux/ptrace.h.orig +16 -0
@@ -21,6 +21,22 @@
 
 #define PTRACE_SYSCALL		  24
 
+#define PTRACE_FAULTINFO	  52
+#define PTRACE_SIGPENDING	  53
+#define PTRACE_LDT		  54
+#define PTRACE_SWITCH_MM 	  55
+
+struct ptrace_faultinfo {
+	int is_write;
+	unsigned long addr;
+};
+
+struct ptrace_ldt {
+	int func;
+  	void *ptr;
+	unsigned long bytecount;
+};
+
 /* 0x4200-0x4300 are reserved for architecture-independent additions.  */
 #define PTRACE_SETOPTIONS	0x4200
 #define PTRACE_GETEVENTMSG	0x4201
include/asm-i386/desc.h renamed from include/asm-i386/desc.h.orig +3 -0
@@ -123,6 +123,9 @@ static inline void load_LDT(mm_context_t
 	put_cpu();
 }
 
+extern int modify_ldt(struct mm_struct * mm, int func, void __user *ptr,
+		      unsigned long bytecount);
+
 #endif /* !__ASSEMBLY__ */
 
 #endif
mm/proc_mm.c renamed from mm/proc_mm.c.orig +4 -15
@@ -33,11 +33,6 @@ struct mm_struct *proc_mm_get_mm(int fd)
 	return(ret);
 }
 
-extern long do_mmap2(struct mm_struct *mm, unsigned long addr, 
-		     unsigned long len, unsigned long prot, 
-		     unsigned long flags, unsigned long fd,
-		     unsigned long pgoff);
-
 static ssize_t write_proc_mm(struct file *file, const char *buffer,
 			     size_t count, loff_t *ppos)
 {
@@ -85,17 +80,11 @@ static ssize_t write_proc_mm(struct file
 		break;
 	}
 
-	case MM_COPY_SEGMENTS: {
-		struct mm_struct *from = proc_mm_get_mm(req.u.copy_segments);
-
-		if(IS_ERR(from)){
-			ret = PTR_ERR(from);
-			break;
-		}
-
-		mm_copy_segments(from, mm);
+	/* Not necessary anymore - for compatibility only */
+	case MM_COPY_SEGMENTS:
+		ret = 0;
 		break;
-	}
+
 	default:
 		ret = -EINVAL;
 		break;
#11 lore raw

[uml-devel] Re: [patch] host-skas support for 2.6.0, other UML fixes

the attached patch is necessary in addition to the previous ones, to get a unified 2.6.0 UML tree: both UML and the host-kernel can be compiled cleanly from the same tree.

To 'replicate' an existing tree, i use the following method:

	cd linux-host
	make mrproper
	cd ..
	cp -rl linux-host linux-UML

this creates a hard-linked clone of the kernel tree. Now the linux-host kernel and the linux-UML kernels can be configured & compiled independently. Any change to an existing source file in one tree will affect the other tree too.

Ingo

arch/um/kernel/ptrace.c renamed from arch/um/kernel/ptrace.c.orig +0 -5
@@ -24,11 +24,6 @@ void ptrace_disable(struct task_struct *
 { 
 }
 
-extern long do_mmap2(struct task_struct *task, unsigned long addr, 
-		     unsigned long len, unsigned long prot, 
-		     unsigned long flags, unsigned long fd,
-		     unsigned long pgoff);
-
 int sys_ptrace(long request, long pid, long addr, long data)
 {
 	struct task_struct *child;
arch/um/include/skas_ptrace.h renamed from arch/um/include/skas_ptrace.h.orig +6 -0
@@ -6,6 +6,10 @@
 #ifndef __SKAS_PTRACE_H
 #define __SKAS_PTRACE_H
 
+
+#ifndef _LINUX_PTRACE_STRUCT_DEF
+#define _LINUX_PTRACE_STRUCT_DEF
+
 struct ptrace_faultinfo {
 	int is_write;
 	unsigned long addr;
@@ -17,6 +21,8 @@ struct ptrace_ldt {
 	unsigned long bytecount;
 };
 
+#endif
+
 #define PTRACE_FAULTINFO 52
 #define PTRACE_SIGPENDING 53
 #define PTRACE_LDT 54
include/linux/ptrace.h renamed from include/linux/ptrace.h.orig +6 -0
@@ -26,6 +26,10 @@
 #define PTRACE_LDT		  54
 #define PTRACE_SWITCH_MM 	  55
 
+
+#ifndef _LINUX_PTRACE_STRUCT_DEF
+#define _LINUX_PTRACE_STRUCT_DEF
+
 struct ptrace_faultinfo {
 	int is_write;
 	unsigned long addr;
@@ -37,6 +41,8 @@ struct ptrace_ldt {
 	unsigned long bytecount;
 };
 
+#endif
+
 /* 0x4200-0x4300 are reserved for architecture-independent additions.  */
 #define PTRACE_SETOPTIONS	0x4200
 #define PTRACE_GETEVENTMSG	0x4201

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#12 lore raw

PATCH 1/1 fixes for !CONFIG_PROC_MM, 2.6.0

the attached patch makes the combo 2.6.0 patch compile for the !CONFIG_PROC_MM case. (necessary if forcing TT mode by disabling skas.)

This is also a small cleanup as it moves the architecture-independent ptrace functions into the generic kernel/ptrace.c file.

i've also uploaded a new combo patch with the alignment fix plus these changes included:

    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

	Ingo
arch/i386/kernel/ptrace.c renamed from arch/i386/kernel/ptrace.c.orig +0 -23
@@ -521,12 +521,6 @@ asmlinkage int sys_ptrace(long request, 
 		break;
 	}
 
-	case PTRACE_SIGPENDING:
-		ret = copy_to_user((unsigned long *) data, 
-				   &child->pending.signal,
-				   sizeof(child->pending.signal));
-		break;
-
 	case PTRACE_LDT: {
 		struct ptrace_ldt ldt;
 
@@ -539,23 +533,6 @@ asmlinkage int sys_ptrace(long request, 
 		break;
 	}
 
-	case PTRACE_SWITCH_MM: {
-		struct mm_struct *old = child->mm;
-		struct mm_struct *new = proc_mm_get_mm(data);
-
-		if(IS_ERR(new)){
-			ret = PTR_ERR(new);
-			break;
-		}
-
-		atomic_inc(&new->mm_users);
-		child->mm = new;
-		child->active_mm = new;
-		mmput(old);
-		ret = 0;
-		break;
-	}
-
 	default:
 		ret = ptrace_request(child, request, addr, data);
 		break;
kernel/ptrace.c renamed from kernel/ptrace.c.orig +26 -0
@@ -316,6 +316,32 @@ int ptrace_request(struct task_struct *c
 	case PTRACE_SETSIGINFO:
 		ret = ptrace_setsiginfo(child, (siginfo_t __user *) data);
 		break;
+	case PTRACE_SIGPENDING:
+		ret = copy_to_user((unsigned long *) data, 
+				   &child->pending.signal,
+				   sizeof(child->pending.signal));
+		break;
+
+#ifdef CONFIG_PROC_MM
+	case PTRACE_SWITCH_MM:
+	{
+		struct mm_struct *old = child->mm;
+		struct mm_struct *new = proc_mm_get_mm(data);
+
+		if (IS_ERR(new)) {
+			ret = PTR_ERR(new);
+			break;
+		}
+
+		atomic_inc(&new->mm_users);
+		child->mm = new;
+		child->active_mm = new;
+		mmput(old);
+		ret = 0;
+		break;
+	}
+#endif
+
 	default:
 		break;
 	}

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#13 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

hi!
i need the following additional patch (see below) to sucessfully compile uml on a suse9 box. another candidate for your patchset, ingo?
(or should we blame gcc 3.1.1 ?)

regards
roland

Quoted 11 lines

with mode=tt the kernel runs. Then i tried another kernel from kernels.usermodelinux.org:
linux-2.4.23-rc3-djc3-6um (nomods)
and: it works.
I talked to david and he said the kernel builds without problems which is not the case on my host. I get this error:
bugs.c: In function `disable_lcall':
bugs.c:111: error: storage size of ldt' isn't known bugs.c:118: warning: implicit declaration of function modify_ldt' bugs.c:111: warning: unused variable `ldt'

Quoted 5 lines

which is fixed with a patch from:
http://people.0x63.nu/~andersg/uml-minor-fixes.diff

so, for now, i don't have more ideas to solve this Problem. If someone of you has an idea or fix, please commit ;)

----- Original Message -----
From: "Ingo Molnar" <[email protected]>
To: "UML devel list" <[email protected]>
Cc: "Jeff Dike" <[email protected]>
Sent: Thursday, December 18, 2003 3:24 PM
Subject: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

Quoted 91 lines

the attached patch makes the combo 2.6.0 patch compile for the !CONFIG_PROC_MM case. (necessary if forcing TT mode by disabling skas.)

This is also a small cleanup as it moves the architecture-independent ptrace functions into the generic kernel/ptrace.c file.

i've also uploaded a new combo patch with the alignment fix plus these changes included:

    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

Ingo

arch/i386/kernel/ptrace.c renamed from arch/i386/kernel/ptrace.c.orig +0 -23
@@ -521,12 +521,6 @@ asmlinkage int sys_ptrace(long request, 
  break;
  }
 
- case PTRACE_SIGPENDING:
- ret = copy_to_user((unsigned long *) data, 
-    &child->pending.signal,
-    sizeof(child->pending.signal));
- break;
-
  case PTRACE_LDT: {
  struct ptrace_ldt ldt;
 
@@ -539,23 +533,6 @@ asmlinkage int sys_ptrace(long request, 
  break;
  }
 
- case PTRACE_SWITCH_MM: {
- struct mm_struct *old = child->mm;
- struct mm_struct *new = proc_mm_get_mm(data);
-
- if(IS_ERR(new)){
- ret = PTR_ERR(new);
- break;
- }
-
- atomic_inc(&new->mm_users);
- child->mm = new;
- child->active_mm = new;
- mmput(old);
- ret = 0;
- break;
- }
-
  default:
  ret = ptrace_request(child, request, addr, data);
  break;
kernel/ptrace.c renamed from kernel/ptrace.c.orig +26 -1
@@ -316,6 +316,32 @@ int ptrace_request(struct task_struct *c
  case PTRACE_SETSIGINFO:
  ret = ptrace_setsiginfo(child, (siginfo_t __user *) data);
  break;
+ case PTRACE_SIGPENDING:
+ ret = copy_to_user((unsigned long *) data, 
+    &child->pending.signal,
+    sizeof(child->pending.signal));
+ break;
+
+#ifdef CONFIG_PROC_MM
+ case PTRACE_SWITCH_MM:
+ {
+ struct mm_struct *old = child->mm;
+ struct mm_struct *new = proc_mm_get_mm(data);
+
+ if (IS_ERR(new)) {
+ ret = PTR_ERR(new);
+ break;
+ }
+
+ atomic_inc(&new->mm_users);
+ child->mm = new;
+ child->active_mm = new;
+ mmput(old);
+ ret = 0;
+ break;
+ }
+#endif
+
  default:
  break;
  }
 
 
-------------------------------------------------------
Quoted 9 lines

This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#14 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

Quoted 3 lines · roland

hi!
i need the following additional patch (see below) to sucessfully compile uml on a suse9 box. another candidate for your patchset, ingo? (or should we blame gcc 3.1.1 ?)

did you get the kernel running? I was able to compile on 9.0 but the kernel immedially segfaults after mounting /dev (its like a deadlock loop where it segfaults endless). I copied the sourcetree to another box (8.1) and compiled it there, works. Even with newer gcc's etc. the uml runs just fine, only compiled on 9.0 doesn't work.

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#15 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

hi sven,
do you use skas or tt mode?
i use skas - and the kernel works for me.

regards
roland

----- Original Message -----
From: "Sven 'Darkman' Michels" <[email protected]>
To: "UML devel list" <[email protected]>
Sent: Thursday, December 18, 2003 7:53 PM
Subject: Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

Quoted 16 lines
Quoted 4 lines · roland

hi!
i need the following additional patch (see below) to sucessfully compile uml on a suse9 box. another candidate for your patchset, ingo?
(or should we blame gcc 3.1.1 ?)

did you get the kernel running? I was able to compile on 9.0 but the kernel immedially segfaults after mounting /dev (its like a deadlock loop where it segfaults endless). I copied the sourcetree to another box (8.1) and compiled it there, works. Even with newer gcc's etc. the uml runs just fine, only compiled on 9.0 doesn't work.

Quoted 10 lines

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#16 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

In reply to Ingo Molnar
Quoted 1 line · Ingo Molnar
    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

Can't compile. Got the following error ...

my .config has these ...
# CONFIG_MODE_TT is not set
# CONFIG_STATIC_LINK is not set
CONFIG_MODE_SKAS=y

Also, Reiser4 patch linux-2.6.0-test9-reiser4.diff.gz can't be used with uml-combo-2.6.0-A2.

Thanks,
Jeff

make -f scripts/Makefile.build obj=arch/um/util
gcc -o arch/um/util/mk_task_user.o -c arch/um/util/mk_task_user.c
CC arch/um/util/mk_task_kern.o
In file included from include/asm/thread_info.h:13,

                 from include/linux/thread_info.h:21,
                 from include/linux/spinlock.h:12,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from arch/um/util/mk_task_kern.c:1:

include/asm/processor.h:66: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
include/asm/processor.h:66: requested alignment is not a constant arch/um/util/mk_task_kern.c: In function `main':
arch/um/util/mk_task_kern.c:13: structure has no member named `regs' make[1]: *** [arch/um/util/mk_task_kern.o] Error 1
make: *** [arch/um/util] Error 2

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#17 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

Quoted 11 lines · Jeff Chua
Quoted 1 line · Ingo Molnar
    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

Can't compile. Got the following error ...

make -f scripts/Makefile.build obj=arch/um/util
gcc -o arch/um/util/mk_task_user.o -c arch/um/util/mk_task_user.c
CC arch/um/util/mk_task_kern.o
In file included from include/asm/thread_info.h:13, include/asm/processor.h:66: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here

what does your include/asm link point to, isnt it asm-i386 by any chance? You need to do a 'make mrproper' when switching between architectures, otherwise stale stuff can be around. 'make clean' is not enough.

Ingo

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#18 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

In reply to Jeff Chua

Alle 05:35, venerdì 19 dicembre 2003, Jeff Chua ha scritto:

Quoted 4 lines · Ingo Molnar
Quoted 1 line
    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

Can't compile. Got the following error ...

This is known to be a problem with module support in 2.6.

Quoted 5 lines

include/asm/processor.h:66: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
include/asm/processor.h:66: requested alignment is not a constant arch/um/util/mk_task_kern.c: In function `main':
arch/um/util/mk_task_kern.c:13: structure has no member named `regs'

Onto plain -test9 patch(and even 2.6.0 kernel) or Ingo's combo, apply patches number 1, 2 and 3 from here and disable CONFIG_MODVERSIONS if it's enabled:

http://web.tiscali.it/no-redirect-tiscali/blaisorblade/linux/archives/UML/v1/index.html

If you get any "unresolved symbol" message, post it here, so the appropriate, straightforward fix(adding an EXPORT_SYMBOL(name_of_the_missing_symbol) in some .c file) will be included next time.
Bye

Signature · 17 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#19 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

In reply to Ingo Molnar
Quoted 10 lines · Ingo Molnar

the attached patch makes the combo 2.6.0 patch compile for the !CONFIG_PROC_MM case. (necessary if forcing TT mode by disabling skas.)

This is also a small cleanup as it moves the architecture-independent ptrace functions into the generic kernel/ptrace.c file.

i've also uploaded a new combo patch with the alignment fix plus these changes included:

    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

I have one minor complaint with this patch, you hardwire ARCH=um into the bottom level Makefile, which is fine in a pure uml patch, but horribly confusing if you are using it to build a host kernel.

Also somewhat off topic, what package is the i386 command in which you suggest as an alternate way to switch off exec-shield? I can't find it on my system.

Michael Young

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#20 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

Quoted 5 lines · M A Young
Quoted 1 line
    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

I have one minor complaint with this patch, you hardwire ARCH=um into the bottom level Makefile, which is fine in a pure uml patch, but horribly confusing if you are using it to build a host kernel.

oops, didnt mean to let this get into the patch. Fixed patch is at:

     redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A3

also, this patch does not have a number of fixes Jeff has in his tree. It's just a temporary thing for 2.6.0 users. Works for me, but YMMV.

Quoted 3 lines

Also somewhat off topic, what package is the i386 command in which you suggest as an alternate way to switch off exec-shield? I can't find it on my system.

it's an alias to 'setarch'. I use the one at:

ftp://ftp.rpmfind.net/linux/rawhide/1.0/i386/Fedora/RPMS/setarch-1.0-1.i386.rpm

You are right, it's not installed by default - it's used by the amd64 distros mostly.

Ingo

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#21 lore raw

Re: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0

Quoted 6 lines · Ingo Molnar

oops, didnt mean to let this get into the patch. Fixed patch is at:

     redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A3

also, this patch does not have a number of fixes Jeff has in his tree. It's just a temporary thing for 2.6.0 users. Works for me, but YMMV.

I realize that but a combined patch is useful if you want to build both host and uml kernels from the same rpm. I was actually trying the host part with arjan's 1.103 kernel (with some extra patching to your patch) and it seemed to be working until I ran of of diskspace. Incidentally, I am not sure doing the same thing with the uml kernel will quite work as I seem to recall that uml doesn't build if the exec-shield patch is applied.

Michael Young

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#22 lore raw

[uml-devel] new_mm : /proc/mm copy_segments failed, err = 0

In reply to Ingo Molnar
Quoted 10 lines · [email protected] said:

the attached patch makes the combo 2.6.0 patch compile for the !CONFIG_PROC_MM case. (necessary if forcing TT mode by disabling skas.)

This is also a small cleanup as it moves the architecture-independent ptrace functions into the generic kernel/ptrace.c file.

i've also uploaded a new combo patch with the alignment fix plus these changes included:

    redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A2

OK, I've complied a 2.6.0 host with this (and only this) -A2 patch for an SMP pentium III. The host is running debian unstable.

I also compiled a 2.4.23 uml kernel using uml-patch-2.4.22-7.bz2 and the small ELF_PLAT_INIT fix.

Using a very simple root_fs (it basically only contains a busybox /bin/sh and a statically compiled /bin/zsh4), the uml boots and detects skas3 and /proc/mm on the host.

The problem is that on every process fork, I see $Subject appear one or more times on the console, and subjectively the uml seems to be running a little slowly. Is this normal?

Jason

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#23 lore raw

Re: [uml-devel] new_mm : /proc/mm copy_segments failed, err = 0

Alle 20:09, venerdì 19 dicembre 2003, Jason Lunz ha scritto:

Quoted 3 lines

The problem is that on every process fork, I see $Subject appear one or more times on the console, and subjectively the uml seems to be running a little slowly. Is this normal?

No, it's a little bug from the host patch; to fix it, edit mm/proc_mm.c and find this code inside write_proc_mm function:

       /* Not necessary anymore - for compatibility only */
       case MM_COPY_SEGMENTS:
               ret = 0;

then replace the line "ret = 0; " with "ret = count;"
For Ingo: it's a write() call, after all, so it must return the count of "written" bytes... see the line above the switch().
Bye

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#24 lore raw

Re: [uml-devel] Re: [patch] host-skas support for 2.6.0, other UML fixes

In reply to Ingo Molnar

Alle 12:56, giovedì 18 dicembre 2003, Ingo Molnar ha scritto:

Quoted 10 lines

To 'replicate' an existing tree, i use the following method:

	cd linux-host
	make mrproper
	cd ..
	cp -rl linux-host linux-UML

this creates a hard-linked clone of the kernel tree. Now the linux-host kernel and the linux-UML kernels can be configured & compiled independently.

Since some time(a very little one) the build directory can be distinct from the source one; wouldn't this feature be fine for this purpose, with two different build dirs?

Quoted 2 lines

Any change to an existing source file in one tree will affect the other tree too.

For users(Ingo knows this, obviously): note that this is not true with patch:
when you patch one tree, the other tree remains unpatched. This happens since patch doesn't modify a file, but replaces it with another file(which is no more an hard link) containing the new version.

Bye

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#25 lore raw

PATCH 1/1 2.6.0 host-skas kernel & UML kernel patch

In reply to Ingo Molnar

for the lazy, i've distilled a combo patch that can be applied to a vanilla 2.6.0 kernel:

	redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A1

and will compile both as a working 2.6.0 UML kernel and as a working host-skas 2.6.0 kernel. Older UML kernels should work on this host-kernel too.

WARNING: this is an experimental patch, UML kernels compiled with this patch wont work in skas mode on older host-skas patched kernels. TT mode should work on older kernels, and so should this UML kernel work on all non-host-skas-patched host kernels.

(this patch consists of Jeff's uml-patch-2.6.0-test9-1 port, plus the host-skas fixes & compilation improvement patches.)

Ingo

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#26 lore raw

Re: [uml-devel] [UML combo patch] 2.6.0 host-skas kernel & UML kernel patch

Alle 13:15, giovedì 18 dicembre 2003, Ingo Molnar ha scritto:

Quoted 11 lines

for the lazy, i've distilled a combo patch that can be applied to a vanilla 2.6.0 kernel:

	redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A1

and will compile both as a working 2.6.0 UML kernel and as a working host-skas 2.6.0 kernel. Older UML kernels should work on this host-kernel too.

WARNING: this is an experimental patch, UML kernels compiled with this patch wont work in skas mode on older host-skas patched kernels.

Does this warning refers to any of the other patches you posted? To which one especially? Is this related to the removal of MM_COPY_SEGMENTS ?

Also, if there is any incompatibility, it should be named skas4. But since Jeff Dike's will release skas4, even improving skas3 by breaking compatibility is not useful. And if it is accepted, it should at least be released also for 2.4(the guest 2.4/2.6 choice must be unrelated to the host choice).

Bye, and thanks for your work here!

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#27 lore raw

Re: [uml-devel] [UML combo patch] 2.6.0 host-skas kernel & UML kernel patch

Quoted 6 lines · BlaisorBlade
Quoted 2 lines

WARNING: this is an experimental patch, UML kernels compiled with this patch wont work in skas mode on older host-skas patched kernels.

Does this warning refers to any of the other patches you posted? To which one especially? Is this related to the removal of MM_COPY_SEGMENTS ?

yes, it refers mostly to the removal of MM_COPY_SEGMENTS.

Quoted 5 lines

Also, if there is any incompatibility, it should be named skas4. But since Jeff Dike's will release skas4, even improving skas3 by breaking compatibility is not useful. And if it is accepted, it should at least be released also for 2.4(the guest 2.4/2.6 choice must be unrelated to the host choice).

skas4 will be nice, and since it will most likely be 2.6 based (?), it doesnt have the copy_segments problem.

Jeff, do you know how the new skas4 syscall API will look like, exactly?

Ingo

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#28 lore raw

Re: [uml-devel] [UML combo patch] 2.6.0 host-skas kernel & UML kernel patch

Quoted 1 line · Ingo Molnar

Jeff, do you know how the new skas4 syscall API will look like, exactly?

Pretty much. I have it implemented. It looks like this right now:
asmlinkage long sys_get_mm(void) - returns a file descriptor referring
to an empty mm

	asmlinkage long sys_mm_indirect(int fd, int syscall, long args[]) -

performs the system call (*sys_call_table)[syscall](args) in the context of the address space referred to by fd. The size of the args array is arch-dependent.

Some still-open questions
Should get_mm do a copy_segments from some other address space? If
so, if may need to take an argument specifying whether this should happen, and what address space to use.
Some system calls are problematic in the case of mm_indirect:
mm_indirect itself - a chain of them can be used to exhaust the kernel stack
exit, exec - these will cause mm_struct refcounting bugs in the current implementation.
The easy solution is to just disallow them, but I'm not sure that's right, especially in the case of exec.

PTRACE_MMAP, PTRACE_MUNMAP, and PTRACE_MPROTECT go away. PTRACE_SWITCH_MM stays.

Jeff

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#29 lore raw

Re: [uml-devel] [UML combo patch] 2.6.0 host-skas kernel & UML kernel patch

In reply to Ingo Molnar

Alle 22:16, venerdì 19 dicembre 2003, Ingo Molnar ha scritto:

Quoted 3 lines · BlaisorBlade
Quoted 2 lines
Quoted 2 lines

WARNING: this is an experimental patch, UML kernels compiled with this patch wont work in skas mode on older host-skas patched kernels.

You mean that they won't work on 2.4 SKAS kernels or on 2.6 skas kernels without your change(i.e. there have been some other ports of Skas to 2.5/2.6, which didn't touch the actual code logic)? If I've understood you correctly, you must just re-add the MM_COPY_SEGMENTS call in the UML arch, while still making its implementation in the i386 arch as a no-op, to make us happy. Right? Could you do this?

Quoted 6 lines
Quoted 3 lines

Does this warning refers to any of the other patches you posted? To which one especially? Is this related to the removal of MM_COPY_SEGMENTS ?

yes, it refers mostly to the removal of MM_COPY_SEGMENTS.

Quoted 8 lines
Quoted 5 lines

Also, if there is any incompatibility, it should be named skas4. But since Jeff Dike's will release skas4, even improving skas3 by breaking compatibility is not useful. And if it is accepted, it should at least be released also for 2.4(the guest 2.4/2.6 choice must be unrelated to the host choice).

skas4 will be nice, and since it will most likely be 2.6 based (?), it doesnt have the copy_segments problem.

The patch is very useful, but I think that at least the MM_COPY_SEGMENTS change should be split out, since it is not backward compatible. Anything required to fix a bug can be put inside, but preserving it. So preserve binary compatibility with old host-skas kernels and old guest kernels.

Jeff has already refused patches for skas3(a cleanup actually, the one of renaming do_mmap_pgoff as __do_mmap_pgoff as I said you), which hadn't got any problem, just because he wants to release skas4.

Such a speedup could be useful maybe for skas4, but only maybe(i.e. since skas4 will have to be for 2.4 also, I think that MM_COPY_SEGMENTS can be made a no-op, but the guest must call it).

In fact, I think he planned skas 4 for 2.4; he said also it is almost ready, just has some problems with the two new syscall numbers. And UML development is still mainly on 2.4; fixes are applied currently on 2.4 tree, and at some moment will appear on the 2.6 one.

However, the one to refer to for such issues is actually Jeff Dike; this is only my VERY HUMBLE opinion; I'm answering just because I've been lurking on the ML's from enough time to understand the Jeff's plans.

Quoted 3 lines

Jeff, do you know how the new skas4 syscall API will look like, exactly?

Ingo

He mentioned that /proc/mm will be removed, and there will be two new
syscalls: one will be to create a new address space, and the second will be to use a certain context(i.e. a certain mm_struct) for any syscall from the guest to the host(I am not able to find his message, so this is what I remember). This design was agreed on by Jeff and Linus.

Btw: some changes in your patch are just build-generated files(headers, and symlinks in the arch/um/sys-i386 dir). Pay attention to making clean(or mrproper) next time before creating the patch. If you get some error from "sh" about SIZE and shell arithmetic, it's already fixed(in a thread from a few days ago).

Bye

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#30 lore raw

PATCH 1/1 uml-combo-2.6.0-A7

In reply to Ingo Molnar

here's a new combo all-in-one UML patch against the vanilla 2.6.0 kernel:

redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A7

i've merged the various fixes collected by Paolo, plus fixed a bug in the __do_mmap_pgoff() change that caused host kernel bootup hangs. The usual disclaimers wrt. devel patches apply.

Ingo

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#31 lore raw

Re: [uml-devel] [UML combo patch] uml-combo-2.6.0-A7

Alle 20:16, giovedì 1 gennaio 2004, Ingo Molnar ha scritto:

Quoted 6 lines

here's a new combo all-in-one UML patch against the vanilla 2.6.0 kernel:

redhat.com/~mingo/UML-patches/uml-combo-2.6.0-A7

i've merged the various fixes collected by Paolo,

Thanks for paying attention to my changes.

Quoted 2 lines

plus fixed a bug in
the __do_mmap_pgoff() change that caused host kernel bootup hangs.

Yes, I did experience problems with my guest kernel (and today I tracked it down to the E* patches), but I didn't know what it is... Aargh! A missing return! Ok, I'm too foolish. Thanks for finding it! (But why the hell GCC 3.2.2 doesn't warn about it?)

Two questions:
1) I've added the G-03(this fixes the empty /proc/kallsyms issue), H-03 and H-04(for Makefiles cleanups) patches. Would you try them?

2)Have you given a look to the mm/memory.c change (what I'd split into A-04)? Do you think that change can be safe even for the host kernel?

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#32 lore raw

Re: [uml-devel] [UML combo patch] uml-combo-2.6.0-A7

Quoted 7 lines · BlaisorBlade
Quoted 2 lines

plus fixed a bug in
the __do_mmap_pgoff() change that caused host kernel bootup hangs.

Yes, I did experience problems with my guest kernel (and today I tracked it down to the E* patches), but I didn't know what it is... Aargh! A missing return! Ok, I'm too foolish. Thanks for finding it! (But why the hell GCC 3.2.2 doesn't warn about it?)

yeah, interesting question. I tried a (very) fresh gcc snapshot too and it doesnt warn either. Ironically, the only compiler that warned about this was gcc296. (hah!) I filed a gcc bugreport.

Quoted 3 lines

Two questions:
1) I've added the G-03(this fixes the empty /proc/kallsyms issue), H-03 and H-04(for Makefiles cleanups) patches. Would you try them?

i'll try these too. Your bugfixes/collections are now perfectly fine for 2.6.0 UML experimentation so i'll use them instead of spinning my own ones. (your ones are also better split up.)

Quoted 2 lines

2)Have you given a look to the mm/memory.c change (what I'd split into A-04)? Do you think that change can be safe even for the host kernel?

tricky stuff - hand-building vmas is fragile like hell, and the vsyscall stuff is far from simple too. What is the main purpose of your change?

Ingo

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#33 lore raw

Re: [uml-devel] [UML combo patch] uml-combo-2.6.0-A7

Alle 11:11, lunedì 5 gennaio 2004, Ingo Molnar ha scritto:

Quoted 8 lines · BlaisorBlade
Quoted 3 lines

Two questions:
1) I've added the G-03(this fixes the empty /proc/kallsyms issue), H-03 and H-04(for Makefiles cleanups) patches. Would you try them?

i'll try these too. Your bugfixes/collections are now perfectly fine for 2.6.0 UML experimentation so i'll use them instead of spinning my own ones. (your ones are also better split up.)

Thanks, my first purpose has in fact been to make it ready for inclusion in mainline, and I've finally replaced the A-03 and A-04 patches, which couldn't be accepted probably.

Quoted 5 lines
Quoted 2 lines

2)Have you given a look to the mm/memory.c change (what I'd split into A-04)? Do you think that change can be safe even for the host kernel?

tricky stuff - hand-building vmas is fragile like hell, and the vsyscall stuff is far from simple too. What is the main purpose of your change?

It wasn't a change that *I* did. I just found that change inside the patch from Jeff Dike, and I separated it because I thought it was a bit risky for the host, but I wasn't able to replace it. In fact I've always been warning "apply that for UML and remove it for the host", even when I didn't understand it.

In fact now I've posted the B-02 patch which replaces it; for a complete description of the replacement, see the message (in this ML)"Replacement of A-04 patch for mm/memory.c for UML/2.6".

However, I just think that while mainstream kernel changed that piece of code from using FIXADDR_ to using FIXADDR_USER_, Jeff simply forgot to do this; the patch was meant just to fix compilation (FIXADDR_USER_START is not a compile-time constant for UML, so you can't compile mm/memory.c without a patch).

In fact, in older UML patches, the kernel code *did* use FIXADDR_START and the patch didn't change what the code did.

Also, for what I understand (I do want to be corrected if I'm wrong), the interested piece of code allows a user-space process to execute the vsyscall stub code, but it must not allow anything else to go in the process address space.

Bye and thanks for the interest!

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.23/2.6.0 on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#34 lore raw

Re: [uml-devel] [patch] host-skas support for 2.6.0, other UML fixes

In reply to Ingo Molnar

Alle 12:17, giovedì 18 dicembre 2003, Ingo Molnar ha scritto:

Quoted 5 lines

Jeff,

i've ported host-skas support to the 2.6.0 kernel. (patch attached.) The patching order is:

Quoted 7 lines

- create the 2.6.0 tree,
- apply user-mode-linux.org/mirror/uml-patch-2.6.0-test9-1.bz2,
- apply the attached uml-host-skas-2.6.0-A0 patch

other changes:

- cleaned up the LDT changes (pass around mm not task)

Some other ports of the SKAS3 patch to 2.6 did also this: rename the new version of do_mmap_pgoff as __do_mmap_pgoff, and put this new definition in the header:

static inline unsigned long do_mmap_pgoff(struct file * file,
unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long pgoff) {
__do_mmap_pgoff(current->mm, file, addr, len, prot, flags, pgoff); }

so we avoid breaking compatibility for possible other patches/other code. Bye

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#35 lore raw

Re: [uml-devel] [patch] fix PTRACE_LDT, skas-fix-2.4.23-A0

In reply to Ingo Molnar

Alle 11:27, giovedì 18 dicembre 2003, Ingo Molnar ha scritto:

Quoted 3 lines

the patch below (against the 2.4 host-skas patch) fixes a bug in the PTRACE_LDT logic: when modifying the LDT of another MM, the new LDT must not be loaded.

A previous thread(just above this one) is about a SKAS-caused panic; would you check if it can be anyhow related to this bug, or try finding the problem?

Bye

Signature · 16 lines
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.21/2.6.0-test on an i686; Linux registered user n. 292729
EOSIGN



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&opÌk
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel