linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14
@ 2005-09-21 16:22 Blaisorblade
  2005-09-21 16:37 ` [uml-devel] [PATCH 01/10] uml: adapt asm/futex.h to our arch Paolo 'Blaisorblade' Giarrusso
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Blaisorblade @ 2005-09-21 16:22 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, LKML

This is a collection of simple fixes like "fix warning", "rename thing to fix 
conflict", "remove unused var ", "add comment", "match function and proto", 
"missing break in switch".

This is the "trivial" part of my UML tree - can this get merged upstream? 
Thanks.

I'll later send another bunch of more troublesome fixes.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 01/10] uml: adapt asm/futex.h to our arch
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
@ 2005-09-21 16:37 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:38 ` [uml-devel] [PATCH 02/10] [ALL ARCHES] Remove unused var from asm/futex.h Paolo 'Blaisorblade' Giarrusso
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:37 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Follow up to 4732efbeb997189d9f9b04708dc26bf8613ed721 - uml must just reuse
as-is the backing architecture support. There is a micro-fixup is needed for the
included file, which won't affect i386 behaviour at all.

I've not tested compilation on x86_64, only on x86, but the code is almost the
same except the culprit test, so everything should be ok on x86_64 too.

Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 include/asm-i386/futex.h |    2 +-
 include/asm-um/futex.h   |   51 +++++-----------------------------------------
 2 files changed, 6 insertions(+), 47 deletions(-)

diff --git a/include/asm-i386/futex.h b/include/asm-i386/futex.h
--- a/include/asm-i386/futex.h
+++ b/include/asm-i386/futex.h
@@ -61,7 +61,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	if (op == FUTEX_OP_SET)
 		__futex_atomic_op1("xchgl %0, %2", ret, oldval, uaddr, oparg);
 	else {
-#ifndef CONFIG_X86_BSWAP
+#if !defined(CONFIG_X86_BSWAP) && !defined(CONFIG_UML)
 		if (boot_cpu_data.x86 == 3)
 			ret = -ENOSYS;
 		else
diff --git a/include/asm-um/futex.h b/include/asm-um/futex.h
--- a/include/asm-um/futex.h
+++ b/include/asm-um/futex.h
@@ -1,53 +1,12 @@
-#ifndef _ASM_FUTEX_H
-#define _ASM_FUTEX_H
-
-#ifdef __KERNEL__
+#ifndef __UM_FUTEX_H
+#define __UM_FUTEX_H
 
 #include <linux/futex.h>
 #include <asm/errno.h>
+#include <asm/system.h>
+#include <asm/processor.h>
 #include <asm/uaccess.h>
 
-static inline int
-futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
-{
-	int op = (encoded_op >> 28) & 7;
-	int cmp = (encoded_op >> 24) & 15;
-	int oparg = (encoded_op << 8) >> 20;
-	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
-	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
-		oparg = 1 << oparg;
-
-	if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
-		return -EFAULT;
-
-	inc_preempt_count();
-
-	switch (op) {
-	case FUTEX_OP_SET:
-	case FUTEX_OP_ADD:
-	case FUTEX_OP_OR:
-	case FUTEX_OP_ANDN:
-	case FUTEX_OP_XOR:
-	default:
-		ret = -ENOSYS;
-	}
+#include "asm/arch/futex.h"
 
-	dec_preempt_count();
-
-	if (!ret) {
-		switch (cmp) {
-		case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
-		case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
-		case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
-		case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
-		case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
-		case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
-		default: ret = -ENOSYS;
-		}
-	}
-	return ret;
-}
-
-#endif
 #endif



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 02/10] [ALL ARCHES] Remove unused var from asm/futex.h
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
  2005-09-21 16:37 ` [uml-devel] [PATCH 01/10] uml: adapt asm/futex.h to our arch Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:38 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:38 ` [uml-devel] [PATCH 03/10] uml: remove verify_area_{tt,skas} Paolo 'Blaisorblade' Giarrusso
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:38 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

As recently done by Russell King for ARM, commit
4732efbeb997189d9f9b04708dc26bf8613ed721 introduces a generic asm/futex.h copied
along most arches, which includes a "-ENOSYS support" to be changed if needed.
However, it includes an unused var (taken from the "real" version) which GCC
warns about.

Remove it from all arches having that file version (i.e. same GIT id).
$ git-diff-tree -r HEAD
and
$ git-ls-tree  -r HEAD include/|grep 9feff4ce1424bc390608326240be369eb13aa648

may be more interesting than looking at the patch itself, to make sure I've
just copied the arm header to all other archs having the original dummy version
of this file.

Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 include/asm-alpha/futex.h     |    2 +-
 include/asm-arm26/futex.h     |    2 +-
 include/asm-cris/futex.h      |    2 +-
 include/asm-frv/futex.h       |    2 +-
 include/asm-h8300/futex.h     |    2 +-
 include/asm-ia64/futex.h      |    2 +-
 include/asm-m32r/futex.h      |    2 +-
 include/asm-m68k/futex.h      |    2 +-
 include/asm-m68knommu/futex.h |    2 +-
 include/asm-parisc/futex.h    |    2 +-
 include/asm-ppc/futex.h       |    2 +-
 include/asm-s390/futex.h      |    2 +-
 include/asm-sh/futex.h        |    2 +-
 include/asm-sh64/futex.h      |    2 +-
 include/asm-sparc/futex.h     |    2 +-
 include/asm-sparc64/futex.h   |    2 +-
 include/asm-v850/futex.h      |    2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/include/asm-alpha/futex.h b/include/asm-alpha/futex.h
--- a/include/asm-alpha/futex.h
+++ b/include/asm-alpha/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-arm26/futex.h b/include/asm-arm26/futex.h
--- a/include/asm-arm26/futex.h
+++ b/include/asm-arm26/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-cris/futex.h b/include/asm-cris/futex.h
--- a/include/asm-cris/futex.h
+++ b/include/asm-cris/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-frv/futex.h b/include/asm-frv/futex.h
--- a/include/asm-frv/futex.h
+++ b/include/asm-frv/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-h8300/futex.h b/include/asm-h8300/futex.h
--- a/include/asm-h8300/futex.h
+++ b/include/asm-h8300/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-ia64/futex.h b/include/asm-ia64/futex.h
--- a/include/asm-ia64/futex.h
+++ b/include/asm-ia64/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-m32r/futex.h b/include/asm-m32r/futex.h
--- a/include/asm-m32r/futex.h
+++ b/include/asm-m32r/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-m68k/futex.h b/include/asm-m68k/futex.h
--- a/include/asm-m68k/futex.h
+++ b/include/asm-m68k/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-m68knommu/futex.h b/include/asm-m68knommu/futex.h
--- a/include/asm-m68knommu/futex.h
+++ b/include/asm-m68knommu/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h
--- a/include/asm-parisc/futex.h
+++ b/include/asm-parisc/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-ppc/futex.h b/include/asm-ppc/futex.h
--- a/include/asm-ppc/futex.h
+++ b/include/asm-ppc/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h
--- a/include/asm-s390/futex.h
+++ b/include/asm-s390/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-sh/futex.h b/include/asm-sh/futex.h
--- a/include/asm-sh/futex.h
+++ b/include/asm-sh/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-sh64/futex.h b/include/asm-sh64/futex.h
--- a/include/asm-sh64/futex.h
+++ b/include/asm-sh64/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-sparc/futex.h b/include/asm-sparc/futex.h
--- a/include/asm-sparc/futex.h
+++ b/include/asm-sparc/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h
--- a/include/asm-sparc64/futex.h
+++ b/include/asm-sparc64/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 
diff --git a/include/asm-v850/futex.h b/include/asm-v850/futex.h
--- a/include/asm-v850/futex.h
+++ b/include/asm-v850/futex.h
@@ -14,7 +14,7 @@ futex_atomic_op_inuser (int encoded_op, 
 	int cmp = (encoded_op >> 24) & 15;
 	int oparg = (encoded_op << 8) >> 20;
 	int cmparg = (encoded_op << 20) >> 20;
-	int oldval = 0, ret, tem;
+	int oldval = 0, ret;
 	if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
 		oparg = 1 << oparg;
 



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 03/10] uml: remove verify_area_{tt,skas}
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
  2005-09-21 16:37 ` [uml-devel] [PATCH 01/10] uml: adapt asm/futex.h to our arch Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:38 ` [uml-devel] [PATCH 02/10] [ALL ARCHES] Remove unused var from asm/futex.h Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:38 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:38 ` [uml-devel] [PATCH 04/10] uml: fix modify_ldt - missing break in switch Paolo 'Blaisorblade' Giarrusso
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:38 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

When removing verify_area, verify_area_{tt,skas} were forgotten.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/kernel/skas/include/uaccess-skas.h |    6 ------
 arch/um/kernel/tt/include/uaccess-tt.h     |    6 ------
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/arch/um/kernel/skas/include/uaccess-skas.h b/arch/um/kernel/skas/include/uaccess-skas.h
--- a/arch/um/kernel/skas/include/uaccess-skas.h
+++ b/arch/um/kernel/skas/include/uaccess-skas.h
@@ -18,12 +18,6 @@
 	  ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
 	  ((unsigned long) (addr) + (size) >= (unsigned long)(addr))))
 
-static inline int verify_area_skas(int type, const void __user * addr,
-                                   unsigned long size)
-{
-	return(access_ok_skas(type, addr, size) ? 0 : -EFAULT);
-}
-
 extern int copy_from_user_skas(void *to, const void __user *from, int n);
 extern int copy_to_user_skas(void __user *to, const void *from, int n);
 extern int strncpy_from_user_skas(char *dst, const char __user *src, int count);
diff --git a/arch/um/kernel/tt/include/uaccess-tt.h b/arch/um/kernel/tt/include/uaccess-tt.h
--- a/arch/um/kernel/tt/include/uaccess-tt.h
+++ b/arch/um/kernel/tt/include/uaccess-tt.h
@@ -33,12 +33,6 @@ extern unsigned long uml_physmem;
          (((unsigned long) (addr) <= ((unsigned long) (addr) + (size))) && \
           (under_task_size(addr, size) || is_stack(addr, size))))
 
-static inline int verify_area_tt(int type, const void __user * addr,
-                                 unsigned long size)
-{
-	return(access_ok_tt(type, addr, size) ? 0 : -EFAULT);
-}
-
 extern unsigned long get_fault_addr(void);
 
 extern int __do_copy_from_user(void *to, const void *from, int n,



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 04/10] uml: fix modify_ldt - missing break in switch
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
                   ` (2 preceding siblings ...)
  2005-09-21 16:38 ` [uml-devel] [PATCH 03/10] uml: remove verify_area_{tt,skas} Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:38 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:39 ` [uml-devel] [PATCH 05/10] uml: fix uname output on 32-bit binary on 64-bit host Paolo 'Blaisorblade' Giarrusso
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:38 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

I am a lamer :-(. Luckily, Luo Xin performed LTP testing and found this failure.
Btw, the fact that the patch in which I introduced this was merged shows that:

a) I'm really trusted by people
b) sometimes they're wrong about point a).
c) lack of time for reviewers.

CC: Luo Xin <luothing@sina.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/sys-i386/ldt.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/um/sys-i386/ldt.c b/arch/um/sys-i386/ldt.c
--- a/arch/um/sys-i386/ldt.c
+++ b/arch/um/sys-i386/ldt.c
@@ -83,6 +83,7 @@ int sys_modify_ldt(int func, void __user
 			goto out;
 		}
 		p = buf;
+		break;
 	default:
 		res = -ENOSYS;
 		goto out;



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 05/10] uml: fix uname output on 32-bit binary on 64-bit host
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
                   ` (3 preceding siblings ...)
  2005-09-21 16:38 ` [uml-devel] [PATCH 04/10] uml: fix modify_ldt - missing break in switch Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:39 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:39 ` [uml-devel] [PATCH 06/10] uml: Fix conflict between libc and ipv6 Paolo 'Blaisorblade' Giarrusso
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:39 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Translate uname output taken from the host if needed.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/kernel/user_util.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c
--- a/arch/um/kernel/user_util.c
+++ b/arch/um/kernel/user_util.c
@@ -128,6 +128,12 @@ void setup_machinename(char *machine_out
 	struct utsname host;
 
 	uname(&host);
+#if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT)
+	if (!strcmp(host.machine, "x86_64")) {
+		strcpy(machine_out, "i686");
+		return;
+	}
+#endif
 	strcpy(machine_out, host.machine);
 }
 



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 06/10] uml: Fix conflict between libc and ipv6
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
                   ` (4 preceding siblings ...)
  2005-09-21 16:39 ` [uml-devel] [PATCH 05/10] uml: fix uname output on 32-bit binary on 64-bit host Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:39 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:39 ` [uml-devel] [PATCH 07/10] uml: fix bogus HOST_ELF_CLASS symbol name Paolo 'Blaisorblade' Giarrusso
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:39 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

gcc is now complaining during link on some hosts - fix it as for other things.
Reported by Antoine Martin <antoine@nagafix.co.uk>.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/um/Makefile b/arch/um/Makefile
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -53,9 +53,13 @@ SYS_DIR		:= $(ARCH_DIR)/include/sysdep-$
 
 # -Dvmap=kernel_vmap affects everything, and prevents anything from
 # referencing the libpcap.o symbol so named.
+#
+# Same things for in6addr_loopback - found in libc.
 
 CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
-	$(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap
+	$(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap \
+	-Din6addr_loopback=kernel_in6addr_loopback
+
 AFLAGS += $(ARCH_INCLUDE)
 
 USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 07/10] uml: fix bogus HOST_ELF_CLASS symbol name
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
                   ` (5 preceding siblings ...)
  2005-09-21 16:39 ` [uml-devel] [PATCH 06/10] uml: Fix conflict between libc and ipv6 Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:39 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:40 ` [uml-devel] [PATCH 08/10] uml: readd removed unistd.h inclusion Paolo 'Blaisorblade' Giarrusso
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:39 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Even if with a bit of misunderstanding, Al fixed this in commit
95608261dae863bc43292e6fbd946a3abd3aa49f.

Well, the symbol was intended to come from userspace (it exists there on normal
host), but since some hosts may miss that, using the kernel one is just as fine.
However, rename it to be named consistently with the rest.

Actually, he missed converting ELFCLASS32 to coming from kernel headers. For
consistence, add ELFCLASS64 too.

Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/include/common-offsets.h |    4 +++-
 arch/um/os-Linux/elf_aux.c       |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h
--- a/arch/um/include/common-offsets.h
+++ b/arch/um/include/common-offsets.h
@@ -12,4 +12,6 @@ DEFINE_STR(UM_KERN_WARNING, KERN_WARNING
 DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE);
 DEFINE_STR(UM_KERN_INFO, KERN_INFO);
 DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG);
-DEFINE(HOST_ELF_CLASS, ELF_CLASS);
+DEFINE(UM_ELF_CLASS, ELF_CLASS);
+DEFINE(UM_ELFCLASS32, ELFCLASS32);
+DEFINE(UM_ELFCLASS64, ELFCLASS64);
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -14,7 +14,8 @@
 #include "mem_user.h"
 #include <kernel-offsets.h>
 
-#if HOST_ELF_CLASS == ELFCLASS32
+/* Use the one from the kernel - the host may miss it, if having old headers. */
+#if UM_ELF_CLASS == UM_ELFCLASS32
 typedef Elf32_auxv_t elf_auxv_t;
 #else
 typedef Elf64_auxv_t elf_auxv_t;



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 08/10] uml: readd removed unistd.h inclusion
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
                   ` (6 preceding siblings ...)
  2005-09-21 16:39 ` [uml-devel] [PATCH 07/10] uml: fix bogus HOST_ELF_CLASS symbol name Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:40 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:40 ` [uml-devel] [PATCH 09/10] uml: comment about cast build fix Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:40 ` [uml-devel] [PATCH 10/10] uml: fix compile warning after consolidation patch Paolo 'Blaisorblade' Giarrusso
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Readd this header (deleted in 60d339f6fe0831060600c62418b71a62ad26c281). A
warning is spit out here about undeclared getpgrp().

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/os-Linux/process.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -3,6 +3,7 @@
  * Licensed under the GPL
  */
 
+#include <unistd.h>
 #include <stdio.h>
 #include <errno.h>
 #include <signal.h>



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 09/10] uml: comment about cast build fix
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
                   ` (7 preceding siblings ...)
  2005-09-21 16:40 ` [uml-devel] [PATCH 08/10] uml: readd removed unistd.h inclusion Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:40 ` Paolo 'Blaisorblade' Giarrusso
  2005-09-21 16:40 ` [uml-devel] [PATCH 10/10] uml: fix compile warning after consolidation patch Paolo 'Blaisorblade' Giarrusso
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Explain why the casting we do to silence this warning is indeed safe.

It is because the field we're casting from, though being 64-bit wide, was filled
with a pointer in first place by ourselves.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/os-Linux/aio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -144,6 +144,7 @@ static int aio_thread(void *arg)
                                "errno = %d\n", errno);
                 }
                 else {
+			/* This is safe as we've just a pointer here. */
 			aio = (struct aio_context *) (long) event.data;
 			if(update_aio(aio, event.res)){
 				do_aio(ctx, aio);



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

* [uml-devel] [PATCH 10/10] uml: fix compile warning after consolidation patch
  2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
                   ` (8 preceding siblings ...)
  2005-09-21 16:40 ` [uml-devel] [PATCH 09/10] uml: comment about cast build fix Paolo 'Blaisorblade' Giarrusso
@ 2005-09-21 16:40 ` Paolo 'Blaisorblade' Giarrusso
  9 siblings, 0 replies; 11+ messages in thread
From: Paolo 'Blaisorblade' Giarrusso @ 2005-09-21 16:40 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Dike, user-mode-linux-devel, linux-kernel

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

The header declaring this function wasn't included, so the function declaration
was totally bogus wrt. the proto - even if this wasn't going to fail at all.

It was so bad that the compile warning I got was "control reaches end of
non-void function", i.e. missing return. Actually, this has been there for ages,
the consolidation patch just added the warning which was needed to clean it up.
Nice. Really.

Cc: Allan Graves <allan.graves@gmail.com>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

 arch/um/kernel/tt/process_kern.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c
--- a/arch/um/kernel/tt/process_kern.c
+++ b/arch/um/kernel/tt/process_kern.c
@@ -23,10 +23,11 @@
 #include "mem_user.h"
 #include "tlb.h"
 #include "mode.h"
+#include "mode_kern.h"
 #include "init.h"
 #include "tt.h"
 
-int switch_to_tt(void *prev, void *next, void *last)
+void switch_to_tt(void *prev, void *next)
 {
 	struct task_struct *from, *to, *prev_sched;
 	unsigned long flags;



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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] 11+ messages in thread

end of thread, other threads:[~2005-09-21 16:47 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-21 16:22 [uml-devel] [PATCH 0/10] Lots of UML fixups for 2.6.14 Blaisorblade
2005-09-21 16:37 ` [uml-devel] [PATCH 01/10] uml: adapt asm/futex.h to our arch Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:38 ` [uml-devel] [PATCH 02/10] [ALL ARCHES] Remove unused var from asm/futex.h Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:38 ` [uml-devel] [PATCH 03/10] uml: remove verify_area_{tt,skas} Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:38 ` [uml-devel] [PATCH 04/10] uml: fix modify_ldt - missing break in switch Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:39 ` [uml-devel] [PATCH 05/10] uml: fix uname output on 32-bit binary on 64-bit host Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:39 ` [uml-devel] [PATCH 06/10] uml: Fix conflict between libc and ipv6 Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:39 ` [uml-devel] [PATCH 07/10] uml: fix bogus HOST_ELF_CLASS symbol name Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:40 ` [uml-devel] [PATCH 08/10] uml: readd removed unistd.h inclusion Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:40 ` [uml-devel] [PATCH 09/10] uml: comment about cast build fix Paolo 'Blaisorblade' Giarrusso
2005-09-21 16:40 ` [uml-devel] [PATCH 10/10] uml: fix compile warning after consolidation patch Paolo 'Blaisorblade' Giarrusso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox