Hi Andreas, On 10/04/19 5:05 AM, Andreas Schwab wrote:
On Apr 09 2019, Michael Schmitz <[email protected]> wrote:Now the question I'm asking myself is: why does pagefault_disable() not suppress the bus error here: long __probe_kernel_read(void *dst, const void *src, size_t size) { long ret; mm_segment_t old_fs = get_fs(); set_fs(KERNEL_DS); pagefault_disable(); current->kernel_uaccess_faults_ok++; ret = __copy_from_user_inatomic(dst, (__force const void __user *)src, size); current->kernel_uaccess_faults_ok--; pagefault_enable(); set_fs(old_fs); return ret ? -EFAULT : 0; } If I read the m68k mm/fault.c code right, we should see user space take a SIGBUS, not SIGSEGV.Since this is from KERNEL_DS it is a kernel space access.
Thanks. I have a hunch that we never run do_page_fault() from bus_error030() though, so we won't see faulthandler_disabled() evaluated there. I'll try and confirm this.
Back down the same rabbit hole ... Cheers, Michael
Andreas.
