#
0e25498f |
|
28-Jun-2021 |
Eric W. Biederman <ebiederm@xmission.com> |
exit: Add and use make_task_dead. There are two big uses of do_exit. The first is it's design use to be the guts of the exit(2) system call. The second use is to terminate a task after something catastrophic has happened like a NULL pointer in kernel code. Add a function make_task_dead that is initialy exactly the same as do_exit to cover the cases where do_exit is called to handle catastrophic failure. In time this can probably be reduced to just a light wrapper around do_task_dead. For now keep it exactly the same so that there will be no behavioral differences introducing this new concept. Replace all of the uses of do_exit that use it for catastraphic task cleanup with make_task_dead to make it clear what the code is doing. As part of this rename rewind_stack_do_exit rewind_stack_and_make_dead. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
#
05cdf457 |
|
26-Nov-2020 |
Michal Simek <michal.simek@xilinx.com> |
microblaze: Remove noMMU code This configuration is obsolete and likely none is really using it. That's why remove it to simplify code. Note about CONFIG_MMU in hw_exception_handler.S is left intentionally for better comment understanding. Cc: Mike Rapoport <rppt@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/43486cab370e0c0a79860120b71e0caac75a7e44.1606397528.git.michal.simek@xilinx.com
|
#
2e1661d2 |
|
23-May-2019 |
Eric W. Biederman <ebiederm@xmission.com> |
signal: Remove the task parameter from force_sig_fault As synchronous exceptions really only make sense against the current task (otherwise how are you synchronous) remove the task parameter from from force_sig_fault to make it explicit that is what is going on. The two known exceptions that deliver a synchronous exception to a stopped ptraced task have already been changed to force_sig_fault_to_task. The callers have been changed with the following emacs regular expression (with obvious variations on the architectures that take more arguments) to avoid typos: force_sig_fault[(]\([^,]+\)[,]\([^,]+\)[,]\([^,]+\)[,]\W+current[)] -> force_sig_fault(\1,\2,\3) Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
#
6f467986 |
|
16-Apr-2018 |
Eric W. Biederman <ebiederm@xmission.com> |
signal/microblaze: Use force_sig_fault where appropriate Filling in struct siginfo before calling force_sig_info a tedious and error prone process, where once in a great while the wrong fields are filled out, and siginfo has been inconsistently cleared. Simplify this process by using the helper force_sig_fault. Which takes as a parameters all of the information it needs, ensures all of the fiddly bits of filling in struct siginfo are done properly and then calls force_sig_info. In short about a 5 line reduction in code for every time force_sig_info is called, which makes the calling function clearer. Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
#
3eb0f519 |
|
17-Apr-2018 |
Eric W. Biederman <ebiederm@xmission.com> |
signal: Ensure every siginfo we send has all bits initialized Call clear_siginfo to ensure every stack allocated siginfo is properly initialized before being passed to the signal sending functions. Note: It is not safe to depend on C initializers to initialize struct siginfo on the stack because C is allowed to skip holes when initializing a structure. The initialization of struct siginfo in tracehook_report_syscall_exit was moved from the helper user_single_step_siginfo into tracehook_report_syscall_exit itself, to make it clear that the local variable siginfo gets fully initialized. In a few cases the scope of struct siginfo has been reduced to make it clear that siginfo siginfo is not used on other paths in the function in which it is declared. Instances of using memset to initialize siginfo have been replaced with calls clear_siginfo for clarity. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
|
#
b17b0153 |
|
08-Feb-2017 |
Ingo Molnar <mingo@kernel.org> |
sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h> We are going to split <linux/sched/debug.h> out of <linux/sched.h>, which will have to be picked up from other headers and a couple of .c files. Create a trivial placeholder <linux/sched/debug.h> file that just maps to <linux/sched.h> to make this patch obviously correct and bisectable. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
|
#
d64af918 |
|
01-Feb-2013 |
Michal Simek <michal.simek@xilinx.com> |
microblaze: Do not use module.h in files which are not modules Based on the patch: "lib: reduce the use of module.h wherever possible" (sha1: 8bc3bcc93a2b4e47d5d410146f6546bca6171663) fix all microblaze files which are not modules. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
|
#
6bd55f0b |
|
27-Dec-2012 |
Michal Simek <monstr@monstr.eu> |
microblaze: Fix coding style issues Fix coding style issues reported by checkpatch.pl. Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
15ec0908 |
|
22-Aug-2011 |
Edgar E. Iglesias <edgar.iglesias@petalogix.com> |
microblaze: Raise SIGFPE/FPE_INTDIV for div by zero It fixes the signal nr raised for divizion by zero from SIGILL to SIGFPE, in accordance to POSIX and other archs. This came up due to a failed test in the GCC testsuite. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
|
#
f699980b |
|
07-Feb-2011 |
Michal Simek <monstr@monstr.eu> |
microblaze: Fix sparse warning - sw_exceptions Function sw_exception is linked with asm code. Warning log: CHECK arch/microblaze/kernel/exceptions.c arch/microblaze/kernel/exceptions.c:53:6: warning: symbol 'sw_exception' was not declared. Should it be static? Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
17b93146 |
|
12-Nov-2010 |
Michal Simek <monstr@monstr.eu> |
microblaze: Clear i/dcache for sw breakpoints There is necessary to flush dcache and invalidate icache for address where breakpoint (brki r16, 0x18) was. The reason is that for some cases icache line still keeps brki instruction and it is not updated by origin instruction maintains by gdbserver. Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
04256096 |
|
03-Aug-2010 |
Michal Simek <monstr@monstr.eu> |
microblaze: Remove old user debugging gdb stub Old gdb uses priviledged exception handler to handle gdb exception. New gdb uses brki r16, 0x18 that's why we can remove old gdb support. Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
c4554c32 |
|
11-Sep-2010 |
Joe Perches <joe@perches.com> |
microblaze: Remove pr_<level> uses of KERN_<level> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
2d5973cb |
|
03-Aug-2010 |
Michal Simek <monstr@monstr.eu> |
microblaze: Add KGDB support Kgdb uses brki r16, 0x18 instruction to call low level _debug_exception function which save current state to pt_regs and call microblaze_kgdb_break function. _debug_exception should be called only from the kernel space. User space calling is not supported because user application debugging uses different handling. pt_regs_to_gdb_regs loads additional special registers which can't be changed * Enable KGDB in Kconfig * Remove ancient not-tested KGDB support * Remove ancient _debug_exception code from entry.S Only MMU KGDB support is supported. Signed-off-by: Michal Simek <monstr@monstr.eu> CC: Jason Wessel <jason.wessel@windriver.com> CC: John Williams <john.williams@petalogix.com> CC: Edgar E. Iglesias <edgar.iglesias@petalogix.com> CC: linux-kernel@vger.kernel.org Acked-by: Jason Wessel <jason.wessel@windriver.com>
|
#
751f1605 |
|
03-Aug-2010 |
Michal Simek <monstr@monstr.eu> |
microblaze: Support brki rX, 0x18 for user application debugging This is the first patch which add support for user application debugging through brki rX, 0x18 vector. This patch has side effect which also remove security issue to use brki rX, 0x18 to freeze kernel. Support for old gdb support via priviledged exception (brk r0, r0) is still there. It will be remove in future. Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
f3ff8212 |
|
21-Apr-2010 |
Randy Dunlap <randy.dunlap@oracle.com> |
microblaze: fix divide by zero exception message Fix divide exception message to say "divide by zero". Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Michal Simek <monstr@monstr.eu> Cc: microblaze-uclinux@itee.uq.edu.au Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
23902d95 |
|
22-Sep-2009 |
Michal Simek <monstr@monstr.eu> |
microblaze: Generate correct signal and siginfo for integer div-by-zero Signed-off-by: John Williams <john.williams@petalogix.com>
|
#
bfc32ad0 |
|
15-Sep-2009 |
Michal Simek <monstr@monstr.eu> |
microblaze: Don't be noisy when userspace causes hardware exceptions Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
4bb73c3d |
|
26-May-2009 |
Michal Simek <monstr@monstr.eu> |
microblaze_mmu_v2: Add MMU related exceptions handling Signed-off-by: Michal Simek <monstr@monstr.eu>
|
#
c4df4bc1 |
|
27-Mar-2009 |
Michal Simek <monstr@monstr.eu> |
microblaze_v8: exception handling Reviewed-by: Ingo Molnar <mingo@elte.hu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: John Linn <john.linn@xilinx.com> Acked-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
|