[uml-devel] [PATCH] UML: Gprof needs frame pointers.

2007-10-18 Thread Magotari
This is a short Kconfig fix for a problem in User Mode Linux.
Frame pointers are required for gprof support to work.

Karol Swietlicki

Signed-off-by: Karol Swietlicki <[EMAIL PROTECTED]>

---

--- linux-2.6.23-mm1/arch/um/Kconfig.debug  2007-10-18 22:24:13.0 
+0200
+++ linux-2.6.23-mm1.local/arch/um/Kconfig.debug2007-10-18
22:04:04.0 +0200
@@ -4,7 +4,7 @@

 config GPROF
bool "Enable gprof support"
-   depends on DEBUG_INFO
+   depends on DEBUG_INFO && FRAME_POINTER
help
  This allows profiling of a User-Mode Linux kernel with the gprof
  utility.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[uml-devel] [PATCH] uml: Updating outdated links to the uml website.

2007-10-22 Thread Magotari
This patch updates links which broke during the transition to the new
UML website.

Karol Swietlicki

Signed-off-by: Karol Swietlicki <[EMAIL PROTECTED]>

---
diff -uprN linux-2.6.23-mm1/arch/um/Kconfig
linux-2.6.23-mm1.local/arch/um/Kconfig
--- linux-2.6.23-mm1/arch/um/Kconfig2007-10-18 22:24:13.0 +0200
+++ linux-2.6.23-mm1.local/arch/um/Kconfig  2007-10-22 19:27:13.0 
+0200
@@ -145,7 +145,7 @@ config HPPFS
  by removing or changing anything in /proc which gives away the
  identity of a UML.

- See  for more information.
+ See  for more 
information.

  You only need this if you are setting up a UML honeypot.  Otherwise,
  it is safe to say 'N' here.
diff -uprN linux-2.6.23-mm1/arch/um/Kconfig.char
linux-2.6.23-mm1.local/arch/um/Kconfig.char
--- linux-2.6.23-mm1/arch/um/Kconfig.char   2007-10-18 22:24:13.0 
+0200
+++ linux-2.6.23-mm1.local/arch/um/Kconfig.char 2007-10-22
19:28:22.0 +0200
@@ -18,7 +18,7 @@ config SSL
   lines on the UML that are usually made to show up on the host as
   ttys or ptys.

-  See  for more
+  See  for more
   information and command line examples of how to use this facility.

   Unless you have a specific reason for disabling this, say Y.
diff -uprN linux-2.6.23-mm1/arch/um/Kconfig.debug
linux-2.6.23-mm1.local/arch/um/Kconfig.debug
--- linux-2.6.23-mm1/arch/um/Kconfig.debug  2007-10-18 22:46:35.0 
+0200
+++ linux-2.6.23-mm1.local/arch/um/Kconfig.debug2007-10-22
19:29:29.0 +0200
@@ -9,7 +9,7 @@ config GPROF
  This allows profiling of a User-Mode Linux kernel with the gprof
  utility.

- See  for more
+ See  for more
  details.

  If you're involved in UML kernel development and want to use gprof,
@@ -22,7 +22,7 @@ config GCOV
  This option allows developers to retrieve coverage data from a UML
  session.

- See  for more
+ See  for more
  details.

  If you're involved in UML kernel development and want to use gcov,
diff -uprN linux-2.6.23-mm1/arch/um/Kconfig.net
linux-2.6.23-mm1.local/arch/um/Kconfig.net
--- linux-2.6.23-mm1/arch/um/Kconfig.net2007-10-18 22:24:13.0 
+0200
+++ linux-2.6.23-mm1.local/arch/um/Kconfig.net  2007-10-22
19:32:22.0 +0200
@@ -14,7 +14,7 @@ config UML_NET

 For more information, including explanations of the networking and
 sample configurations, see
-.
+.

 If you'd like to be able to enable networking in the User-Mode
 linux environment, say Y; otherwise say N.  Note that you must
@@ -38,7 +38,7 @@ config UML_NET_ETHERTAP
 CONFIG_NETLINK_DEV configured as Y or M.

 For more information, see
-  That site
+  That site
 has examples of the UML command line to use to enable Ethertap
 networking.

@@ -72,7 +72,7 @@ config UML_NET_SLIP
 To use this, your host must support slip devices.

 For more information, see
-.  That site
+.
 That site
 has examples of the UML command line to use to enable slip
 networking, and details of a few quirks with it.

@@ -96,7 +96,7 @@ config UML_NET_DAEMON
 networking daemon on the host.

 For more information, see
-  That site
+  That site
 has examples of the UML command line to use to enable Daemon
 networking.

@@ -144,7 +144,7 @@ config UML_NET_MCAST
 To use this, your host kernel(s) must support IP Multicasting.

 For more information, see
-  That site
+  That site
 has examples of the UML command line to use to enable Multicast
 networking, and notes about the security of this approach.

@@ -165,7 +165,7 @@ config UML_NET_PCAP
installed in order to build the pcap transport into UML.

 For more information, see
-   

[uml-devel] [PATCH] uml: removing xmm detection

2007-10-25 Thread Magotari
This patch removes some code which ran at every boot, but does not
seem to do anything anymore. Please test. It works for me but mistakes
can happen.

Karol Swietlicki

Signed-off-by: Karol Swietlicki <[EMAIL PROTECTED]>
---

diff -uprN linux-2.6.23-mm1/arch/um/sys-i386/bugs.c
linux-2.6.23-mm1.local/arch/um/sys-i386/bugs.c
--- linux-2.6.23-mm1/arch/um/sys-i386/bugs.c2007-10-18 22:24:13.0 
+0200
+++ linux-2.6.23-mm1.local/arch/um/sys-i386/bugs.c  2007-10-25
18:57:28.0 +0200
@@ -15,7 +15,6 @@

 /* Set during early boot */
 int host_has_cmov = 1;
-int host_has_xmm = 0;

  static char token(int fd, char *buf, int len, char stop)
 {
@@ -163,8 +162,6 @@ void arch_check_bugs(void)
}
if (check_cpu_flag("cmov", &have_it))
host_has_cmov = have_it;
-   if (check_cpu_flag("xmm", &have_it))
-   host_has_xmm = have_it;
 }

  int arch_handle_signal(int sig, struct uml_pt_regs *regs)
diff -uprN linux-2.6.23-mm1/include/asm-um/processor-i386.h
linux-2.6.23-mm1.local/include/asm-um/processor-i386.h
--- linux-2.6.23-mm1/include/asm-um/processor-i386.h2007-10-18
22:24:26.0 +0200
+++ linux-2.6.23-mm1.local/include/asm-um/processor-i386.h  2007-10-25
18:59:15.0 +0200
@@ -10,7 +10,6 @@
  #include "asm/host_ldt.h"
  #include "asm/segment.h"

-extern int host_has_xmm;
  extern int host_has_cmov;

  /* include faultinfo structure */

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[uml-devel] [PATCH] uml: remove an unused variable in arch_switch_{to, tls}

2007-11-07 Thread Magotari
This patch removes a variable which was not used in two functions.
Yet another code cleanup, nothing really significant.

Please note that I could not test this on x86_64. I don't have the
hardware for it.

Karol Swietlicki

Signed-off-by: Karol Swietlicki <[EMAIL PROTECTED]>
---

diff -upNr linux-2.6.24-rc1/arch/um/kernel/process.c
linux-2.6.23/arch/um/kernel/process.c
--- linux-2.6.24-rc1/arch/um/kernel/process.c   2007-10-24
05:50:57.0 +0200
+++ linux-2.6.23/arch/um/kernel/process.c   2007-11-07 19:01:28.0 
+0100
@@ -83,7 +83,7 @@ static inline void set_current(struct ta
{ external_pid(task), task });
 }

-extern void arch_switch_to(struct task_struct *from, struct task_struct *to);
+extern void arch_switch_to(struct task_struct *to);

 void *_switch_to(void *prev, void *next, void *last)
 {
@@ -99,7 +99,7 @@ void *_switch_to(void *prev, void *next,
switch_threads(&from->thread.switch_buf,
   &to->thread.switch_buf);

-   arch_switch_to(current->thread.prev_sched, current);
+   arch_switch_to(current);

if (current->thread.saved_task)
show_regs(&(current->thread.regs));
@@ -173,7 +170,7 @@ void fork_handler(void)
 * arch_switch_to isn't needed. We could want to apply this to
 * improve performance. -bb
 */
-   arch_switch_to(current->thread.prev_sched, current);
+   arch_switch_to(current);

current->thread.prev_sched = NULL;

 int arch_handle_signal(int sig, struct uml_pt_regs *regs)
diff -upNr linux-2.6.24-rc1/arch/um/sys-i386/ptrace.c
linux-2.6.23/arch/um/sys-i386/ptrace.c
--- linux-2.6.24-rc1/arch/um/sys-i386/ptrace.c  2007-10-24
05:50:57.0 +0200
+++ linux-2.6.23/arch/um/sys-i386/ptrace.c  2007-11-07 19:00:52.0 
+0100
@@ -8,11 +8,11 @@
 #include "asm/uaccess.h"
 #include "skas.h"

-extern int arch_switch_tls(struct task_struct *from, struct task_struct *to);
+extern int arch_switch_tls(struct task_struct *to);

-void arch_switch_to(struct task_struct *from, struct task_struct *to)
+void arch_switch_to(struct task_struct *to)
 {
-   int err = arch_switch_tls(from, to);
+   int err = arch_switch_tls(to);
if (!err)
return;

diff -upNr linux-2.6.24-rc1/arch/um/sys-i386/tls.c
linux-2.6.23/arch/um/sys-i386/tls.c
--- linux-2.6.24-rc1/arch/um/sys-i386/tls.c 2007-10-24 05:50:57.0 
+0200
+++ linux-2.6.23/arch/um/sys-i386/tls.c 2007-11-07 19:01:56.0 +0100
@@ -172,7 +172,7 @@ void clear_flushed_tls(struct task_struc
  * SKAS patch.
  */

-int arch_switch_tls(struct task_struct *from, struct task_struct *to)
+int arch_switch_tls(struct task_struct *to)
 {
if (!host_supports_tls)
return 0;
Files linux-2.6.24-rc1/arch/um/sys-i386/user-offsets.gcno and
linux-2.6.23/arch/um/sys-i386/user-offsets.gcno differ
diff -upNr linux-2.6.24-rc1/arch/um/sys-x86_64/syscalls.c
linux-2.6.23/arch/um/sys-x86_64/syscalls.c
--- linux-2.6.24-rc1/arch/um/sys-x86_64/syscalls.c  2007-10-24
05:50:57.0 +0200
+++ linux-2.6.23/arch/um/sys-x86_64/syscalls.c  2007-11-07
18:57:42.0 +0100
@@ -105,7 +105,7 @@ long sys_clone(unsigned long clone_flags
return ret;
 }

-void arch_switch_to(struct task_struct *from, struct task_struct *to)
+void arch_switch_to(struct task_struct *to)
 {
if ((to->thread.arch.fs == 0) || (to->mm == NULL))
return;

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[uml-devel] [PATCH] uml: cleanup unused return values

2007-11-09 Thread Magotari
This patch changes a few functions into returning void.
The return values were not used anyway, so I think it should not be a problem.
Also removed a little leftover bit from TT mode.

Karol Swietlicki

Signed-off-by: Karol Swietlicki <[EMAIL PROTECTED]>

---
diff -rupN linux-2.6.23.orig/arch/um/include/os.h
linux-2.6.23/arch/um/include/os.h
--- linux-2.6.23.orig/arch/um/include/os.h  2007-11-04 14:50:57.0 
+0100
+++ linux-2.6.23/arch/um/include/os.h   2007-11-04 14:54:39.0 +0100
@@ -168,14 +168,10 @@ extern int os_fchange_dir(int fd);

 /* start_up.c */
 extern void os_early_checks(void);
-extern int can_do_skas(void);
+extern void can_do_skas(void);
 extern void os_check_bugs(void);
 extern void check_host_supports_tls(int *supports_tls, int *tls_min);

-/* Make sure they are clear when running in TT mode. Required by
- * SEGV_MAYBE_FIXABLE */
-#define clear_can_do_skas() do { ptrace_faultinfo = proc_mm = 0; } while (0)
-
 /* mem.c */
 extern int create_mem_file(unsigned long long len);

diff -rupN linux-2.6.23.orig/arch/um/kernel/um_arch.c
linux-2.6.23/arch/um/kernel/um_arch.c
--- linux-2.6.23.orig/arch/um/kernel/um_arch.c  2007-11-04
14:50:57.0 +0100
+++ linux-2.6.23/arch/um/kernel/um_arch.c   2007-11-09 21:39:50.0 
+0100
@@ -197,7 +197,7 @@ __uml_setup("--help", Usage,
 "Prints this message.\n\n"
 );

-static int __init uml_checksetup(char *line, int *add)
+static void __init uml_checksetup(char *line, int *add)
 {
struct uml_param *p;

@@ -207,10 +207,9 @@ static int __init uml_checksetup(char *l

n = strlen(p->str);
if (!strncmp(line, p->str, n) && p->setup_func(line + n, add))
-   return 1;
+   return;
p++;
}
-   return 0;
 }

 static void __init uml_postsetup(void)
diff -rupN linux-2.6.23.orig/arch/um/os-Linux/start_up.c
linux-2.6.23/arch/um/os-Linux/start_up.c
--- linux-2.6.23.orig/arch/um/os-Linux/start_up.c   2007-11-04
14:50:57.0 +0100
+++ linux-2.6.23/arch/um/os-Linux/start_up.c2007-11-04 14:55:36.0 
+0100
@@ -466,7 +466,7 @@ static inline void check_skas3_proc_mm(v
else non_fatal("found\n");
 }

-int can_do_skas(void)
+void can_do_skas(void)
 {
non_fatal("Checking for the skas3 patch in the host:\n");

@@ -476,8 +476,6 @@ int can_do_skas(void)

if (!proc_mm || !ptrace_faultinfo || !ptrace_ldt)
skas_needs_stub = 1;
-
-   return 1;
 }

 int __init parse_iomem(char *str, int *add)

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


[uml-devel] [PATCH] UML - Remove an unused variable.

2007-11-12 Thread Magotari
This patch gets rid of an unused variable in a few functions.
Compile and run tested.

Karol Swietlicki

Signed-off-by: Karol Swietlicki <[EMAIL PROTECTED]>
---
diff -rupN linux-2.6.24-rc2.orig/arch/um/drivers/chan_kern.c
linux-2.6.24-rc2/arch/um/drivers/chan_kern.c
--- linux-2.6.24-rc2.orig/arch/um/drivers/chan_kern.c   2007-11-06
22:57:46.0 +0100
+++ linux-2.6.24-rc2/arch/um/drivers/chan_kern.c2007-11-12
22:15:51.0 +0100
@@ -383,8 +382,7 @@ static void free_chan(struct list_head *
}
 }

-static int one_chan_config_string(struct chan *chan, char *str, int size,
- char **error_out)
+static int one_chan_config_string(struct chan *chan, char *str, int size)
 {
int n = 0;

@@ -407,11 +405,11 @@ static int one_chan_config_string(struct
 }

 static int chan_pair_config_string(struct chan *in, struct chan *out,
-  char *str, int size, char **error_out)
+  char *str, int size)
 {
int n;

-   n = one_chan_config_string(in, str, size, error_out);
+   n = one_chan_config_string(in, str, size);
str += n;
size -= n;

@@ -421,7 +419,7 @@ static int chan_pair_config_string(struc
}

CONFIG_CHUNK(str, size, n, ",", 1);
-   n = one_chan_config_string(out, str, size, error_out);
+   n = one_chan_config_string(out, str, size);
str += n;
size -= n;
CONFIG_CHUNK(str, size, n, "", 1);
@@ -429,8 +427,7 @@ static int chan_pair_config_string(struc
return n;
 }

-int chan_config_string(struct list_head *chans, char *str, int size,
-  char **error_out)
+int chan_config_string(struct list_head *chans, char *str, int size)
 {
struct list_head *ele;
struct chan *chan, *in = NULL, *out = NULL;
@@ -445,7 +442,7 @@ int chan_config_string(struct list_head
out = chan;
}

-   return chan_pair_config_string(in, out, str, size, error_out);
+   return chan_pair_config_string(in, out, str, size);
 }

 struct chan_type {
diff -rupN linux-2.6.24-rc2.orig/arch/um/drivers/line.c
linux-2.6.24-rc2/arch/um/drivers/line.c
--- linux-2.6.24-rc2.orig/arch/um/drivers/line.c2007-11-06
22:57:46.0 +0100
+++ linux-2.6.24-rc2/arch/um/drivers/line.c 2007-11-12 22:42:35.0 
+0100
@@ -642,7 +642,8 @@ int line_get_config(char *name, struct l
CONFIG_CHUNK(str, size, n, "none", 1);
else if (line->tty == NULL)
CONFIG_CHUNK(str, size, n, line->init_str, 1);
-   else n = chan_config_string(&line->chan_list, str, size, error_out);
+   else
+   n = chan_config_string(&line->chan_list, str, size);
spin_unlock(&line->count_lock);

return n;
diff -rupN linux-2.6.24-rc2.orig/arch/um/include/chan_kern.h
linux-2.6.24-rc2/arch/um/include/chan_kern.h
--- linux-2.6.24-rc2.orig/arch/um/include/chan_kern.h   2007-11-06
22:57:46.0 +0100
+++ linux-2.6.24-rc2/arch/um/include/chan_kern.h2007-11-12
22:17:15.0 +0100
@@ -46,7 +46,6 @@ extern int chan_window_size(struct list_
 unsigned short *rows_out,
 unsigned short *cols_out);
 extern int chan_out_fd(struct list_head *chans);
-extern int chan_config_string(struct list_head *chans, char *str, int size,
- char **error_out);
+extern int chan_config_string(struct list_head *chans, char *str, int size);

 #endif

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel