linux-um archives
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: UML devel list <user-mode-linux-devel@lists.sourceforge.net>
Cc: Jeff Dike <jdike@addtoit.com>
Subject: [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0
Date: Thu, 18 Dec 2003 15:24:52 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.58.0312181514140.7622@earth> (raw)
In-Reply-To: <Pine.LNX.4.58.0312181253460.2378@earth>


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

--- linux/arch/i386/kernel/ptrace.c.orig	
+++ linux/arch/i386/kernel/ptrace.c	
@@ -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;
--- linux/kernel/ptrace.c.orig	
+++ linux/kernel/ptrace.c	
@@ -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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2003-12-18 14:25 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.58.0312171735540.8123@earth>
     [not found] ` <20031217174901.GA6709@ccure.user-mode-linux.org>
     [not found]   ` <Pine.LNX.4.58.0312171924290.12482@earth>
2003-12-17 21:40     ` [uml-devel] [UML patch] fix 2.6.0-test11 compilation problem Ingo Molnar
2003-12-22  9:50       ` BlaisorBlade
2003-12-17 21:54     ` [uml-devel] [bug] uml segfaults if forcing static link, 2.6.0-test11 Ingo Molnar
2003-12-18  1:46       ` Jeff Dike
2003-12-18  8:35         ` M A Young
2003-12-18  9:42         ` Ingo Molnar
2003-12-18 10:27           ` [uml-devel] [patch] fix PTRACE_LDT, skas-fix-2.4.23-A0 Ingo Molnar
2003-12-18 11:17             ` [uml-devel] [patch] host-skas support for 2.6.0, other UML fixes Ingo Molnar
2003-12-18 11:56               ` [uml-devel] " Ingo Molnar
2003-12-18 14:24                 ` Ingo Molnar [this message]
2003-12-18 16:27                   ` [uml-devel] [UML patch] fixes for !CONFIG_PROC_MM, 2.6.0 roland
2003-12-18 18:53                     ` Sven 'Darkman' Michels
2003-12-18 19:41                       ` roland
2003-12-19  4:35                   ` Jeff Chua
2003-12-19  8:22                     ` Ingo Molnar
2003-12-24 11:25                     ` BlaisorBlade
2003-12-19  9:20                   ` M A Young
2003-12-19  9:46                     ` Ingo Molnar
2003-12-19 11:37                       ` M A Young
2003-12-19 19:09                   ` [uml-devel] new_mm : /proc/mm copy_segments failed, err = 0 Jason Lunz
2003-12-19 19:38                     ` BlaisorBlade
2003-12-20 16:10                 ` [uml-devel] Re: [patch] host-skas support for 2.6.0, other UML fixes BlaisorBlade
2003-12-18 12:15               ` [uml-devel] [UML combo patch] 2.6.0 host-skas kernel & UML kernel patch Ingo Molnar
2003-12-19 18:59                 ` BlaisorBlade
2003-12-19 21:16                   ` Ingo Molnar
2003-12-20 15:57                     ` BlaisorBlade
2003-12-20 17:08                     ` Jeff Dike
2004-01-01 19:16                 ` [uml-devel] [UML combo patch] uml-combo-2.6.0-A7 Ingo Molnar
2004-01-02 18:29                   ` BlaisorBlade
2004-01-05 10:11                     ` Ingo Molnar
2004-01-05 19:13                       ` BlaisorBlade
2003-12-19 18:59               ` [uml-devel] [patch] host-skas support for 2.6.0, other UML fixes BlaisorBlade
2003-12-19 19:26             ` [uml-devel] [patch] fix PTRACE_LDT, skas-fix-2.4.23-A0 BlaisorBlade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0312181514140.7622@earth \
    --to=mingo@elte.hu \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox