Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] warning: minor abi change
@ 2003-06-26 13:54 Matthew Wilcox
  2003-06-26 17:03 ` Joel Soete
  0 siblings, 1 reply; 23+ messages in thread
From: Matthew Wilcox @ 2003-06-26 13:54 UTC (permalink / raw)
  To: parisc-linux

2.4.21 allocates sysctl number 56 to something else, so i had to renumber
the hppa sysctls to 57 and 58.  if linus didn't keep dropping this patch,
we'd have stable numbers ...

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 23+ messages in thread

* RE: [parisc-linux] warning: minor abi change
  2003-06-26 13:54 [parisc-linux] warning: minor abi change Matthew Wilcox
@ 2003-06-26 17:03 ` Joel Soete
  2003-06-26 17:06   ` Matthew Wilcox
  0 siblings, 1 reply; 23+ messages in thread
From: Joel Soete @ 2003-06-26 17:03 UTC (permalink / raw)
  To: Matthew Wilcox, parisc-linux

Hi Willy,

>
> 2.4.21 allocates sysctl number 56 to something else, so i had to renumber
> the hppa sysctls to 57 and 58.
>
Sorry for my ignorance but how much those number are important (as afaik
they are named by #define)?

Thanks in advance,
    Joel


---------------------------------
Tiscali ADSL: 19,50 euros/mois...abonnez-vous sur www.tiscali.be

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-06-26 17:03 ` Joel Soete
@ 2003-06-26 17:06   ` Matthew Wilcox
  2003-06-26 17:45     ` Randolph Chung
                       ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Matthew Wilcox @ 2003-06-26 17:06 UTC (permalink / raw)
  To: Joel Soete; +Cc: Matthew Wilcox, parisc-linux

On Thu, Jun 26, 2003 at 07:03:40PM +0200, Joel Soete wrote:
> Hi Willy,
> 
> >
> > 2.4.21 allocates sysctl number 56 to something else, so i had to renumber
> > the hppa sysctls to 57 and 58.
> >
> Sorry for my ignorance but how much those number are important (as afaik
> they are named by #define)?

they're irrelevant if you use them via /proc/sys to access the feature.
they're really important if you use them via sysctl(3).

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-06-26 17:06   ` Matthew Wilcox
@ 2003-06-26 17:45     ` Randolph Chung
  2003-06-27 14:41     ` Joel Soete
  2003-06-27 16:21     ` Joel Soete
  2 siblings, 0 replies; 23+ messages in thread
From: Randolph Chung @ 2003-06-26 17:45 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Joel Soete, parisc-linux

> they're irrelevant if you use them via /proc/sys to access the feature.
> they're really important if you use them via sysctl(3).

fwiw we've already renumbered them at least twice in the past, and no
one has screamed yet :P

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-06-26 17:06   ` Matthew Wilcox
  2003-06-26 17:45     ` Randolph Chung
@ 2003-06-27 14:41     ` Joel Soete
  2003-06-27 16:21     ` Joel Soete
  2 siblings, 0 replies; 23+ messages in thread
From: Joel Soete @ 2003-06-27 14:41 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Matthew Wilcox, parisc-linux, Randolph Chung, Grant Grundler

> they're irrelevant if you use them via /proc/sys to access the feature.
> they're really important if you use them via sysctl(3).

The relevant good pratice would be to use named const as ERR :-)

But mainly, as promise I co 2.4.21-p0 and copare with my merge and notice
some requested add patch:

diff -NaurX dontdiff linux-2.4.21-pa0/drivers/ide/pci/ns87415.c linux-2.4.21-rc8-pa35/drivers/ide/pci/ns87415.c
--- linux-2.4.21-pa0/drivers/ide/pci/ns87415.c	2003-06-26 17:07:20.000000000
+0200
+++ linux-2.4.21-rc8-pa35/drivers/ide/pci/ns87415.c	2003-02-28 18:43:45.000000000
+0100
@@ -27,6 +27,10 @@
 
 #include "ns87415.h"
 
+#if defined(__hppa__) && defined(CONFIG_SUPERIO)
+#include <asm/superio.h>
+#endif
+
 static unsigned int ns87415_count = 0, ns87415_control[MAX_HWIFS] = { 0
};
 
 /*
@@ -200,7 +204,11 @@
 	}
 
 	if (!using_inta)
+#if defined(__hppa__) && defined(CONFIG_SUPERIO)
+		hwif->irq = superio_get_ide_irq();	/* legacy mode */
+#else
 		hwif->irq = hwif->channel ? 15 : 14;	/* legacy mode */
+#endif
 	else if (!hwif->irq && hwif->mate && hwif->mate->irq)
 		hwif->irq = hwif->mate->irq;	/* share IRQ with mate */
 
diff -NaurX dontdiff linux-2.4.21-pa0/include/asm-parisc/system_irqsave.h
linux-2.4.21-rc8-pa35/include/asm-parisc/system_irqsave.h
--- linux-2.4.21-pa0/include/asm-parisc/system_irqsave.h	2003-06-27 07:49:56.000000000
+0200
+++ linux-2.4.21-rc8-pa35/include/asm-parisc/system_irqsave.h	2003-06-27
15:52:10.000000000 +0200
@@ -7,6 +7,9 @@
 #define __cli()	__asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory"
)
 #define __sti()	__asm__ __volatile__("ssm %0,%%r0\n" : : "i" (PSW_I) : "memory"
)
 
+#define __save_and_cli(x)  do { __save_flags(x); __cli(); } while(0);
+#define __save_and_sti(x)  do { __save_flags(x); __sti(); } while(0);
+
 #define local_irq_save(x) \
 	__asm__ __volatile__("rsm %1,%0" : "=r" (x) :"i" (PSW_I) : "memory" )
 #define local_irq_restore(x) \
=================================================================================
btw I also test following stuff which seems to works too:
diff -NaurX dontdiff linux-2.4.21-pa0/include/asm-parisc/system_irqsave.h.mine
linux-2.4.21-rc8-pa35/include/asm-parisc/system_irqsave.h.mine
--- linux-2.4.21-pa0/include/asm-parisc/system_irqsave.h.mine	1970-01-01
01:00:00.000000000 +0100
+++ linux-2.4.21-rc8-pa35/include/asm-parisc/system_irqsave.h.mine	2003-06-27
15:50:11.000000000 +0200
@@ -0,0 +1,21 @@
+#ifndef __PARISC_SYSTEM_IRQSAVE_H
+#define __PARISC_SYSTEM_IRQSAVE_H
+
+/* interrupt control */
+#define __save_flags(x)	__asm__ __volatile__("ssm 0, %0" : "=r" (x) : :
"memory")
+#define __restore_flags(x) __asm__ __volatile__("mtsm %0" : : "r" (x) :
"memory")
+#define __cli()	__asm__ __volatile__("rsm %0,%%r0\n" : : "i" (PSW_I) : "memory"
)
+#define __sti()	__asm__ __volatile__("ssm %0,%%r0\n" : : "i" (PSW_I) : "memory"
)
+
+#define __save_and_cli(x)  do { __save_flags(x); __cli(); } while(0);
+#define __save_and_sti(x)  do { __save_flags(x); __sti(); } while(0);
+
+/* For spinlocks etc */
+#define local_irq_save(x)  __save_and_cli(x)
+#define local_irq_set(x)   __save_and_sti(x)
+
+#define local_irq_restore(x) __restore_flags(x)
+#define local_irq_disable() __cli()
+#define local_irq_enable()  __sti()
+
+#endif /* __PARISC_SYSTEM_IRQSAVE_H */
=================================================================================

And also some various stuff as:

- a clean up (just put in comment for remind):

diff -NaurX dontdiff linux-2.4.21-pa0/arch/parisc/kernel/parisc_ksyms.c linux-2.4.21-rc8-pa35/arch/parisc/kernel/parisc_ksyms.c
--- linux-2.4.21-pa0/arch/parisc/kernel/parisc_ksyms.c	2003-03-17 08:14:55.000000000
+0100
+++ linux-2.4.21-rc8-pa35/arch/parisc/kernel/parisc_ksyms.c	2003-05-23 13:31:18.000000000
+0200
@@ -167,7 +167,7 @@
 extern void $$remI(void);
 extern void $$remU(void);
 extern void $$mulI(void);
-extern void $$mulU(void);
+/* extern void $$mulU(void); */
 extern void $$divU_3(void);
 extern void $$divU_5(void);
 extern void $$divU_6(void);
@@ -193,7 +193,7 @@
 EXPORT_SYMBOL_NOVERS($$remU);
 EXPORT_SYMBOL_NOVERS($$mulI);
 #ifndef __LP64__
-EXPORT_SYMBOL_NOVERS($$mulU);
+/* EXPORT_SYMBOL_NOVERS($$mulU); */
 #endif
 EXPORT_SYMBOL_NOVERS($$divU_3);
 EXPORT_SYMBOL_NOVERS($$divU_5);
diff -NaurX dontdiff linux-2.4.21-pa0/arch/parisc/kernel/processor.c linux-2.4.21-rc8-pa35/arch/parisc/kernel/processor.c
--- linux-2.4.21-pa0/arch/parisc/kernel/processor.c	2003-06-27 07:35:56.000000000
+0200
+++ linux-2.4.21-rc8-pa35/arch/parisc/kernel/processor.c	2002-12-20 15:56:19.000000000
+0100
@@ -77,8 +77,6 @@
 	unsigned long txn_addr;
 	unsigned long cpuid;
 	struct cpuinfo_parisc *p;
-	extern struct irq_region_ops cpu_irq_ops; /* arch/parisc...irq.c */
-	extern struct irqaction cpu_irq_actions[]; /* arch/parisc...irq.c */
 
 #ifndef CONFIG_SMP
 	if (boot_cpu_data.cpu_count > 0) {

- a small typo :-)

diff -NaurX dontdiff linux-2.4.21-pa0/drivers/char/genrtc.c linux-2.4.21-rc8-pa35/drivers/char/genrtc.c
--- linux-2.4.21-pa0/drivers/char/genrtc.c	2003-01-13 08:38:36.000000000
+0100
+++ linux-2.4.21-rc8-pa35/drivers/char/genrtc.c	2003-05-08 22:10:52.000000000
+0200
@@ -99,7 +99,7 @@
 static void gen_rtc_interrupt(unsigned long arg);
 
 /*
- * Routine to poll RTC seconds field for change as often as posible,
+ * Routine to poll RTC seconds field for change as often as possible,
  * after first RTC_UIE use timer to reduce polling
  */
 static void genrtc_troutine(void *data)

- a work-around for gcc-3.3 awaiting final fix:

--- linux-2.4.21-pa0/drivers/net/tun.c	2002-08-07 07:50:51.000000000 +0200
+++ linux-2.4.21-rc8-pa35/drivers/net/tun.c	2003-06-27 12:34:17.000000000
+0200
@@ -359,7 +359,9 @@
 		/* Device exist */
 		tun = dev->priv;
 
-		if (dev->init != tun_net_init || tun->attached)
+                /* (void*) is a temporary w-a because of
+                   hppa gcc-3.3 __canonicalize_funcptr_for_compare() */
+		if (dev->init != (void*)tun_net_init || tun->attached)
 			return -EBUSY;
 
 		/* Check permissions */

- Grant what do you think about this:

diff -NaurX dontdiff linux-2.4.21-pa0/drivers/sound/ad1889.c linux-2.4.21-rc8-pa35/drivers/sound/ad1889.c
--- linux-2.4.21-pa0/drivers/sound/ad1889.c	2003-06-27 07:46:37.000000000
+0200
+++ linux-2.4.21-rc8-pa35/drivers/sound/ad1889.c	2003-05-08 22:43:44.000000000
+0200
@@ -24,7 +24,7 @@
 <jsm> tausq: Anyway, to set up sample rates for D to A, you just use the
sample rate on the codec. For A to D, you need to set the codec always to
48K (using the split sample rate feature on the codec) and then set the resampler
on the AD1889 to the sample rate you want.
 <jsm> Also, when changing the sample rate on the codec you need to power
it down and re power it up for the change to take effect!
  *
- * $Id: ad1889.c,v 1.2 2002/10/16 04:14:12 grundler Exp $
+ * $Id: ad1889.c,v 1.3 2002/10/19 21:31:44 grundler Exp $
  */
 #include <linux/config.h>
 #include <linux/module.h>
@@ -816,7 +816,7 @@
 	ad1889_dev_t *dev = ac97->private_data;
 
 	//DBG("Writing 0x%x to 0x%lx\n", val, dev->regbase + 0x100 + reg);
-	return AD1889_WRITEW(dev, 0x100 + reg, val);
+	AD1889_WRITEW(dev, 0x100 + reg, val);
 }
 
 static u16 ad1889_codec_read(struct ac97_codec *ac97, u8 reg)
@@ -1059,7 +1059,7 @@
 	name:		DEVNAME,
 	id_table:	ad1889_id_tbl,
 	probe:		ad1889_probe,
-	remove:		ad1889_remove,
+	remove:		__devexit_p(ad1889_remove),
 };
 
 static int __init ad1889_init_module(void)

- another cleanup (don't remember why :-?)

diff -NaurX dontdiff linux-2.4.21-pa0/include/asm-parisc/ide.h linux-2.4.21-rc8-pa35/include/asm-parisc/ide.h
--- linux-2.4.21-pa0/include/asm-parisc/ide.h	2003-06-27 07:49:55.000000000
+0200
+++ linux-2.4.21-rc8-pa35/include/asm-parisc/ide.h	2003-06-05 16:55:22.000000000
+0200
@@ -20,8 +20,6 @@
 #define MAX_HWIFS	2
 #endif
 
-#define ide__sti()      __sti()
-
 static __inline__ int ide_default_irq(ide_ioreg_t base)
 {
 	switch (base) {

- and last (please see comments below, thanks)

diff -NaurX dontdiff linux-2.4.21-pa0/include/asm-parisc/uaccess.h linux-2.4.21-rc8-pa35/include/asm-parisc/uaccess.h
--- linux-2.4.21-pa0/include/asm-parisc/uaccess.h	2002-10-28 08:05:18.000000000
+0100
+++ linux-2.4.21-rc8-pa35/include/asm-parisc/uaccess.h	2003-06-11 14:39:12.000000000
+0200
@@ -28,6 +28,11 @@
  * that put_user is the same as __put_user, etc.
  */
 
+extern int __get_kernel_bad(void);
+extern int __get_user_bad(void);
+extern int __put_kernel_bad(void);
+extern int __put_user_bad(void);
+
 #define access_ok(type,addr,size)   (1)
 #define verify_area(type,addr,size) (0)
 
@@ -35,8 +40,12 @@
 #define get_user __get_user
 
 #if BITS_PER_LONG == 32
-#define LDD_KERNEL(ptr)		BUG()
-#define LDD_USER(ptr)		BUG()
+#define LDD_KERNEL(ptr)		__get_kernel_bad();
+#define LDD_USER(ptr)		__get_user_bad();
+/*
+#define STD_KERNEL(x, ptr)	__put_kernel_bad();
+#define STD_USER(x, ptr)	__put_user_bad();
+*/
 #define STD_KERNEL(x, ptr) __put_kernel_asm64(x,ptr)
 #define STD_USER(x, ptr) __put_user_asm64(x,ptr)
 #else
@@ -75,7 +84,7 @@
 	    case 2: __get_kernel_asm("ldh",ptr); break; \
 	    case 4: __get_kernel_asm("ldw",ptr); break; \
 	    case 8: LDD_KERNEL(ptr); break;		\
-	    default: BUG(); break;                      \
+	    default: __get_kernel_bad(); break;         \
 	    }                                           \
 	}                                               \
 	else {                                          \
@@ -84,7 +93,7 @@
 	    case 2: __get_user_asm("ldh",ptr); break;   \
 	    case 4: __get_user_asm("ldw",ptr); break;   \
 	    case 8: LDD_USER(ptr);  break;		\
-	    default: BUG(); break;                      \
+	    default: __get_user_bad(); break;           \
 	    }                                           \
 	}                                               \
 							\
@@ -144,7 +153,7 @@
 	    case 2: __put_kernel_asm("sth",x,ptr); break;       \
 	    case 4: __put_kernel_asm("stw",x,ptr); break;       \
 	    case 8: STD_KERNEL(x,ptr); break;			\
-	    default: BUG(); break;                              \
+	    default: __put_kernel_bad(); break;			\
 	    }                                                   \
 	}                                                       \
 	else {                                                  \
@@ -153,7 +162,7 @@
 	    case 2: __put_user_asm("sth",x,ptr); break;         \
 	    case 4: __put_user_asm("stw",x,ptr); break;         \
 	    case 8: STD_USER(x,ptr); break;			\
-	    default: BUG(); break;                              \
+	    default: __put_user_bad(); break;			\
 	    }                                                   \
 	}                                                       \
 								\
@@ -211,45 +220,36 @@
 		: "=r"(__pu_err)                            \
 		: "r"(ptr), "r"(x), "0"(__pu_err))
 
-static inline void __put_kernel_asm64(u64 x, void *ptr)
-{
-	u32 hi = x>>32;
-	u32 lo = x&0xffffffff;
-	__asm__ __volatile__ (
-		"\n1:\tstw %1,0(%0)\n"
-		"\n2:\tstw %2,4(%0)\n"
-		"3:\n"
-		"\t.section __ex_table,\"a\"\n"
-		 "\t.word\t1b\n"
-		 "\t.word\t(3b-1b)+1\n"
-		 "\t.word\t2b\n"
-		 "\t.word\t(3b-2b)+1\n"
-		 "\t.previous"
-		: : "r"(ptr), "r"(hi), "r"(lo));
-
-}
-
-static inline void __put_user_asm64(u64 x, void *ptr)
-{
-	u32 hi = x>>32;
-	u32 lo = x&0xffffffff;
-	__asm__ __volatile__ (
-		"\n1:\tstw %1,0(%%sr3,%0)\n"
-		"\n2:\tstw %2,4(%%sr3,%0)\n"
-		"3:\n"
-		"\t.section __ex_table,\"a\"\n"
-		 "\t.word\t1b\n"
-		 "\t.word\t(3b-1b)+1\n"
-		 "\t.word\t2b\n"
-		 "\t.word\t(3b-2b)+1\n"
-		 "\t.previous"
-		: : "r"(ptr), "r"(hi), "r"(lo));
+#define __put_kernel_asm64(x, ptr)		\
+	__asm__ __volatile__ (			\
+		"\n1:\tstw\t%2,0(%1)\n"		\
+		"2:\tstw\t%R2,4(%1)\n"		\
+		"3:\n"				\
+		"\t.section __ex_table,\"a\"\n"	\
+		 "\t.word\t1b\n"		\
+		 "\t.word\t(3b-1b)+1\n"		\
+		 "\t.word\t2b\n"		\
+		 "\t.word\t(3b-2b)+1\n"		\
+		 "\t.previous"			\
+		: "=r"(__pu_err)		\
+		: "r"(ptr), "r"(x), "0"(__pu_err))
 
-}
+#define __put_user_asm64(x, ptr)		\
+	__asm__ __volatile__ (			\
+		"\n1:\tstw\t%2,0(%%sr3,%1)\n"	\
+		"2:\tstw\t%R2,4(%%sr3,%1)\n"	\
+		"3:\n"				\
+		"\t.section __ex_table,\"a\"\n"	\
+		 "\t.word\t1b\n"		\
+		 "\t.word\t(3b-1b)+1\n"		\
+		 "\t.word\t2b\n"		\
+		 "\t.word\t(3b-2b)+1\n"		\
+		 "\t.previous"			\
+		: "=r"(__pu_err)		\
+		: "r"(ptr), "r"(x), "0"(__pu_err))
 
 #endif
 
-
 /*
  * Complex access routines -- external declarations
  */

================================================================================
Comments:

- The first changes (xxx_bad(void)) was agreed earlier by Randolph but never
comited (?). The goal is to breack the build of the kernel and so avoid the
risk to boot one (as I do when I test evms or [xj]fs which required __put_XXX_asm64)
which can unexpected damages

- The second replace Randolph __put_XXX_asm64(); it does the same job and
avoid severall warning at compile time as:
[...]
binfmt_elf.c:225: warning: passing arg 1 of `__put_kernel_asm64' makes integer
from pointer without a cast
binfmt_elf.c:225: warning: passing arg 1 of `__put_user_asm64' makes integer
from pointer without a cast
binfmt_elf.c:226: warning: passing arg 1 of `__put_kernel_asm64' makes integer
from pointer without a cast
binfmt_elf.c:226: warning: passing arg 1 of `__put_user_asm64' makes integer
from pointer without a cast
binfmt_elf.c:236: warning: passing arg 1 of `__put_kernel_asm64' makes integer
from pointer without a cast
binfmt_elf.c:236: warning: passing arg 1 of `__put_user_asm64' makes integer
from pointer without a cast
[...]

Thanks in advance for your attention,
    Joel




---------------------------------
Tiscali ADSL: 19,50 euros/mois...abonnez-vous sur www.tiscali.be

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-06-26 17:06   ` Matthew Wilcox
  2003-06-26 17:45     ` Randolph Chung
  2003-06-27 14:41     ` Joel Soete
@ 2003-06-27 16:21     ` Joel Soete
  2003-06-27 16:52       ` Alan Cox
  2 siblings, 1 reply; 23+ messages in thread
From: Joel Soete @ 2003-06-27 16:21 UTC (permalink / raw)
  To: Matthew Wilcox, Alan Cox; +Cc: Matthew Wilcox, parisc-linux

Too bad in 2.4.22-pre2:

diff -urN linux-2.4.22-pre1/include/linux/sysctl.h linux-2.4.22-pre2/include/linux/sysctl.h
--- linux-2.4.22-pre1/include/linux/sysctl.h	2003-06-13 07:51:39.000000000
-0700
+++ linux-2.4.22-pre2/include/linux/sysctl.h	2003-06-26 15:02:23.000000000
-0700
@@ -125,6 +125,7 @@
 	KERN_TAINTED=53,	/* int: various kernel tainted flags */
 	KERN_CADPID=54,		/* int: PID of the process to notify on CAD */
  	KERN_CORE_PATTERN=56,	/* string: pattern for core-files */
+	KERN_PPC_L3CR=57,       /* l3cr register on PPC */
 };
 
 
which interfere with your:
 	KERN_HPPA_PWRSW=57,	/* int: hppa soft-power enable */
 	KERN_HPPA_UNALIGNED=58,	/* int: hppa unaligned-trap enable */
};

What to do?

Thanks,
    Joel


---------------------------------
Tiscali ADSL: 19,50 euros/mois...abonnez-vous sur www.tiscali.be

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-06-27 16:21     ` Joel Soete
@ 2003-06-27 16:52       ` Alan Cox
  2003-07-07 16:00         ` Joel Soete
  0 siblings, 1 reply; 23+ messages in thread
From: Alan Cox @ 2003-06-27 16:52 UTC (permalink / raw)
  To: Joel Soete; +Cc: Matthew Wilcox, HPPA List

On Gwe, 2003-06-27 at 17:21, Joel Soete wrote:
> which interfere with your:
>  	KERN_HPPA_PWRSW=57,	/* int: hppa soft-power enable */
>  	KERN_HPPA_UNALIGNED=58,	/* int: hppa unaligned-trap enable */
> };
> 
> What to do?

Get the HP ones into 2.5 then they are fixed "right" values

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
       [not found] ` <3ED70CF10000AE2E@ocpmta2.freegates.net>
@ 2003-06-27 16:54   ` Grant Grundler
  2003-06-28 10:48     ` Joel Soete
  2003-07-05 23:08   ` Grant Grundler
  1 sibling, 1 reply; 23+ messages in thread
From: Grant Grundler @ 2003-06-27 16:54 UTC (permalink / raw)
  To: Joel Soete; +Cc: parisc-linux

Joel,
I mistakenly replied only to you on my previous mail.
Can you please forward my previous reply to parisc-linux mailing list
or send a copy back to me - I'll post it to the list then.

On Fri, Jun 27, 2003 at 06:14:58PM +0200, Joel Soete wrote:
> Hi Grant,
> 
> > diff -NaurX dontdiff linux-2.4.21-pa0/drivers/ide/pci/ns87415.c linux-2.4.21-rc8-pa35/drivers/ide/pci/ns87415.c
> 
> > This is for c3000/j5000/et al workstations.
> > NS "SuckyIO" multifunction chip includes ns87415 compatible IDE controller.
> 
> ...
> >> +#define __save_and_cli(x)  do { __save_flags(x); __cli(); } while(0);
> >> +#define __save_and_sti(x)  do { __save_flags(x); __sti(); } while(0);
> >> +
> 
> > This is something different - but I'd think this is needed too.
> > Make sure this isn't a merge error (ie see if it's defined elsewhere).
> 
> I need it to make work my ide cdrom onto my b2k (I grab this stuff
> from another platform)

ah ok.

The IDE CDROM are pretty standard devices. Note the DMA does NOT work.
And even with PIO mode, it just barely works - enough to do an install.
So don't use it too much unless you can afford to crash your box.
At least that was my experience with 2.4.19 or so.

> The following stuff is just a variant (just for info)

ok.

...
> > If they are no longer referenced, that's fine.
> hmm in fact the last ref of 'cpu_irq_actions' is in arch/parisc/kernel/processor.c
> and now embrace by #if 0 [...] #endif
> (I will see to cleanup too)
> ...

ok

> 
> > I need the above changes in a format that I apply with "patch -p1 < diff"
> 
> Here is attached Mydiff2421.txt

ok. let me apply local and try it out first. If all is well, should see
something by this weekend.

thanks,
grant

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-06-27 16:54   ` Grant Grundler
@ 2003-06-28 10:48     ` Joel Soete
  0 siblings, 0 replies; 23+ messages in thread
From: Joel Soete @ 2003-06-28 10:48 UTC (permalink / raw)
  To: Grant Grundler; +Cc: Joel Soete, parisc-linux

Grant Grundler wrote:

>Joel,
>I mistakenly replied only to you on my previous mail.
>Can you please forward my previous reply to parisc-linux mailing list
>or send a copy back to me - I'll post it to the list then.
>
No pb, I kust forward it to the p-l ml.

>
>On Fri, Jun 27, 2003 at 06:14:58PM +0200, Joel Soete wrote:
>  
>
>>Hi Grant,
>>
>>    
>>
>>>diff -NaurX dontdiff linux-2.4.21-pa0/drivers/ide/pci/ns87415.c linux-2.4.21-rc8-pa35/drivers/ide/pci/ns87415.c
>>>      
>>>
>>>This is for c3000/j5000/et al workstations.
>>>NS "SuckyIO" multifunction chip includes ns87415 compatible IDE controller.
>>>      
>>>
>>...
>>    
>>
>>>>+#define __save_and_cli(x)  do { __save_flags(x); __cli(); } while(0);
>>>>+#define __save_and_sti(x)  do { __save_flags(x); __sti(); } while(0);
>>>>+
>>>>        
>>>>
>>>This is something different - but I'd think this is needed too.
>>>Make sure this isn't a merge error (ie see if it's defined elsewhere).
>>>      
>>>
>>I need it to make work my ide cdrom onto my b2k (I grab this stuff
>>from another platform)
>>    
>>
>
>ah ok.
>
>The IDE CDROM are pretty standard devices. Note the DMA does NOT work.
>And even with PIO mode, it just barely works - enough to do an install.
>So don't use it too much unless you can afford to crash your box.
>At least that was my experience with 2.4.19 or so.
>
Yes also experiment this inconvinience. I just needed it to install the 
initial debian (in its time) and now to read some doc or small ft via rw-cd.

>>The following stuff is just a variant (just for info)
>>    
>>
>
>ok.
>
>...
>  
>
>>>If they are no longer referenced, that's fine.
>>>      
>>>
>>hmm in fact the last ref of 'cpu_irq_actions' is in arch/parisc/kernel/processor.c
>>and now embrace by #if 0 [...] #endif
>>(I will see to cleanup too)
>>...
>>    
>>
>
>ok
>
>  
>
>>>I need the above changes in a format that I apply with "patch -p1 < diff"
>>>      
>>>
>>Here is attached Mydiff2421.txt
>>    
>>
>
>ok. let me apply local and try it out first.
>
Logical

> If all is well, should see
>something by this weekend.
>  
>
It works for my b180 and b2k. I will test it also on the N (still UP 
mode) next week.

Good luck and thanks for your attention,
    Joel

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
       [not found] ` <3ED70CF10000AE2E@ocpmta2.freegates.net>
  2003-06-27 16:54   ` Grant Grundler
@ 2003-07-05 23:08   ` Grant Grundler
  2003-07-05 23:53     ` John David Anglin
  1 sibling, 1 reply; 23+ messages in thread
From: Grant Grundler @ 2003-07-05 23:08 UTC (permalink / raw)
  To: Joel Soete; +Cc: parisc-linux

On Fri, Jun 27, 2003 at 06:14:58PM +0200, Joel Soete wrote:
> I need it to make work my ide cdrom onto my b2k (I grab this stuff
> from another platform)


Joel,
I've reworked the __save_and_cli and __save_and_sti mess so that's ok to
commit along with most of what you previously preposed.  I've tested on
64-bit (a500) but am having several problems with 32-bit (c3000) config.

Patch applies to our current CVS:
	ftp://ftp.parisc-linux.org/patches/diff-2.4.21-pa2

My .config and untested kernel/modules are at:
	ftp://ftp.parisc-kernel.org/kernels/c3000/2.4.21-pa2.tgz

Summary of issues that follow:
1) __canonicalize_funcptr_for_compare still a problem with 32-bit modules
2) Makefiles messed up for ide-proc.o	(seems to have a fix already)
3) various IDE modules not exporting symbols.
4) added EXPORT_SYMBOL(sys_wait4) as well.
5) Lack of a test machine at home. Can someone test c3000/2.4.21-pa2.tgz?

Patch also fixes asm problem with arch/parisc/kernel/real2.S.


Details:

1) Dave warned us last December about __canonicalize_funcptr_for_compare
   and gcc-3.3. "make modules_install" fails with this symbol missing in:

   	drivers/ide/ide-disk.o (fixed in patch but won't be committed)
	drivers/scsi/aic79xx/aic79xx.o
	fs/smbfs/smbfs.o
	lib/zlib_deflate/zlib_deflate.o

   Having no clue how to properly fix this in either the toolchain
   or where to find the man page for __canonicalize_funcptr_for_compare(),
   I disabled the last three in my .config and hacked ide-disk.c
   to use (void *) for comparisons.
   Any volunteer to write some sample code for this?
   
2) CONFIG_IDE=m leads to lots of unresolved symbols in IDE modules.
   Willy just pointed me at

   	http://www.ussg.iu.edu/hypermail/linux/kernel/0307.0/0995.html

   which should solve this problem.  The description below is just FYI.
   I'll rework the IDE patch to follow "upstream" fix in the next
   couple of days.

   Basic problem starts with drivers/Makefile:
   	subdir-$(CONFIG_IDE) += ide
   causing the "make vmlinux" to ignore drivers/ide subdir if CONFIG_IDE=m.
   This doesn't work when CONFIG_PROC_FS=y. ide-proc.o doesn't get built.
   drivers/ide/Makefile:
	ifeq($(CONFIG_BLK_DEV_IDE),y)
		obj-$(CONFIG_PROC_FS) += ide-proc.o
	endif

   I hacked  drivers/ide/Makefile to read:
	ifeq ($(CONFIG_PROC_FS),y)
	obj-$(CONFIG_BLK_DEV_IDE)               += ide-proc.o
	endif
   It presumes (1) PROC_FS is y or n and never 'm' and (2) IDE /proc
   support should be loaded as a module if CONFIG_BLK_DEV_IDE=m.


3) various IDE modules not exporting symbols.
	+EXPORT_SYMBOL_GPL(ide_release_dma);
	+EXPORT_SYMBOL(do_ide_request);
	+EXPORT_SYMBOL(ide_modules);
	+EXPORT_SYMBOL(generic_subdriver_entries);
	+EXPORT_SYMBOL(ide_find_setting_by_name);
	+EXPORT_SYMBOL(ide_read_setting);
	+EXPORT_SYMBOL(ide_add_generic_settings);
	+EXPORT_SYMBOL_GPL(ide_scan_pcibus);

4) added EXPORT_SYMBOL(sys_wait4) as well.

5) Lack of a test machine at home. I'm waiting for c3k's I've ordered.
   Nice folks sent me "workstation power cord kit" via priority mail but
   no sign of the workstation itself. :^/
   If someone can test this patch on a C3k, I'd be willing to commit
   the non-IDE parts of it. IDE needs rework to follow upstream's fix.

hth,
grant

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-05 23:08   ` Grant Grundler
@ 2003-07-05 23:53     ` John David Anglin
  2003-07-06  4:12       ` Grant Grundler
  0 siblings, 1 reply; 23+ messages in thread
From: John David Anglin @ 2003-07-05 23:53 UTC (permalink / raw)
  To: Grant Grundler; +Cc: jsoe0708, parisc-linux

> 1) Dave warned us last December about __canonicalize_funcptr_for_compare
>    and gcc-3.3. "make modules_install" fails with this symbol missing in:
> 
>    	drivers/ide/ide-disk.o (fixed in patch but won't be committed)
> 	drivers/scsi/aic79xx/aic79xx.o
> 	fs/smbfs/smbfs.o
> 	lib/zlib_deflate/zlib_deflate.o
> 
>    Having no clue how to properly fix this in either the toolchain
>    or where to find the man page for __canonicalize_funcptr_for_compare(),
>    I disabled the last three in my .config and hacked ide-disk.c
>    to use (void *) for comparisons.
>    Any volunteer to write some sample code for this?

Instead of adding (void *) to each comparison, you could add a kernel
version of __canonicalize_funcptr_for_compare:

__canonicalize_funcptr_for_compare:
	bv %r0(%r2)
	copy %r26,%r28

or for PA 2.0

__canonicalize_funcptr_for_compare:
        bve (%r2)
	copy %r26,%r28

I think there was a possible solution along these lines posted on the list
a few months ago (joel?).

This solution assumes that canonicalization is unnecessary in the kernel.
Probably, in most cases it is.  However, if you really need to canonicalize
a function pointer from user space, then you are going to have to figure
out how to call into the dynamic loader from the kernel.  This obviously
isn't very safe.  So, possibly this implies that function pointers passed
in syscalls should be canonicalized before the kernel is entered (i.e.,
glibc should do the canonicalization).

As far as kernel modules go, I don't know how function pointers are
handled.  If you pass a function pointer from one module to another,
does it need canonicalization?  If canonicalization is never necessary
in the kernel, possibly I could add a GCC option to disable canonicalization.

Sorry, about the lack of documentation.  To see what the function does,
it's currently necessary to look in the GCC gcc/config/pa directory.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-05 23:53     ` John David Anglin
@ 2003-07-06  4:12       ` Grant Grundler
  2003-07-06 16:12         ` Joel Soete
  2003-07-07 20:02         ` Carlos O'Donell
  0 siblings, 2 replies; 23+ messages in thread
From: Grant Grundler @ 2003-07-06  4:12 UTC (permalink / raw)
  To: John David Anglin; +Cc: jsoe0708, parisc-linux

On Sat, Jul 05, 2003 at 07:53:34PM -0400, John David Anglin wrote:
> Instead of adding (void *) to each comparison,

This is just a temporary workaround and I have no plans of committing
any (void *) casts to fix this problem.

> you could add a kernel
> version of __canonicalize_funcptr_for_compare:
> 
> __canonicalize_funcptr_for_compare:
> 	bv %r0(%r2)
> 	copy %r26,%r28
> 
> or for PA 2.0
> 
> __canonicalize_funcptr_for_compare:
>         bve (%r2)
> 	copy %r26,%r28
> 
> I think there was a possible solution along these lines posted on the list
> a few months ago (joel?).

Ok.  I didn't see it when trolling the mail archive.
No matter, I'll try it.
Anyone have an opinion on which arch/parisc file this should go in?

> This solution assumes that canonicalization is unnecessary in the kernel.
> Probably, in most cases it is.  However, if you really need to canonicalize
> a function pointer from user space, then you are going to have to figure
> out how to call into the dynamic loader from the kernel.  This obviously
> isn't very safe.  So, possibly this implies that function pointers passed
> in syscalls should be canonicalized before the kernel is entered (i.e.,
> glibc should do the canonicalization).
> 
> As far as kernel modules go, I don't know how function pointers are
> handled.  If you pass a function pointer from one module to another,
> does it need canonicalization?

I depend on willy/tausq/amodra/et al to understand stuff like this.

> If canonicalization is never necessary
> in the kernel, possibly I could add a GCC option to disable canonicalization.

I think willy suggested privately that might be case.

> Sorry, about the lack of documentation.  To see what the function does,
> it's currently necessary to look in the GCC gcc/config/pa directory.

oh no problem. Kernel has lots of stale/missing documentation too.
Just need guidance on where to find the relevant code and which
path to take.

thanks,
grant

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-06  4:12       ` Grant Grundler
@ 2003-07-06 16:12         ` Joel Soete
  2003-07-07 20:02         ` Carlos O'Donell
  1 sibling, 0 replies; 23+ messages in thread
From: Joel Soete @ 2003-07-06 16:12 UTC (permalink / raw)
  To: Grant Grundler; +Cc: John David Anglin, jsoe0708, parisc-linux

Grant Grundler wrote:

>On Sat, Jul 05, 2003 at 07:53:34PM -0400, John David Anglin wrote:
>  
>
>>Instead of adding (void *) to each comparison,
>>    
>>
>
>This is just a temporary workaround and I have no plans of committing
>any (void *) casts to fix this problem.
>
>  
>
>>you could add a kernel
>>version of __canonicalize_funcptr_for_compare:
>>
>>__canonicalize_funcptr_for_compare:
>>	bv %r0(%r2)
>>	copy %r26,%r28
>>
>>or for PA 2.0
>>
>>__canonicalize_funcptr_for_compare:
>>        bve (%r2)
>>	copy %r26,%r28
>>
>>I think there was a possible solution along these lines posted on the list
>>a few months ago (joel?).
>>    
>>
Yes I test succesfully (as w-a) some similar solution. (see: 
<http://lists.parisc-linux.org/pipermail/parisc-linux/2003-May/019982.html>) 
but I doubt that it is the right way ...

>Ok.  I didn't see it when trolling the mail archive.
>No matter, I'll try it.
>Anyone have an opinion on which arch/parisc file this should go in?
>  
>
... arch/parisc/lib/fptr.c seems well the right place (what do you think?)
but the rest of EXPORT_SYMBOL was just 'to make it compile' but do not 
sound (please don't ask me to decribe this sound :) ) to me the way it 
have to be (sorry I was waiting more guidance to submit more complete 
work :( )

hth,
    Joel

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-06-27 16:52       ` Alan Cox
@ 2003-07-07 16:00         ` Joel Soete
  2003-07-07 16:05           ` Alan Cox
  0 siblings, 1 reply; 23+ messages in thread
From: Joel Soete @ 2003-07-07 16:00 UTC (permalink / raw)
  To: Alan Cox; +Cc: Matthew Wilcox, HPPA List

Hi Alan,

> >On Gwe, 2003-06-27 at 17:21, Joel Soete wrote:
> > which interfere with your:
> >  	KERN_HPPA_PWRSW=57,	/* int: hppa soft-power enable */
> >  	KERN_HPPA_UNALIGNED=58,	/* int: hppa unaligned-trap enable */
> > };
> > 
> > What to do?
> 
> Get the HP ones into 2.5 then they are fixed "right" values

Ok but now in 2.4.22-pre3:
[...]
  	KERN_EXCEPTION_TRACE=58,	/* boolean: exception trace */
[...]

Thanks for further advise,
    Joel




------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003.
On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-07 16:00         ` Joel Soete
@ 2003-07-07 16:05           ` Alan Cox
  2003-07-07 16:31             ` Matthew Wilcox
  2003-07-07 16:33             ` Joel Soete
  0 siblings, 2 replies; 23+ messages in thread
From: Alan Cox @ 2003-07-07 16:05 UTC (permalink / raw)
  To: Joel Soete; +Cc: Matthew Wilcox, HPPA List

On Llu, 2003-07-07 at 17:00, Joel Soete wrote:
> > Get the HP ones into 2.5 then they are fixed "right" values
> 
> Ok but now in 2.4.22-pre3:
> [...]
>   	KERN_EXCEPTION_TRACE=58,	/* boolean: exception trace */
> [...]

Same comment still applies. The 2.5. ones are definitive. If someone
submits a 2.4 one clashing with a different 2.5 one tell Marcelo to
revert it ASAP.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-07 16:05           ` Alan Cox
@ 2003-07-07 16:31             ` Matthew Wilcox
  2003-07-07 16:39               ` Joel Soete
  2003-07-07 16:33             ` Joel Soete
  1 sibling, 1 reply; 23+ messages in thread
From: Matthew Wilcox @ 2003-07-07 16:31 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Joel Soete, Matthew Wilcox, HPPA List, Alan Cox

Marcelo, looks like you have a problem to sort out:

--- ../marcelo-2.4/include/linux/sysctl.h       Thu Jul  3 08:59:18 2003
+++ include/linux/sysctl.h      Mon Jul  7 10:19:02 2003
@@ -124,28 +127,36 @@
        KERN_CORE_USES_PID=52,          /* int: use core or core.%pid */
        KERN_TAINTED=53,        /* int: various kernel tainted flags */
        KERN_CADPID=54,         /* int: PID of the process to notify on CAD */
-       KERN_CORE_PATTERN=56,   /* string: pattern for core-files */
-       KERN_PPC_L3CR=57,       /* l3cr register on PPC */
-       KERN_EXCEPTION_TRACE=58, /* boolean: exception trace */
+       KERN_PIDMAX=55,         /* int: PID # limit */
+       KERN_CORE_PATTERN=56,   /* string: pattern for core-file names */
+       KERN_PANIC_ON_OOPS=57,  /* int: whether we will panic on an oops */
 };

Bad PPC people.  And bad KERN_EXCEPTION_TRACE people, whoever they are.
The PPC one needs to be changed, no matter what.  And the KERN_EXCEPTION
people need to get a sysctl number allocated by Linus.

Looks like the VM people have been naughty too:

-       VM_MAX_MAP_COUNT=11,    /* int: Maximum number of active map areas */
-       VM_MIN_READAHEAD=12,    /* Min file readahead */
-       VM_MAX_READAHEAD=13,    /* Max file readahead */
+       VM_DIRTY_BACKGROUND=11, /* dirty_background_ratio */
+       VM_DIRTY_RATIO=12,      /* dirty_ratio */
+       VM_DIRTY_WB_CS=13,      /* dirty_writeback_centisecs */
+       VM_DIRTY_EXPIRE_CS=14,  /* dirty_expire_centisecs */
+       VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */
+       VM_OVERCOMMIT_RATIO=16, /* percent of RAM to allow overcommit in */
+       VM_PAGEBUF=17,          /* struct: Control pagebuf parameters */
+       VM_HUGETLB_PAGES=18,    /* int: Number of available Huge Pages */
+       VM_SWAPPINESS=19,       /* Tendency to steal mapped memory */
+       VM_LOWER_ZONE_PROTECTION=20,/* Amount of protection of lower zones */
+       VM_MIN_FREE_KBYTES=21,  /* Minimum free kilobytes to maintain */

SCTP is bad too:

-       NET_KHTTPD=17
+       NET_SCTP=17, 


On Mon, Jul 07, 2003 at 05:05:52PM +0100, Alan Cox wrote:
> On Llu, 2003-07-07 at 17:00, Joel Soete wrote:
> > > Get the HP ones into 2.5 then they are fixed "right" values
> > 
> > Ok but now in 2.4.22-pre3:
> > [...]
> >   	KERN_EXCEPTION_TRACE=58,	/* boolean: exception trace */
> > [...]
> 
> Same comment still applies. The 2.5. ones are definitive. If someone
> submits a 2.4 one clashing with a different 2.5 one tell Marcelo to
> revert it ASAP.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-07 16:05           ` Alan Cox
  2003-07-07 16:31             ` Matthew Wilcox
@ 2003-07-07 16:33             ` Joel Soete
  1 sibling, 0 replies; 23+ messages in thread
From: Joel Soete @ 2003-07-07 16:33 UTC (permalink / raw)
  To: Alan Cox; +Cc: Matthew Wilcox, HPPA List

[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

Alan,

> Same comment still applies. The 2.5. ones are definitive. If someone
> submits a 2.4 one clashing with a different 2.5 one tell Marcelo to
> revert it ASAP.

So I check in last 2.5.74 (co from parisc-linux.org) and it seems that following
patch would be better apply to merge 2.5 and change in 2.4.22-pre2:
===========
--- include/linux/sysctl.h.orig	2003-07-07 19:22:58.000000000 +0200
+++ include/linux/sysctl.h	2003-07-07 19:19:43.000000000 +0200
@@ -126,6 +126,9 @@
 	KERN_CADPID=54,		/* int: PID of the process to notify on CAD */
  	KERN_CORE_PATTERN=56,	/* string: pattern for core-files */
 	KERN_PPC_L3CR=57,       /* l3cr register on PPC */
+ 	KERN_HPPA_PWRSW=58,	/* int: hppa soft-power enable */
+ 	KERN_HPPA_UNALIGNED=59,	/* int: hppa unaligned-trap enable */
+	KERN_EXCEPTION_TRACE=60, /* boolean: exception trace */
 };
 
===========

If it is corect, could you help me to transmit info to Marcelo (I already
tried to send him severall mail but without any feedback so I presume that
he never got it?)

Thanks in advance,
    Joel





------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003.
On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr 



[-- Attachment #2: sysctl.h-diff --]
[-- Type: application/octet-stream, Size: 520 bytes --]

--- include/linux/sysctl.h.orig	2003-07-07 19:22:58.000000000 +0200
+++ include/linux/sysctl.h	2003-07-07 19:19:43.000000000 +0200
@@ -126,6 +126,9 @@
 	KERN_CADPID=54,		/* int: PID of the process to notify on CAD */
  	KERN_CORE_PATTERN=56,	/* string: pattern for core-files */
 	KERN_PPC_L3CR=57,       /* l3cr register on PPC */
+ 	KERN_HPPA_PWRSW=58,	/* int: hppa soft-power enable */
+ 	KERN_HPPA_UNALIGNED=59,	/* int: hppa unaligned-trap enable */
+	KERN_EXCEPTION_TRACE=60, /* boolean: exception trace */
 };
 
 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-07 16:31             ` Matthew Wilcox
@ 2003-07-07 16:39               ` Joel Soete
  0 siblings, 0 replies; 23+ messages in thread
From: Joel Soete @ 2003-07-07 16:39 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Matthew Wilcox, HPPA List, Alan Cox

Thanks Willy,

I haven't notice that because merge doesn't complain.
I will so check further.

Joel

>-- Original Message --
>Date: Mon, 7 Jul 2003 17:31:31 +0100
>From: Matthew Wilcox <willy@debian.org>
>To: Marcelo Tosatti <marcelo@conectiva.com.br>
>Cc: Joel Soete <jsoe0708@tiscali.be>, Matthew Wilcox <willy@debian.org>,
>	HPPA List <parisc-linux@parisc-linux.org>,
>	Alan Cox <alan@lxorguk.ukuu.org.uk>
>Subject: Re: [parisc-linux] warning: minor abi change
>
>
>
Marcelo, looks like you have a problem to sort out:

--- ../marcelo-2.4/include/linux/sysctl.h       Thu Jul  3 08:59:18 2003
+++ include/linux/sysctl.h      Mon Jul  7 10:19:02 2003
@@ -124,28 +127,36 @@
        KERN_CORE_USES_PID=52,          
>* int: use core or core.%pid */
        KERN_TAINTED=53,        /* int: various kernel tainted flags */
        KERN_CADPID=54,         /* int: PID of the process to notify on CAD
*/
-       KERN_CORE_PATTERN=56,   /* string: pattern for core-files 
>/
-       KERN_PPC_L3CR=57,       /* l3cr register on PPC */
-       KERN_EXCEPTION_TRACE=58, /* boolean: exception trace */
+       KERN_PIDMAX=55,         /* int: PID # limit */
+       KERN_CORE_PATTERN=56,   /* string: pattern for core-file nam
>s */
+       KERN_PANIC_ON_OOPS=57,  /* int: whether we will panic on an oops
*/
 };

Bad PPC people.  And bad KERN_EXCEPTION_TRACE people, whoever they are.
The PPC one needs to be changed, no matter what.  And the KERN_EXCEPTION
people need to 
>et a sysctl number allocated by Linus.

Looks like the VM people have been naughty too:

-       VM_MAX_MAP_COUNT=11,    /* int: Maximum number of active map areas
*/
-       VM_MIN_READAHEAD=12,    /* Min file readahead */
-       VM_MAX_READAHE
>D=13,    /* Max file readahead */
+       VM_DIRTY_BACKGROUND=11, /* dirty_background_ratio */
+       VM_DIRTY_RATIO=12,      /* dirty_ratio */
+       VM_DIRTY_WB_CS=13,      /* dirty_writeback_centisecs */
+       VM_DIRTY_EXPIRE_CS=14,  /* dirt
>_expire_centisecs */
+       VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */
+       VM_OVERCOMMIT_RATIO=16, /* percent of RAM to allow overcommit in
*/
+       VM_PAGEBUF=17,          /* struct: Control pagebuf parameters */
+       VM_HUGETLB_
>AGES=18,    /* int: Number of available Huge Pages */
+       VM_SWAPPINESS=19,       /* Tendency to steal mapped memory */
+       VM_LOWER_ZONE_PROTECTION=20,/* Amount of protection of lower zones
*/
+       VM_MIN_FREE_KBYTES=21,  /* Minimum free
>kilobytes to maintain */

SCTP is bad too:

-       NET_KHTTPD=17
+       NET_SCTP=17, 


On Mon, Jul 07, 2003 at 05:05:52PM +0100, Alan Cox wrote:
> On Llu, 2003-07-07 at 17:00, Joel Soete wrote:
> > > Get the HP ones into 2.5 then they are 
>ixed "right" values
> > 
> > Ok but now in 2.4.22-pre3:
> > [...]
> >   	KERN_EXCEPTION_TRACE=58,	/* boolean: exception trace */
> > [...]
> 
> Same comment still applies. The 2.5. ones are definitive. If someone
> submits a 2.4 one clashing wi
>h a different 2.5 one tell Marcelo to
> revert it ASAP.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an aca
>emic debate on this subject?" -- Robert Fisk



------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003.
On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-06  4:12       ` Grant Grundler
  2003-07-06 16:12         ` Joel Soete
@ 2003-07-07 20:02         ` Carlos O'Donell
  2003-07-07 20:19           ` John David Anglin
  1 sibling, 1 reply; 23+ messages in thread
From: Carlos O'Donell @ 2003-07-07 20:02 UTC (permalink / raw)
  To: Grant Grundler; +Cc: John David Anglin, jsoe0708, parisc-linux

> > This solution assumes that canonicalization is unnecessary in the kernel.
> > Probably, in most cases it is.  However, if you really need to canonicalize
> > a function pointer from user space, then you are going to have to figure
> > out how to call into the dynamic loader from the kernel.  This obviously
> > isn't very safe.  So, possibly this implies that function pointers passed
> > in syscalls should be canonicalized before the kernel is entered (i.e.,
> > glibc should do the canonicalization).
> > 
> > As far as kernel modules go, I don't know how function pointers are
> > handled.  If you pass a function pointer from one module to another,
> > does it need canonicalization?
> 
> I depend on willy/tausq/amodra/et al to understand stuff like this.

I can't really come up with a scenario where userspace passes a function
pointer to the kernel and has the kernel call or compare the function
pointer?

If someone can, please tell me :)

c.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-07 20:02         ` Carlos O'Donell
@ 2003-07-07 20:19           ` John David Anglin
  2003-07-08  1:45             ` Carlos O'Donell
  0 siblings, 1 reply; 23+ messages in thread
From: John David Anglin @ 2003-07-07 20:19 UTC (permalink / raw)
  To: Carlos O'Donell; +Cc: grundler, jsoe0708, parisc-linux

> I can't really come up with a scenario where userspace passes a function
> pointer to the kernel and has the kernel call or compare the function
> pointer?

One example is sigaction.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-07 20:19           ` John David Anglin
@ 2003-07-08  1:45             ` Carlos O'Donell
  0 siblings, 0 replies; 23+ messages in thread
From: Carlos O'Donell @ 2003-07-08  1:45 UTC (permalink / raw)
  To: John David Anglin; +Cc: grundler, jsoe0708, parisc-linux

> > I can't really come up with a scenario where userspace passes a function
> > pointer to the kernel and has the kernel call or compare the function
> > pointer?
> 
> One example is sigaction.

Fixable, I can stick a sigaction wrapper in userspace. Should we though?

c.

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
       [not found] <20030711065156.GA17025@dsl2.external.hp.com>
@ 2003-07-11  8:26 ` Joel Soete
  2003-07-11 10:24   ` Alan Cox
  0 siblings, 1 reply; 23+ messages in thread
From: Joel Soete @ 2003-07-11  8:26 UTC (permalink / raw)
  To: Grant Grundler; +Cc: parisc-linux

Hi Grant,

>Joel,
>I haven't verified I got everything committed that you
>needed. Please let me know (via p-l mailing list) what
>else is outstanding.

For me it is Ok: i run this on b2k in 32bits mode (+ NS driver built in),
on a N4000 (UP because of mm pb: here I don't know what to do). I successfully
stress all them a bit by rebuilding kernel (still have to check some userspace
check) :)

Thanks a lot for help,
    Joel

PS1: btw, the previous parisc stuff transmitted to Alan are finaly included
in 2.4.22-pre4, I will so try to prepare asap a small update :)

PS2: Also for future 2.4.22, in binfmt_som.c '#error "Fix security hole before
enabling me"' (line 216). Do you have any idea to fix it?

------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003.
On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [parisc-linux] warning: minor abi change
  2003-07-11  8:26 ` Joel Soete
@ 2003-07-11 10:24   ` Alan Cox
  0 siblings, 0 replies; 23+ messages in thread
From: Alan Cox @ 2003-07-11 10:24 UTC (permalink / raw)
  To: Joel Soete; +Cc: Grant Grundler, parisc-linux

On Gwe, 2003-07-11 at 09:26, Joel Soete wrote:
> PS2: Also for future 2.4.22, in binfmt_som.c '#error "Fix security hole before
> enabling me"' (line 216). Do you have any idea to fix it?

Look at the changes in binfmt_elf and copy them. Basically its about 
stopping someone doing

	clone with file sharing
	one thread		other thread
	exec			swap file handles around
	loads wrong binary suid

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2003-07-11 10:27 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-26 13:54 [parisc-linux] warning: minor abi change Matthew Wilcox
2003-06-26 17:03 ` Joel Soete
2003-06-26 17:06   ` Matthew Wilcox
2003-06-26 17:45     ` Randolph Chung
2003-06-27 14:41     ` Joel Soete
2003-06-27 16:21     ` Joel Soete
2003-06-27 16:52       ` Alan Cox
2003-07-07 16:00         ` Joel Soete
2003-07-07 16:05           ` Alan Cox
2003-07-07 16:31             ` Matthew Wilcox
2003-07-07 16:39               ` Joel Soete
2003-07-07 16:33             ` Joel Soete
     [not found] <20030627151546.GA30607@dsl2.external.hp.com>
     [not found] ` <3ED70CF10000AE2E@ocpmta2.freegates.net>
2003-06-27 16:54   ` Grant Grundler
2003-06-28 10:48     ` Joel Soete
2003-07-05 23:08   ` Grant Grundler
2003-07-05 23:53     ` John David Anglin
2003-07-06  4:12       ` Grant Grundler
2003-07-06 16:12         ` Joel Soete
2003-07-07 20:02         ` Carlos O'Donell
2003-07-07 20:19           ` John David Anglin
2003-07-08  1:45             ` Carlos O'Donell
     [not found] <20030711065156.GA17025@dsl2.external.hp.com>
2003-07-11  8:26 ` Joel Soete
2003-07-11 10:24   ` Alan Cox

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