* [uml-devel] uml-patch-2.6.0
@ 2004-01-13 5:05 Jeff Dike
2004-01-17 19:09 ` BlaisorBlade
0 siblings, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2004-01-13 5:05 UTC (permalink / raw)
To: linux-kernel, user-mode-linux-devel
This patch updates UML to 2.6.0 and pulls in all the changes that have
accumulated in my 2.4 tree.
The 2.6.0 UML patch is available at
http://www.user-mode-linux.org/mirror/uml-patch-2.6.0-1.bz2
BK users can pull my 2.5 repository from
http://www.user-mode-linux.org:5000/uml-2.5
For the other UML mirrors and other downloads, see
http://user-mode-linux.sourceforge.net/dl-sf.html
Other links of interest:
The UML project home page : http://user-mode-linux.sourceforge.net
The UML Community site : http://usermodelinux.org
Jeff
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml-patch-2.6.0
2004-01-13 5:05 Jeff Dike
@ 2004-01-17 19:09 ` BlaisorBlade
2004-01-17 19:51 ` Jeff Dike
2004-01-17 20:32 ` M A Young
0 siblings, 2 replies; 6+ messages in thread
From: BlaisorBlade @ 2004-01-17 19:09 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Jeff Dike
Alle 06:05, martedì 13 gennaio 2004, Jeff Dike ha scritto:
> This patch updates UML to 2.6.0 and pulls in all the changes that have
> accumulated in my 2.4 tree.
Thanks for that (it was really needed). However, about the various fixes I
built, there is a lot of that that should go in. Go here:
http://web.tiscali.it/no-redirect-tiscali/blaisorblade/linux/archives/UML/2.6.1-v1/
I've updated all the stuff that was there. You claimed you didn't want some
patches, now I've organized things so they can be easily excluded. Do *not*
use the combo.
This are some brief patches descriptions (in the 00-README).
C-03 (trivial, removes smplock.h which went away)
C-04 (sys-i386/fault.c shouldn't even compile for now, as the exception
handling has had a syntactic change)
G-01 (one-liner for SELinux build, from M A Young)
G-02 (makes /proc/kallsyms work well and cleanups link scripts)
H-01 (consider that for PCAP linking; you claim in Makefile comments kbuild
doesn't allow to link -lpcap, that show it's possible).
H-02 (when configuration is changed, the whole UML is rebuilt again because
all files depend on uml-config.h which depends on all configuration. Trivial
fix).
Module support fix is trivial, and does not depend on anything controversial,
until you don't enable CONFIG_MODVERSIONS. So apply the patch. I've also
infos (and some code) about fixing the panic you get on startup with it
enabled.
The patches you mustn't apply from there are the H-03 and H-04, since H-03 is
the USER_OBJ thing and the H-04 depends on it (even if is logically
independent).
Bye
--
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.23/2.6.0 on an i686; Linux registered user n. 292729
EOSIGN
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml-patch-2.6.0
2004-01-17 19:09 ` BlaisorBlade
@ 2004-01-17 19:51 ` Jeff Dike
2004-01-18 13:49 ` Ingo Molnar
2004-01-17 20:32 ` M A Young
1 sibling, 1 reply; 6+ messages in thread
From: Jeff Dike @ 2004-01-17 19:51 UTC (permalink / raw)
To: BlaisorBlade; +Cc: user-mode-linux-devel
On Sat, Jan 17, 2004 at 08:09:50PM +0100, BlaisorBlade wrote:
> Thanks for that (it was really needed). However, about the various fixes I
> built, there is a lot of that that should go in. Go here:
>
> http://web.tiscali.it/no-redirect-tiscali/blaisorblade/linux/archives/UML/2.6.1-v1/
>
> I've updated all the stuff that was there. You claimed you didn't want some
> patches, now I've organized things so they can be easily excluded. Do *not*
> use the combo.
>
> This are some brief patches descriptions (in the 00-README).
OK, I'll pull them down and start merging them in...
Jeff
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml-patch-2.6.0
2004-01-17 19:09 ` BlaisorBlade
2004-01-17 19:51 ` Jeff Dike
@ 2004-01-17 20:32 ` M A Young
1 sibling, 0 replies; 6+ messages in thread
From: M A Young @ 2004-01-17 20:32 UTC (permalink / raw)
To: user-mode-linux-devel
On Sat, 17 Jan 2004, BlaisorBlade wrote:
> I've updated all the stuff that was there. You claimed you didn't want some
> patches, now I've organized things so they can be easily excluded. Do *not*
> use the combo.
>
> This are some brief patches descriptions (in the 00-README).
> C-03 (trivial, removes smplock.h which went away)
> C-04 (sys-i386/fault.c shouldn't even compile for now, as the exception
> handling has had a syntactic change)
> G-01 (one-liner for SELinux build, from M A Young)
Actually, I got it from u-m-l-d; it was originally by someone else,
possibly Russell Coker.
Michael Young
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml-patch-2.6.0
2004-01-17 19:51 ` Jeff Dike
@ 2004-01-18 13:49 ` Ingo Molnar
0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2004-01-18 13:49 UTC (permalink / raw)
To: Jeff Dike; +Cc: BlaisorBlade, user-mode-linux-devel
* Jeff Dike <jdike@addtoit.com> wrote:
> > This are some brief patches descriptions (in the 00-README).
>
> OK, I'll pull them down and start merging them in...
the ones below are needed too in addition, to make the x86 kernel
compile again. (the patch also adds those few things still missing for
host-skas3 support to work on x86.)
Ingo
--- linux/arch/i386/kernel/sys_i386.c.orig
+++ linux/arch/i386/kernel/sys_i386.c
@@ -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(¤t->mm->mmap_sem);
- error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
- up_write(¤t->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;
}
--- linux/arch/i386/kernel/ptrace.c.orig
+++ linux/arch/i386/kernel/ptrace.c
@@ -14,6 +14,7 @@
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/security.h>
+#include <linux/proc_mm.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -507,6 +508,56 @@ asmlinkage int sys_ptrace(long request,
addr, (struct user_desc __user *) data);
break;
+ case PTRACE_FAULTINFO: {
+ struct ptrace_faultinfo fault;
+
+ fault = ((struct ptrace_faultinfo)
+ { .is_write = child->thread.error_code,
+ .addr = child->thread.cr2 });
+ ret = copy_to_user((unsigned long *) data, &fault,
+ sizeof(fault));
+ if(ret)
+ break;
+ 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;
+
+ if(copy_from_user(&ldt, (unsigned long *) data,
+ sizeof(ldt))){
+ ret = -EIO;
+ break;
+ }
+ ret = modify_ldt(child->mm, ldt.func, ldt.ptr, ldt.bytecount);
+ 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:
ret = ptrace_request(child, request, addr, data);
break;
--- linux/arch/i386/kernel/ldt.c.orig
+++ linux/arch/i386/kernel/ldt.c
@@ -54,7 +54,7 @@ static int alloc_ldt(mm_context_t *pc, i
pc->size = mincount;
wmb();
- if (reload) {
+ if (reload && (¤t->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(¤t->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);
+}
--- linux/arch/i386/Kconfig.orig
+++ linux/arch/i386/Kconfig
@@ -697,6 +697,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"
--- linux/arch/um/kernel/ptrace.c.orig
+++ linux/arch/um/kernel/ptrace.c
@@ -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;
--- linux/arch/um/include/skas_ptrace.h.orig
+++ linux/arch/um/include/skas_ptrace.h
@@ -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
--- linux/include/asm-i386/desc.h.orig
+++ linux/include/asm-i386/desc.h
@@ -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
--- linux/include/asm-i386/ptrace.h.orig
+++ linux/include/asm-i386/ptrace.h
@@ -59,4 +59,26 @@ struct pt_regs {
#define instruction_pointer(regs) ((regs)->eip)
#endif
+/*For SKAS3 support.*/
+#ifndef _LINUX_PTRACE_STRUCT_DEF
+#define _LINUX_PTRACE_STRUCT_DEF
+
+#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;
+};
+
+#endif /*ifndef _LINUX_PTRACE_STRUCT_DEF*/
+
#endif
--- linux/mm/proc_mm.c.orig
+++ linux/mm/proc_mm.c
@@ -85,17 +85,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 = count;
break;
- }
+
default:
ret = -EINVAL;
break;
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [uml-devel] uml-patch-2.6.0
@ 2004-01-20 11:45 James W McMechan
0 siblings, 0 replies; 6+ messages in thread
From: James W McMechan @ 2004-01-20 11:45 UTC (permalink / raw)
To: user-mode-linux-devel
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
For a while I had a similar problem where IRQ 14? would
trigger and attempt to add_timer_randomness before the
random driver's _init section had been run so it would go
into one of the infinite segfault loops on a un-initialized
variable, I just added a check on the pointer being
set, and returned if it was not. This only seems to happen
on faster machines 1G PIII or 1.4G Athlon my 200MHz
Pentium MMXes at home don't show this effect.
I am normally paranoid about un-initialized vars for just
these sort of reasons, it was a pain to track down, but
I had plenty of time on a new years day cross country
flight to hunt for it.
I just fixed it for my use by a simple extra check, not calling it
would of course be better but I did not care where the fast path
was, slow but working is much better than fast and wedged.
I think the base problem is that yet another assumption is being
broken by UML or the random device
or the magic init order is wrong again :(
likely the patch is mangled but here it is.
--- linux-2.6.0/drivers/char/random.c 2003-11-26 12:42:56.000000000 -0800
+++ G-03-2.6.0/drivers/char/random.c 2004-01-01 14:18:52.000000000 -0800
@@ -790,6 +760,8 @@
__s32 delta, delta2, delta3;
int entropy = 0;
+if (!random_state) return;
+
/* if over the trickle threshold, use only 1 in 4096 samples */
if ( random_state->entropy_count > trickle_thresh &&
(__get_cpu_var(trickle_count)__ & 0xfff))
[-- Attachment #2: Type: text/html, Size: 2668 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-01-20 11:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-20 11:45 [uml-devel] uml-patch-2.6.0 James W McMechan
-- strict thread matches above, loose matches on Subject: below --
2004-01-13 5:05 Jeff Dike
2004-01-17 19:09 ` BlaisorBlade
2004-01-17 19:51 ` Jeff Dike
2004-01-18 13:49 ` Ingo Molnar
2004-01-17 20:32 ` M A Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox