[uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-05-04 Thread Geert Uytterhoeven
Impact for nommu: - Store table in .rodata instead of .text, - Let kernel/sys_ni.c handle the stubbing of MMU-only syscalls, - Implement sys_mremap and sys_nfsservct, - Remove unused padding at the end of the table. Impact for mmu: - Store table in .rodata instead of .data. Signed-off-b

Writable sys_call_table (was: Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table)

2011-04-13 Thread Geert Uytterhoeven
On Thu, Apr 7, 2011 at 10:29, Andreas Schwab wrote: > Geert Uytterhoeven writes: >> Isn't there a reason it was read-write on m68k, like the table may be changed >> at runtime (to install rootkits :-)? Have to check what the other arches >> do... > > Initially the syscall_table in Linux has alwa

Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-13 Thread Geert Uytterhoeven
On Thu, Apr 7, 2011 at 06:14, Greg Ungerer wrote: > On 07/04/11 13:13, Gavin Lambert wrote: >> >> Quoth Greg Ungerer: Doesn't that have XIP consequences?  .text (and presumably .rodata) can be stored and executed from ROM, since they can't be changed at runtime.  .data has to b

Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-07 Thread Philippe De Muyter
On Thu, Apr 07, 2011 at 10:29:54AM +0200, Andreas Schwab wrote: > Geert Uytterhoeven writes: > > > Isn't there a reason it was read-write on m68k, like the table may be > > changed > > at runtime (to install rootkits :-)? Have to check what the other arches > > do... > > Initially the syscall_

Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-07 Thread Geert Uytterhoeven
On Thu, Apr 7, 2011 at 06:14, Greg Ungerer wrote: > On 07/04/11 13:13, Gavin Lambert wrote: >> Quoth Greg Ungerer: Doesn't that have XIP consequences?  .text (and presumably .rodata) can be stored and executed from ROM, since they can't be changed at runtime.  .data has to be in RAM

Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-06 Thread Greg Ungerer
Hi Gavin, On 07/04/11 13:13, Gavin Lambert wrote: Quoth Greg Ungerer: Doesn't that have XIP consequences? .text (and presumably .rodata) can be stored and executed from ROM, since they can't be changed at runtime. .data has to be in RAM, since it can be. Yes, but even in the kernel XIP case

RE: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-06 Thread Gavin Lambert
Quoth Greg Ungerer: >> Doesn't that have XIP consequences? .text (and presumably .rodata) >> can be stored and executed from ROM, since they can't be changed at >> runtime. .data has to be in RAM, since it can be. > > Yes, but even in the kernel XIP case the very early startup code > moves the

Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-06 Thread Greg Ungerer
Hi Gavin, On 07/04/11 12:12, Gavin Lambert wrote: Quoth Greg Ungerer: Impact for m68knommu: - The table is now stored in .data instead of .text, Do you mean .rodata ? [...] Yes, I suspect that was the original thinking. It has been that way for a very long time (it is in .text in the 2.

RE: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-06 Thread Gavin Lambert
Quoth Greg Ungerer: > >> Impact for m68knommu: > >>- The table is now stored in .data instead of .text, > > > > Do you mean .rodata ? [...] > Yes, I suspect that was the original thinking. It has been that way > for a very long time (it is in .text in the 2.4 kernel patches for > this too). >

Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-06 Thread Greg Ungerer
On 07/04/11 08:05, Philippe De Muyter wrote: On Wed, Apr 06, 2011 at 10:33:07PM +0200, Geert Uytterhoeven wrote: Impact for m68knommu: - The table is now stored in .data instead of .text, Do you mean .rodata ? - Removed unused padding at the end of the table. Signed-off-by: Geert Uytt

Re: [uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-06 Thread Philippe De Muyter
On Wed, Apr 06, 2011 at 10:33:07PM +0200, Geert Uytterhoeven wrote: > Impact for m68knommu: > - The table is now stored in .data instead of .text, Do you mean .rodata ? > - Removed unused padding at the end of the table. > > Signed-off-by: Geert Uytterhoeven > --- > Not tested on m68knommu

[uClinux-dev] [PATCH] m68k: Merge mmu and non-mmu versions of sys_call_table

2011-04-06 Thread Geert Uytterhoeven
Impact for m68knommu: - The table is now stored in .data instead of .text, - Removed unused padding at the end of the table. Signed-off-by: Geert Uytterhoeven --- Not tested on m68knommu Questions: - Why was it .text? - Was NR_syscalls ever larger than the actual number of syscalls? ar