[uml-devel] [PATCH] [PATCH] uml: fix static linking for real

2007-03-30 Thread Paolo 'Blaisorblade' Giarrusso
There was a typo in commit 7632fc8f809a97f9d82ce125e8e3e579390ce2e5, preventing it from working - 32bit binaries crashed hopelessly before the below fix and work perfectly now. Merge for 2.6.21, please. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- include/asm-um

[uml-devel] [PATCH 03/11] uml - hostfs: make hostfs= option work as a jail, as intended.

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] When a given host directory is specified to be mounted both in hostfs=path1 and with mount option -o path2, we should give access to path1/path2, but this does not happen. Fix that in the simpler way. Also, root_ino can be the empty string

[uml-devel] [PATCH 08/11] uml: mark both consoles as CON_ANYTIME

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Since both UML consoles do not use percpu variables, they may be called when the cpu is still offline, and they may be marked CON_ANYTIME (this is documented in kernel/printk.c, grep for CON_ANYTIME to find mentions of this). Works well

[uml-devel] [PATCH 05/11] hostfs: rename some vars for clarity

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] * rename name to host_root_path * rename data to req_root. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- fs/hostfs/hostfs_kern.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions

[uml-devel] [PATCH 09/11] uml: fix confusion irq early reenabling

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fix confusion about call context - comments and code are inconsistent and plain wrong, my fault. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/line.c |6 +++--- 1 files changed, 3 insertions(+), 3

[uml-devel] [PATCH 02/11] uml - hostfs: fix double free

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fix double free in the error path - when name is assigned into root_inode we do not own it any more and we must not kfree() it - see patch for details. Thanks to William Stearns for the initial report. CC: William Stearns [EMAIL PROTECTED

[uml-devel] [PATCH 06/11] uml: fix a memory leak in the multicast driver

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Memory allocated by mcast_user_init must be freed in the matching mcast_remove. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/mcast_user.c | 10 +- 1 files changed, 9 insertions(+), 1

[uml-devel] [PATCH 10/11] uml - activate_fd: return ENOMEM only when appropriate

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Avoid returning ENOMEM in case of a duplicate IRQ - ENOMEM was saved into err earlier. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/kernel/irq.c |1 + 1 files changed, 1 insertions(+), 0 deletions

[uml-devel] [PATCH 07/11] uml: remove dead code about os_usr1_signal() and os_usr1_process()

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] os_usr1_signal() is totally unused, os_usr1_process() is used only by TT mode. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/include/os.h |3 ++- arch/um/os-Linux/process.c |3 +++ arch/um/os

[uml-devel] [PATCH 11/11] uml: fix errno usage

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Avoid reusing userspace errno twice - it can be cleared by libc code everywhere (in particular printk() does clear it in my setup). Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/daemon_user.c | 17

[uml-devel] [PATCH 1/2] uml: make sigio_lock() irq-safe

2007-03-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] sigio_lock is taken both from process context and from interrupt context. So we *must* use irqsave. Then, remove irq disabling from update_thread(), as it's called with sigio_lock() held (yes, set_signals(0) is local_irq_save). In fact

[uml-devel] x86_64: PTRACE_[GS]ET_THREAD_AREA should be accepted

2007-02-21 Thread Paolo 'Blaisorblade' Giarrusso
: Andi Kleen [EMAIL PROTECTED] Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Index: linux-2.6.18/arch/x86_64/ia32/ptrace32.c === --- linux-2.6.18.orig/arch/x86_64/ia32/ptrace32.c +++ linux-2.6.18/arch/x86_64/ia32/ptrace32

[uml-devel] x86_64: fix 2.6.18 regression - PTRACE_OLDSETOPTIONS should be accepted

2007-02-14 Thread Paolo 'Blaisorblade' Giarrusso
was a style change - when a case is added, it must be explicitly tested this way. In this case, not enough testing was done. Cc: Andi Kleen [EMAIL PROTECTED] Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Index: linux-2.6.git/arch/x86_64/ia32/ptrace32.c

[uml-devel] [PATCH] uml: fix pte_mkread setting page read/write

2007-02-12 Thread Paolo 'Blaisorblade' Giarrusso
-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Index: linux-2.6.git/include/asm-um/pgtable.h === --- linux-2.6.git.orig/include/asm-um/pgtable.h +++ linux-2.6.git/include/asm-um/pgtable.h @@ -270,7 +270,7 @@ static inline

[uml-devel] [PATCH 1/2] Fix Remove the use of _syscallX macros in UML

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fix commit 5f4c6bc1f369f20807a8e753c2308d1629478c61: it spits out warnings about missing syscall prototype (it is in unistd.h) and it does not recognize that two uses of _syscallX are to be resolved against kernel headers in the source tree

[uml-devel] [PATCH 01/11] uml ubd driver: allow using up to 16 UBD devices

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] With 256 minors and 16 minors used per each UBD device, we can allow the use of up to 16 UBD devices per UML. Also chnage parse_unit and leave to the caller (which already do it) the check for excess numbers, since this is just supposed to do

[uml-devel] [PATCH 02/11] uml ubd driver: document some struct fields

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Add documentation about some fields in struct ubd, whose meaning is non-obvious due to struct names (should change names altogether, I agree). Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/ubd_kern.c

[uml-devel] [PATCH 00/11] UBD driver little cleanups for 2.6.19

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
Many cleanups for the UBD driver; these are mostly microfixes, I was waiting to finish and reorder also locking fixes (the code works, it is only to resplit, reproof-read and changelogs must be written) but I decided to send these ones for now. The rest will maybe be merged for 2.6.20. The only

[uml-devel] [PATCH 03/11] uml ubd driver: var renames

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Rename the ubd_dev array to ubd_devs and then call any struct ubd ubd_dev instead of dev, which doesn't make clear what we're treating (and no, it's not hungarian notation - not any more than calling all vm_area_struct vma or all inodes inode

[uml-devel] [PATCH 05/11] uml ubd driver: change ubd_lock to be a mutex

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] This lock protects ubd setup and teardown, so is only used in process context; beyond that, during such setup memory allocations must be performed and some generic functions which can sleep must be called (such as add_disk()). So the only

[uml-devel] [PATCH 06/11] uml ubd driver: ubd_io_lock usage fixup

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Add some comments about requirements for ubd_io_lock and expand its use. When an irq signals that the controller (i.e. another thread on the host, which does the actual requests and is the only one blocked on I/O on the host) has done some

[uml-devel] [PATCH 07/11] uml ubd driver: reformat ubd_config

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Pure whitespace and style fixes split out from subsequent patch. Some changes (err - ret) don't make sense now, only later, but I split them out anyway since they cluttered the patch. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL

[uml-devel] [PATCH 08/11] uml ubd driver: convert do_ubd to a boolean variable

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] do_ubd is actually just a boolean variable - the way it is used currently is a leftover from the old 2.4 block layer, but it is still used; its use is suspicious, but removing it would be too intrusive for now and needs more thinking. Signed

[uml-devel] [PATCH 09/11] uml ubd driver: use bitfields where possible

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Use bitfields for boolean fields in ubd data structure. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/ubd_kern.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um

[uml-devel] [PATCH 10/11] uml ubd driver: do not store error codes as -fd

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] To simplify error handling, make sure fd is saved into ubd_dev-fd only when we are sure it is an fd and not an error code. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/ubd_kern.c | 17

[uml-devel] [PATCH 11/11] uml ubd driver: various little changes

2006-10-29 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fix a small memory leak in ubd_config, and clearify the confusion which lead to it. Then, some little changes not affecting operations - * move init functions together, * add a comment about a potential problem in case of some evolution

[uml-devel] uml: make Uml compile on FC6 kernel headers

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
works fine. Tested on x86-64. Signed-off-by: Ulrich Drepper [EMAIL PROTECTED] Cc: Jeff Dike [EMAIL PROTECTED] Cc: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/um/include/kern_util.h|1 - arch/um/sys-x86_64/stub_segv.c |1 - 2

[uml-devel] uml: remove warnings added by previous -stable patch

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Add needed includes for syscall() function, also to remove warnings spit out by GCC; they were added by previous -stable patch, and at least on my system (Ubuntu x86-64) these warnings do show up. Signed-off-by: Paolo 'Blaisorblade

[uml-devel] uml: fix processor selection to exclude unsupported processors and features

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
it; with this change, if one selects MK7 UML compiles (while it did not). Merged upstream; I'm resending since spam filters blocked my previous mail. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Index: linux-2.6.git/arch/i386/Kconfig.cpu

[uml-devel] [PATCH 00/10] Various UML patches for 2.6.19

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
Some other tested and little UML fixes for 2.6.19 (not all ones are oneliner, but those ones are tested). -- Inform me of my mistakes, so I can keep imitating Homer Simpson's Doh!. Paolo Giarrusso, aka Blaisorblade http://www.user-mode-linux.org/~blaisorblade Chiacchiera con i tuoi amici in tempo

[uml-devel] [PATCH 01/10] uml: remove some leftover PPC code

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] I happened to notice that this code is a leftover and it should be removed - since there are sporadical efforts to revive the PPC port doing such cleanups is not useless. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED

[uml-devel] [PATCH 02/10] uml: split memory allocation prototypes out of user.h

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] user.h is too generic a header name. I've split out allocation routines from it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/cow_sys.h|1 + arch/um/drivers/daemon_user.c

[uml-devel] [PATCH 05/10] uml: code convention cleanup of a file

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fix coding conventions violations is arch/um/os-Linux/helper.c. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/os-Linux/helper.c | 53 - 1 files changed, 28

[uml-devel] [PATCH 04/10] uml: make execvp safe for our usage

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Reimplement execvp for our purposes - after we call fork() it is fundamentally unsafe to use the kernel allocator - current is not valid there. So we simply pass to our modified execvp() a preallocated buffer. This fixes a real bug and works

[uml-devel] [PATCH 06/10] uml: reenable compilation of enable_timer, disabled by mistake

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] CONFIG_MODE_TT does not work there, the UML_ prefixed version must be used - this causes a link-time failure when CONFIG_MODE_TT is enabled (i.e. always here, never by Jeff). Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED

[uml-devel] [PATCH 09/10] uml: kconfig - silence warning

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Silence useless warning about undefined symbol in Kconfig. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/Kconfig.char |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/um

[uml-devel] [PATCH 10/10] uml: mmapper - remove just added but wrong const attribute

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] When enabling the mmapper driver I got warnings because this const miscdevice structure is passed to function as non-const pointer; unlike struct tty_operations, however, I verified that misc_{de,}register _do_ modify their parameter, so

[uml-devel] [PATCH 07/10] uml: use DEFCONFIG_LIST to avoid reading host's config

2006-10-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] This should make sure that, for UML, host's configuration files are not considered, which avoids various pains to the user. Our dependency are such that the obtained Kconfig will be valid and will lead to successful compilation - however

[uml-devel] [PATCH 06/14] uml: make UML_SETJMP always safe

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] If enable is moved by GCC in a register its value may not be preserved after coming back there with longjmp(). So, mark it as volatile to prevent this; this is suggested (it seems) in info gcc, when it talks about -Wuninitialized. I re-read

[uml-devel] [PATCH 09/14] uml: declare in Kconfig our partial LOCKDEP support

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Declare UML partial support for LOCKDEP - however IRQFLAGS tracing requires some coding which nobody did yet, so we cannot run full lockdep on UML. Grep for CONFIG_TRACE_IRQFLAGS on i386 code to find their implementation. Signed-off

[uml-devel] [PATCH 04/14] uml: readd forgot prototype

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] This was forgot in a previous patch so UML does not compile with TT mode enabled. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/include/os.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff

[uml-devel] [PATCH 02/14] uml: revert wrong patch

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Andi Kleen pointed out that -mcmodel=kernel does not make sense for userspace code and would stop everything from working, and pointed out the correct fix for the original bug (not easy to do for me). Reverts part of commit

[uml-devel] [PATCH 12/14] uml: remove duplicate export

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] The export is together with the definition, in arch/x86_64/lib/csum-partial.c, which is compiled in by arch/um/sys-x86_64/Makefile. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/sys-x86_64/ksyms.c |3

[uml-devel] [PATCH 00/14] UML: simple changes for 2.6.19

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
(including fixing up Pcap and crypto-modules compilation) * some longly needed changes to Kconfig entries (deprecate TT mode, update some comments, add HOST_VMSPLIT config option to match host's VMSPLIT option). -- Paolo 'Blaisorblade' Giarrusso Chiacchiera con i tuoi amici in tempo reale! http

[uml-devel] [PATCH 10/14] uml: allow using again x86/x86_64 crypto code

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Enable compilation of x86_64 crypto code;, and add the needed constant to make the code compile again (that macro was added to i386 asm-offsets between 2.6.17 and 2.6.18, in 6c2bb98bc33ae33c7a33a133a4cd5a06395fece5). Cc: Herbert Xu [EMAIL

[uml-devel] [PATCH 13/14] uml: deprecate CONFIG_MODE_TT

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Deprecate TT mode in Kconfig so that users won't select it, update the MODE_SKAS description (it was largely obsolete and misleadin) and btw describe advantages for high memory usage with CONFIG_STATIC_LINK. Signed-off-by: Paolo

[uml-devel] [PATCH 14/14] uml: allow finer tuning for host VMSPLIT setting

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Now that various memory splits are enabled, add a config option allowing the user to compile UML for its need - HOST_2G_2G allowed to choose either 3G/1G or 2G/2G, and enabling it reduced the usable virtual memory. Detecting this at run time

[uml-devel] [PATCH 07/14] uml: fix processor selection to exclude unsupported processors and features

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Makes UML compile on any possible processor choice. The two problems were: *) x86 code, when 386 is selected, checks at runtime boot_cpuflags, which we do not have. *) 3Dnow support for memcpy() et al. does not compile currently

[uml-devel] [PATCH 08/14] uml: fix uname under setarch i386

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] On a 64bit Uml, if run under setarch i386 (which a user did), uname() currently returns the obtained i686 as machine - fix that. Btw, I'm quite surprised that under setarch i386 a 64-bit binary can run. Cc: Andi Kleen [EMAIL PROTECTED

[uml-devel] uml: allow using again x86/x86_64 crypto code

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Enable compilation of x86_64 crypto code;, and add the needed constant to make the code compile again (that macro was added to i386 asm-offsets between 2.6.17 and 2.6.18, in 6c2bb98bc33ae33c7a33a133a4cd5a06395fece5). Signed-off-by: Paolo

[uml-devel] [PATCH 03/14] uml: correct removal of pte_mkexec

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Correct commit 5906e4171ad61ce68de95e51b773146707671f80 - this makes more sense: we turn pte_mkexec + pte_wrprotect to pte_mkread. However, due to a bug in pte_mkread, it does the exact same thing as pte_mkwrite, so this patch improves

[uml-devel] [PATCH 01/14] uml: fix compilation options for USER_OBJS

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Again, move inclusion of arch's Makefile after CFLAGS setting - I remember merging the same patch eons ago in 2.6, so I added a comment. I discovered this because debug info weren't enabled for USER_OBJS - they're compiled with USER_CFLAGS

[uml-devel] [PATCH 11/14] uml: asm offsets duplication removal

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Unify macros common to x86 and x86_64 kernel-offsets.h files. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/include/common-offsets.h | 10 ++ arch/um/include/sysdep-i386/kernel

[uml-devel] [PATCH 05/14] uml: make TT mode compile after setjmp-related changes

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Make TT mode compile after the introduction of klibc's implementation of setjmp. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/kernel/tt/uaccess_user.c |6 +++--- arch/um/os-Linux/tt.c|1

[uml-devel] uml: use DEFCONFIG_LIST to avoid reading host's config

2006-10-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] This should make sure that, for UML, host's configuration files are not considered, which avoids various pains to the user. Our dependency are such that the obtained Kconfig will be valid and will lead to successful compilation - however

[uml-devel] [PATCH 1/3] uml: use -mcmodel=kernel for x86_64

2006-08-06 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] We have never used this flag and recently one user experienced a complaining warning about this (there was a symbol in the positive half of the address space IIRC). So fix it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED

[uml-devel] [PATCH] uml: fix signal code x86-64 [for 2.6.15]

2006-06-05 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] The problems in this area came to light while fixing a compile failure with GCC 4, in commit bcb01b8a67476e6f748086e626df8424cc27036d. I went comparing this code with x86_64 frame construction (which we should ABI compatible

[uml-devel] [PATCH 5/7] uml: fix compilation and execution with hardened GCC

2006-04-30 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] To make some half-assembly stubs compile, disable various hardened GCC features: *) we can't make it build PIC code as we need %ebx to do syscalls and GCC wants it free for PIC *) we can't leave stack protection as the stub is moved

[uml-devel] [PATCH 0/7] Uml fixes for 2.6.17

2006-04-30 Thread Paolo 'Blaisorblade' Giarrusso
This series fixes one regression in the 2.6.17 cycle (the mismerge of a patch broke some code), makes UML compile run with GCC hardened and fixes some regressions of the compile infrastructure - special CFLAGS settings for some files, needed in some configurations (say with profiling enabled)

[uml-devel] [PATCH 7/7] uml: export symbols added by GCC hardened

2006-04-30 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] GCC hardened introduces additional symbol refererences (for the canary and friends), also in modules - add weak export_symbols for them. We already tested that the weak declaration creates no problem on both GCC's providing the function

[uml-devel] [PATCH 2/7] uml: search from uml_net in a more reasonable PATH

2006-04-30 Thread Paolo 'Blaisorblade' Giarrusso
From: Mattia Dongili [EMAIL PROTECTED] Append /usr/lib/uml to the existing PATH environment variable to let execvp() search uml_net in FHS compliant locations. Signed-off-by: Mattia Dongili [EMAIL PROTECTED] Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/os-Linux

[uml-devel] [PATCH 4/7] uml: use Kbuild tracking for all files and fix compilation output

2006-04-30 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Move the build of user-offsets to arch/um/sys-$(SUBARCH), where it's located. So we can also build it via Kbuild with its dependency tracking rather than by hand. While hacking here, fix also a lot of little cosmetic things. Signed-off

[uml-devel] [PATCH 10/17] uml: support sparse for userspace files

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Make sparse checker work for userspace files - it normally gets -nostdinc separately, so avoid having it for userspace files. Also, add -D$(SUBARCH) for multiarch hosts (i.e. AMD64 with compatibility headers). It works, the only problem

[uml-devel] [PATCH 11/17] uml: move outside spinlock call not needing it

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Move a call to kfree on a local variable out of a spinlock - there's no need to have it in. Done on a just merged patch. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/os-Linux/sigio.c |2 +- 1 files

[uml-devel] [PATCH 05/17] uml: fix format errors

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Now that GCC warns about format errors, fix them. Nothing able to cause a crash, however. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/slirp_user.c |2 +- arch/um/os-Linux/drivers

[uml-devel] [PATCH 16/17] uml: fix parallel make early failure on clean tree

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Parallel make failed once for me - fix this by adding the appropriate command (mkdir before creating a link in that dir). Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/Makefile |3 ++- 1 files changed, 2

[uml-devel] [PATCH 15/17] uml: local_irq_save, not local_save_flags

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] The call to local_save_flags seems bogus since it is followed by local_irq_restore, and it's intended to lock the list from concurrent mconsole_interrupt invocations. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch

[uml-devel] [PATCH 07/17] uml: fix extern-vs-static proto conflict in TLS code

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Move the prototype from arch-generic to arch-specific includes because on x86_64 these functions are two static inlines. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/include/kern_util.h |4 include

[uml-devel] [PATCH 12/17] uml: fix hang on run_helper() failure on uml_net

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fix an hang on a pipe when run_helper() fails when called by change_tramp() (i.e. when calling uml_net) - reproduced the bug and verified this fixes it. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers

[uml-devel] [PATCH 03/17] uml: fix 2 harmless cast warnings for 64-bit

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Fix two harmless warnings in 64-bit compilation (the 2nd doesn't trigger for now because of a missing __attribute((format)) for cow_printf, but next patches fix that). Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED

[uml-devel] [PATCH 14/17] uml: fix big stack user

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Switch this proc from storing 4k of data (a whole path) on the stack to keeping it on the heap. Maybe it's not called in process context but only in early boot context (where in UML you have a normal process stack on the host) but just

[uml-devel] [PATCH 01/17] uml: make 64-bit COW files compatible with 32-bit ones.

2006-04-07 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] This is the minimal fix to make 64-bit UML binaries create 32-bit compatible COW files and read them. I've indeed tested that current code doesn't do this - the code gets SIGFPE for a division by a value read at the wrong place, where 0

[uml-devel] [PATCH 5/7] uml - tls support: hack to make it compile on any host

2006-03-28 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Copy the definition of struct user_desc (with another name) for use by userspace sources (where we use the host headers, and we can't be sure about their content) to make sure UML compiles. Signed-off-by: Paolo 'Blaisorblade' Giarrusso

[uml-devel] [PATCH 2/7] uml: split ldt.h in arch-independent and arch-dependant code

2006-03-28 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] ldt-{i386,x86_64}.h is made of two different parts - some code for parsing of LDT descriptors, which is arch-dependant, and the code to handle uml_ldt_t (an LDT block inside UML), which is mostly arch-independant (among x86 and x86_64

[uml-devel] [PATCH 7/7] uml: check for differences in host support

2006-03-28 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] If running on an host not supporting TLS (for instance 2.4) we should report that cleanly to the user, instead of printing not comprehensible error 5 for that. Additionally, i386 and x86_64 support different ranges for user_desc-entry_number

[uml-devel] [PATCH 0/7] UML TLS support [for 2.6.17]

2006-03-28 Thread Paolo 'Blaisorblade' Giarrusso
This is UML support for TLS, which allows one to fully use NPTL glibc, finally, on a 2.6 host (either x86 or x86_64). This has been happily tested by many users and by us for some times and we've now fixed all known bugs, and tested with different glibc's. So this code can IMHO be merged finally.

[uml-devel] [PATCH 4/6] uml: os_connect_socket error path fixup

2006-02-21 Thread Paolo 'Blaisorblade' Giarrusso
Fix an fd leak and a return of -1 instead of -errno in the error path - this showed up in intensive testing of HPPFS, the os_connect_socket user. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/os-Linux/file.c | 19 ++- 1 files changed, 14

[uml-devel] [PATCH 2/6] uml: fix usage of kernel_errno in place of errno

2006-02-21 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] To avoid conflicts, in kernel files errno is expanded to kernel_errno, to distinguish it from glibc errno. In this case, the code wants to use the libc errno but the kernel one is used; in the other usage, we return errno in place of -errno

[uml-devel] [PATCH 5/6] uml: better error reporting for read_output

2006-02-21 Thread Paolo 'Blaisorblade' Giarrusso
Do precise error handling: print precise error messages, distinguishing short reads and read errors. This functions fails frequently enough for me so I bothered doing this fix. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/net_user.c | 34

[uml-devel] [PATCH 0/6] UML little patches for 2.6.16

2006-02-21 Thread Paolo 'Blaisorblade' Giarrusso
I'm sending some little fixups for inclusion 2.6.16. I've held some other fixes which need wider testing. Please merge now. -- Inform me of my mistakes, so I can keep imitating Homer Simpson's Doh!. Paolo Giarrusso, aka Blaisorblade (Skype ID PaoloGiarrusso, ICQ 215621894)

[uml-devel] [PATCH 6/6] uml: tidying COW code

2006-02-21 Thread Paolo 'Blaisorblade' Giarrusso
Improve (especially for coherence) some prototypes, and return code of init_cow_file in error case - for a short write return -EINVAL, otherwise return the error we got! Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/cow.h |2 +- arch/um/drivers

[uml-devel] [PATCH 1/6] uml: correct error messages in COW driver

2006-02-21 Thread Paolo 'Blaisorblade' Giarrusso
Improve some error messages in the COW driver, and say V3, not V2, when talking about V3 format. Also resync with our userspace code utility a bit more. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/cow_sys.h |2 +- arch/um/drivers/cow_user.c | 21

[uml-devel] [PATCH 2/8] uml: comments about libc-conflict guards

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
While fixing myself the mktime conflict (which someone already merged), I also improved a few comments. Merge them up. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/Makefile | 14 +- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch

[uml-devel] [PATCH 5/8] uml: TT - SYSCALL_DEBUG - fix buglet introduced in cleanup

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
option. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/kernel/tt/syscall_kern.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/um/kernel/tt/syscall_kern.c b/arch/um/kernel/tt/syscall_kern.c index 3d29c90..3fda9a0 100644 --- a/arch

[uml-devel] [PATCH 1/8] uml: typo fixup

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
Trivial innocent cosmetical fixup. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- include/asm-um/ldt-x86_64.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-um/ldt-x86_64.h b/include/asm-um/ldt-x86_64.h index 175722a..57159f1 100644

[uml-devel] [PATCH 6/8] uml: skas0-hold-own-ldt fixups for x86-64

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
In a recent fixup i386 code was copied raw to x86_64 subarch to make it compile again. Here there are some little fixups and resyncs needed for it (mainly for cleanliness sake) - I did an audit and found the rest of the code to be safe. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL

[uml-devel] [PATCH 4/8] uml: fix apples/bananas typo

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
Fix stupid typo. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/kernel/physmem.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c index f3b583a..544665e 100644 --- a/arch/um/kernel

[uml-devel] [PATCH 3/8] uml: fix hugest stack users

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
and a testprogram. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/slip_common.h | 13 +++-- arch/um/drivers/slip_kern.c | 15 --- arch/um/drivers/slirp_kern.c | 13 +++-- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git

[uml-devel] [PATCH 0/8] Other UML batch

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
Various little UML fixups. The only non-trivial one is uml: fix hugest stack users, which avoids C99 initializers for huge (6k) structs (due to the copy them twice on the stack gcc niceness). -- Inform me of my mistakes, so I can keep imitating Homer Simpson's Doh!. Paolo Giarrusso, aka

[uml-devel] [PATCH 7/8] uml: some harmless sparse warning fixes

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
Fix some simple sparse warnings - a lot more staticness and a misplaced __user. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/chan_kern.c |6 +++--- arch/um/drivers/daemon_kern.c |4 ++-- arch/um/drivers/line.c |2 +- arch/um

[uml-devel] [PATCH 8/8] uml: avoid CONFIG_NR_CPUS undeclared bogus error messages

2006-01-18 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED], Olaf Hering [EMAIL PROTECTED] Olaf reported UML doesn't build for him with a clear analisys of what happened - we're using NR_CPUS in files linked against glibc headers. Seems like it defines CONFIG_SMP but not CONFIG_NR_CPUS, so we get

[uml-devel] [PATCH] uml: remove leftover from patch revertal

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] I added this line to share this file with UML, but now it's no longer shared so remove this useless leftover. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- include/asm-i386/futex.h |2 +- 1 files changed, 1

[uml-devel] [PATCH 6/9] uml: avoid malloc to sleep in atomic sections

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Ugly trick to help make malloc not sleeping - we can't do anything else. But this is not yet optimal, since spinlock don't trigger in_atomic() when preemption is disabled. Also, even if ugly, this was already used in one place, and was even

[uml-devel] [PATCH 9/9] uml ubd code: fix a bit of whitespace

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
Correct a bit of whitespace problems while working here. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/ubd_kern.c | 31 +-- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/arch/um/drivers/ubd_kern.c b/arch/um

[uml-devel] [PATCH 3/9] uml: networking - clear transport-specific structure

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Pre-clear transport-specific private structure before passing it down. In fact, I just got a slab corruption and kernel panic on exit because kfree() was called on a pointer which probably was never allocated, BUT hadn't been set to NULL

[uml-devel] [PATCH 1/9] uml: avoid sysfs warning on hot-unplug

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Jeff Dike [EMAIL PROTECTED], Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Define a release method for the ubd and network driver so that sysfs doesn't complain when one is removed via: host $ uml_mconsole umid remove dev Done by Jeff around January for ubd only, later lost

[uml-devel] [PATCH 7/9] uml: arch Kconfig menu cleanups

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
problems about HPPFS - it's redundant anyway, as that's the usual procedure, and HPPFS users are especially technical (i.e. they know reporting bugs is _good_). Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/Kconfig | 27 ++- arch/um

[uml-devel] [PATCH 8/9] uml: allow again to move backing file and to override saved location

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
rather than goto out) and a repeated check. Tested well. Signed-off-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/drivers/ubd_kern.c | 28 +++- 1 files changed, 15 insertions(+), 13 deletions(-) diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers

[uml-devel] [PATCH 2/9] uml: make daemon transport behave properly

2006-01-17 Thread Paolo 'Blaisorblade' Giarrusso
From: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] Avoid uninitialized data in the daemon_data structure. I used this transport before doing proper setup before-hand, and I got some very nice SLAB corruption due to freeing crap pointers. So just make sure to clear everything when appropriate

[uml-devel] [PATCH 5/5] uml: fix compilation with CONFIG_MODE_TT disabled

2005-12-29 Thread Paolo 'Blaisorblade' Giarrusso
-by: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED] --- arch/um/sys-i386/Makefile |8 +--- arch/um/sys-x86_64/Makefile |5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 150059d..f5fd5b0 100644 --- a/arch

  1   2   >