summaryrefslogtreecommitdiff
path: root/arch/m68k/kernel
AgeCommit message (Collapse)Author
2011-10-25Merge branch 'for-linus' of git://github.com/gregungerer/m68knommuLinus Torvalds
* 'for-linus' of git://github.com/gregungerer/m68knommu: m68k: drop unused Kconfig symbols m68k: drop unused Kconfig symbols m68knommu: create common externs for _ram* vars m68knommu: remove extern declarations of memory_start/memory_end from mm/init m68knommu: use generic section names in mm/init code m68knommu: use generic section names in setup code m68k: merge the mmu and non-mmu traps.c files m68k: move hardware vector setting from traps.c to its own file m68k: merge mmu and non-mmu include/asm/entry.h files m68k: merge the mmu and non-mmu kernel/Makefiles m68k: merge mmu and non-mmu arch Makefiles m68k: reorganize Kconfig options to improve mmu/non-mmu selections m68knommu: fix problems with SPI/GPIO on ColdFire 520x m68k: fix memcpy to unmatched/unaligned source and dest on 68000
2011-10-24m68k: Finally remove leftover markers sectionsKirill Tkhai
Markers have removed already twice: 1: fc5377668c3d808e1d53c4aee152c836f55c3490 2: eb878b3bc0349344dbf70c51bf01fc734d5cf2d3 But a little bit is still here. Signed-off-by: Tkhai Kirill <tkhai@yandex.ru> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-10-18m68knommu: create common externs for _ram* varsGreg Ungerer
Create common extern definitions of _rambase, _ramstart and _ramend instead of them being externed when used in code. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68knommu: use generic section names in setup codeGreg Ungerer
We should be including and using sections.h to get at the extern definitions of the linker sections in the m68knommu startup code. Not defining them locally. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: merge the mmu and non-mmu traps.c filesGreg Ungerer
The code for handling traps in the non-mmu case is a subset of the mmu enabled case. Merge the non-mmu traps_no.c code back to a single traps.c. There is actually no code mmu specific here at all, and the processor specific code (for the more complex 68020/68030/68040/68060) is already proplerly conditionaly used. The format of console exception dump is a little different, but I don't think will cause any one problems, it is purely for debug purposes. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: move hardware vector setting from traps.c to its own fileGreg Ungerer
Most of the trap.c code is general to all m68k arch members. But the code it currently contains to set the hardware vector table is quite specific to the 680x0 family. They can have the vector table at any address unlike other family members (which either support only a single fixed address, or a limited range of addresses). So lets move that code out to a new file, vectors.c. This will make sharing the rest of the trap.c code easier and cleaner. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: merge mmu and non-mmu include/asm/entry.h filesGreg Ungerer
The changes in the mmu version of entry.h (entry_mm.h) and the non-mmu version (entry_no.h) are not about the presence or use of an MMU at all. The main changes are to support the ColdFire processors. The code for trap entry and exit for all types of 68k processor outside coldfire is the same. So merge the files back to a single entry.h and share the common 68k entry/exit code. Some changes are required for the non-mmu entry handlers to adopt the differing macros for system call and interrupt entry, but this is quite strait forward. The changes for the ColdFire remove a couple of instructions for the separate a7 register case, and are no worse for the older single a7 register case. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-10-18m68k: merge the mmu and non-mmu kernel/MakefilesGreg Ungerer
The few differences between the mmu and non-mmu kernel/Makefiles can easily be handled inside of a single Makefile. Merge the 2 back into a single Makefile. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Sam Ravnborg <sam@ravnborg.org>
2011-08-26All Arch: remove linkage for sys_nfsservctl system callNeilBrown
The nfsservctl system call is now gone, so we should remove all linkage for it. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-01Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/math-emu: Remove unnecessary code m68k/math-emu: Remove commented out old code m68k: Kill warning in setup_arch() when compiling for Sun3 m68k/atari: Prefix GPIO_{IN,OUT} with CODEC_ sparc: iounmap() and *_free_coherent() - Use lookup_resource() m68k/atari: Reserve some ST-RAM early on for device buffer use m68k/amiga: Chip RAM - Use lookup_resource() resources: Add lookup_resource() sparc: _sparc_find_resource() should check for exact matches m68k/amiga: Chip RAM - Offset resource end by CHIP_PHYSADDR m68k/amiga: Chip RAM - Use resource_size() to fix off-by-one error m68k/amiga: Chip RAM - Change chipavail to an atomic_t m68k/amiga: Chip RAM - Always allocate from the start of memory m68k/amiga: Chip RAM - Convert from printk() to pr_*() m68k/amiga: Chip RAM - Use tabs for indentation
2011-07-30m68k: Kill warning in setup_arch() when compiling for Sun3Geert Uytterhoeven
arch/m68k/kernel/setup_mm.c: In function ‘setup_arch’: arch/m68k/kernel/setup_mm.c:219: warning: unused variable ‘i’ Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-07-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: Revive reporting of spurious interrupts m68knommu: Move forward declaration of do_IRQ() from machdep.h to irq.h m68k: fix some atomic operation asm address modes for ColdFire m68k: use CPU_HAS_NO_BITFIELDS for signal functions m68k: merge and clean up delay.h files m68knommu: correctly use trap_init m68knommu: merge ColdFire 5206 and 5206e platform code m68k: merge mmu and non-mmu bitops.h m68k: merge MMU and non MMU versions of system.h m68k: merge MMU and non-MMU versions of asm/hardirq.h m68k: merge the non-mmu and mmu versions of module.c m68knommu: Fix printk() format in free_initrd_mem() m68knommu: Make empty_zero_page "void *", like on m68k
2011-07-26m68k, exec: remove redundant set_fs(USER_DS)Mathias Krause
The address limit is already set in flush_old_exec() so those calls to set_fs(USER_DS) are redundant. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: Greg Ungerer <gerg@uclinux.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-25m68k: Revive reporting of spurious interruptsGeert Uytterhoeven
commit 2502b667ea835ee16685c74b2a0d89ba8afe117a ("Change the m68knommu irq handling to use the generic irq framework.") removed the reporting of spurious interrupts on nommu (68328 and 68360). Bring it back in a generic way, using "atomic_t irq_err_count", as that's what most of the other architectures are using. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-07-25m68knommu: correctly use trap_initGreg Ungerer
Currently trap_init() is an empty function for m68knommu. Instead the vectors are being setup as part of the IRQ initialization. This is inconsistent with m68k and other architectures. Change the local init_vectors() to be trap_init(), and init the vectors at the correct time during startup. This will help merge of m68k and m68knommu trap code in the furture. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-07-25m68k: merge the non-mmu and mmu versions of module.cGreg Ungerer
The non-mmu and mmu versions of the module loader module.c are nearly identical. Merge them back to a single module.c. There is a little bit of re-ordering of the struct and enum definitions in module.h to keep the ifdefery to a minimum. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-07-24modules: make arch's use default loader hooksJonas Bonn
This patch removes all the module loader hook implementations in the architecture specific code where the functionality is the same as that now provided by the recently added default hooks. Signed-off-by: Jonas Bonn <jonas@southpole.se> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-14m68k: use kernel processor defines for conditional optimizationsGreg Ungerer
Older m68k-linux compilers will include pre-defined symbols that confuse what processor it is being targeted for. For example gcc-4.1.2 will pre-define __mc68020__ even if you specify the target processor as -m68000 on the gcc command line. Newer versions of gcc have this corrected. In a few places the m68k code uses defined(__mc68020__) for optimizations that include instructions that are specific to the CPU 68020 and above. When compiling with older compilers this will be true even when we have selected to compile for the older 68000 processors. Switch to using the kernel processor defines, CONFIG_M68020 and friends. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-06-14m68knommu: fix linker script exported name sectionsGreg Ungerer
The recent commit titled "module: Sort exported symbols" (f02e8a65) changed the exported symbol name sections. Bring the m68knommu linker script into line with those changes - including the sorting of the symbol names. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-28ns: Wire up the setns system callEric W. Biederman
32bit and 64bit on x86 are tested and working. The rest I have looked at closely and I can't find any problems. setns is an easy system call to wire up. It just takes two ints so I don't expect any weird architecture porting problems. While doing this I have noticed that we have some architectures that are very slow to get new system calls. cris seems to be the slowest where the last system calls wired up were preadv and pwritev. avr32 is weird in that recvmmsg was wired up but never declared in unistd.h. frv is behind with perf_event_open being the last syscall wired up. On h8300 the last system call wired up was epoll_wait. On m32r the last system call wired up was fallocate. mn10300 has recvmmsg as the last system call wired up. The rest seem to at least have syncfs wired up which was new in the 2.6.39. v2: Most of the architecture support added by Daniel Lezcano <dlezcano@fr.ibm.com> v3: ported to v2.6.36-rc4 by: Eric W. Biederman <ebiederm@xmission.com> v4: Moved wiring up of the system call to another patch v5: ported to v2.6.39-rc6 v6: rebased onto parisc-next and net-next to avoid syscall conflicts. v7: ported to Linus's latest post 2.6.39 tree. >  arch/blackfin/include/asm/unistd.h     |    3 ++- >  arch/blackfin/mach-common/entry.S      |    1 + Acked-by: Mike Frysinger <vapier@gentoo.org> Oh - ia64 wiring looks good. Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-24m68knommu: Use generic show_interrupts()Geert Uytterhoeven
Apart from whitespace differences, /proc/interrupts doesn't change by enabling GENERIC_IRQ_SHOW. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68k: merge the mmu and non-mmu versions of sys_m68k.cGreg Ungerer
There is a lot of common code in the sys_m68k.c files. The mmu and non-mmu versions can easily be merged into a single file. There is really only 2 functions that differ in the 2 cases. A single ifdef on CONFIG_MMU can take care of this. Alternatively we could break those 2 functions out and maintain sys_m68k_no.c and sys_m68k_mm.c with just this code in it (Makefile could then just build the right one). Does anyone have strong feelings on which way they want this done? Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68knommu: Remove obsolete #include <linux/sys.h>Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68k: merge mmu and non-mmu versions of asm-offsets.cGreg Ungerer
It is strait forward to merge the mmu and non-mmu versions of asm-offstes.c. Some name changes are required for the preempt and thread_info.flags in the non-mmu entry.S assembler to make them consistent for both setups. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68k: merge non-mmu and mmu versions of m68k_ksyms.cGreg Ungerer
After cleaning up m68k_ksyms_no.c it is now strait forward to merge the non-mmu and mmu versions of m68k_ksyms.c. The need for the extra gcc functions is not strictly based on having an MMU or not. It is based on the family the processor belongs too, so use an appropriate conditional check. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68knommu: remove un-needed exporting of COLDFIRE symbolsGreg Ungerer
There is no reason most of the symbols enclosed in a conditional on CONFIG_COLDFIRE need to be exported. And they sure don't need to be doing it in m68k_ksyms_no.c. Move the dma symbols export (which are currently needed) to the definitions of those, and remove the rest of the exporting here. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68knommu: move EXPORT of kernel_thread to function definitionGreg Ungerer
The EXPORT_SYMBOL(kernel_thread) belongs at the definition of that function, not in some other random code file. So move it there. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68knommu: move EXPORT of local checksumming functions to definitionsGreg Ungerer
The EXPORT_SYMBOL() of the local lib checksum functions belongs with the definitions, not in some other random code file. So move then there. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68knommu: move EXPORT of dump_fpu to function definitionGreg Ungerer
The EXPORT_SYMBOL(dump_fpu) belongs at the definition of the function, not in some other random code file. So move it there. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68knommu: remove stubs for __ioremap() and iounmap()Greg Ungerer
The implementation of iounmap() and __ioremap() for non-mmu m68k is trivial. We can inline them in m68knommu headers and remove the trivial implementations. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-05-24m68k: remove duplicate memcpy() implementationGreg Ungerer
Merging the mmu and non-mmu directories we ended up with duplicate implementations of memcpy(). One is a little more optimized for the >= 68020 case, but that can easily be inserted into a single implementation of memcpy(). Clean up the exporting of this symbol too, otherwise we end up exporting it twice on a no-mmu build. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-24m68k: remove duplicate memset() implementationGreg Ungerer
Merging the mmu and non-mmu directories we ended up with duplicate implementations of memset(). One is a little more optimized for the >= 68020 case, but that can easily be inserted into a single implementation of memset(). Clean up the exporting of this symbol too, otherwise we end up exporting it twice on a no-mmu build. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-05-20extable, core_kernel_data(): Make sure all archs define _sdataSteven Rostedt
A new utility function (core_kernel_data()) is used to determine if a passed in address is part of core kernel data or not. It may or may not return true for RO data, but this utility must work for RW data. Thus both _sdata and _edata must be defined and continuous, without .init sections that may later be freed and replaced by volatile memory (memory that can be freed). This utility function is used to determine if data is safe from ever being freed. Thus it should return true for all RW global data that is not in a module or has been allocated, or false otherwise. Also change core_kernel_data() back to the more precise _sdata condition and document the function. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Acked-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: Hirokazu Takata <takata@linux-m32r.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: JamesE.J.Bottomley <jejb@parisc-linux.org> Link: http://lkml.kernel.org/r/1305855298.1465.19.camel@gandalf.stny.rr.com Signed-off-by: Ingo Molnar <mingo@elte.hu> ---- arch/alpha/kernel/vmlinux.lds.S | 1 + arch/m32r/kernel/vmlinux.lds.S | 1 + arch/m68k/kernel/vmlinux-std.lds | 2 ++ arch/m68k/kernel/vmlinux-sun3.lds | 1 + arch/mips/kernel/vmlinux.lds.S | 1 + arch/parisc/kernel/vmlinux.lds.S | 3 +++ kernel/extable.c | 12 +++++++++++- 7 files changed, 20 insertions(+), 1 deletion(-)
2011-05-19m68k: Really wire up sys_pselect6 and sys_ppollGeert Uytterhoeven
We reserved the numbers a long time ago, but never wired them up in the syscall table as they need TIF_RESTORE_SIGMASK, which we only got last year in commit cb6831d5d3099e772a510eb3e1ed0760ccffb45e ("m68k: Switch to saner sigsuspend()") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Cc: stable@kernel.org
2011-05-19m68k: Merge mmu and non-mmu versions of sys_call_tableGeert 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-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org>
2011-04-13m68k,m68knommu: Wire up name_to_handle_at, open_by_handle_at, clock_adjtime, ↵Geert Uytterhoeven
syncfs Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-29m68k: Convert irq function namespaceThomas Gleixner
Scripted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-25m68k: merge m68k and m68knommu arch directoriesGreg Ungerer
There is a lot of common code that could be shared between the m68k and m68knommu arch branches. It makes sense to merge the two branches into a single directory structure so that we can more easily share that common code. This is a brute force merge, based on a script from Stephen King <sfking@fdwdc.com>, which was originally written by Arnd Bergmann <arnd@arndb.de>. > The script was inspired by the script Sam Ravnborg used to merge the > includes from m68knommu. For those files common to both arches but > differing in content, the m68k version of the file is renamed to > <file>_mm.<ext> and the m68knommu version of the file is moved into the > corresponding m68k directory and renamed <file>_no.<ext> and a small > wrapper file <file>.<ext> is used to select between the two version. Files > that are common to both but don't differ are removed from the m68knommu > tree and files and directories that are unique to the m68knommu tree are > moved to the m68k tree. Finally, the arch/m68knommu tree is removed. > > To select between the the versions of the files, the wrapper uses > > #ifdef CONFIG_MMU > #include <file>_mm.<ext> > #else > #include <file>_no.<ext> > #endif On top of this file merge I have done a simplistic merge of m68k and m68knommu Kconfig, which primarily attempts to keep existing options and menus in place. Other than a handful of options being moved it produces identical .config outputs on m68k and m68knommu targets I tested it on. With this in place there is now quite a bit of scope for merge cleanups in future patches. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2011-03-17Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/block: amiflop - Remove superfluous amiga_chip_alloc() cast m68k/atari: ARAnyM - Add support for network access m68k/atari: ARAnyM - Add support for console access m68k/atari: ARAnyM - Add support for block access m68k/atari: Initial ARAnyM support m68k: Kconfig - Remove unneeded "default n" m68k: Makefiles - Change to new flags variables m68k/amiga: Reclaim Chip RAM for PPC exception handlers m68k: Allow all kernel traps to be handled via exception fixups m68k: Use base_trap_init() to initialize vectors m68k: Add helper function handle_kernel_fault()
2011-03-16m68k/atari: Initial ARAnyM supportPetr Stehlik
Add improved support for running under the ARAnyM emulator (Atari Running on Any Machine - http://aranym.org/). [michael, geert: Cleanups and updates] Signed-off-by: Petr Stehlik <pstehlik@sophics.cz> Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-03-16m68k: Allow all kernel traps to be handled via exception fixupsAndreas Schwab
This will be needed by the ARAnyM Native Feature initialization code. Also document that the VEC_TRACE check is needed for 68020/30. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-03-16m68k: Use base_trap_init() to initialize vectorsRoman Zippel
So basic initialization is all in one place. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-03-16m68k: Add helper function handle_kernel_fault()Roman Zippel
Add helper function handle_kernel_fault() in signal.c, so frame_extra_sizes can become static, and to avoid future code duplication. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-01-31m68k: Switch do_timer() to xtime_update()Torben Hohn
xtime_update() properly takes the xtime_lock Signed-off-by: Torben Hohn <torbenh@gmx.de> Cc: Sam Creasey <sammy@sammy.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: johnstul@us.ibm.com Cc: Roman Zippel <zippel@linux-m68k.org> Cc: hch@infradead.org Cc: yong.zhang0@gmail.com Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Greg Ungerer <gerg@uclinux.org> LKML-Reference: <20110127150006.23248.71790.stgit@localhost> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-01-07m68k: Check __get_user()/__put_user() return valueAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-01-07m68k: Missing syscall_trace() on sigreturnAl Viro
If we leave sigreturn via ret_from_signal, we end up with syscall trace only on entry, leading to very unhappy strace, among other things. Note that this means different behaviours for signals delivered while we were in pagefault and for ones delivered while we were in interrupt... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-01-07m68k: Fix stack mangling logics in sigreturnAl Viro
a) we should hold modifying regs->format until we know we *will* be doing stack expansion; otherwise attacker can modify sigframe to have wrong ->sc_formatvec and install SIGSEGV handler. b) we should *not* mix copying saved extra stuff from userland with expanding the stack; once we'd done that manual memmove, we'd better not return to C, so cleanup is very hard to do. The easiest way is to copy it on stack first, making sure we won't overwrite on stack expansion. Fortunately that's easy to do... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-01-07m68k: If we fail to set sigframe up, just leave regs alone...Al Viro
Same principle as with the previous patch - do not destroy the state if sigframe setup fails. Incidentally, it's actually _less_ work - we don't need to go through adjust_stack dance on failure if we don't touch regs->stkadj until we know we'd written sigframe out. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-01-07m68k: Don't lose state if sigframe setup failsAl Viro
If we'd failed in setup_frame(), we've no place to store the original sigmask. It's not an unrecoverable situation - we raise SIGSEGV, but that SIGSEGV might be successfully handled (e.g. on altstack). In that case we really don't want sa_mask of original signal permanently slapped on the set of blocked signals. Standard solution: have setup_frame()/setup_rt_frame() report failure and don't mess with the signal-related state if that has happened... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>