Re: Oopses and invalid addresses under Hatari

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Finn,

Am 09.04.2019 um 17:25 schrieb Finn Thain:
On Tue, 9 Apr 2019, Michael Schmitz wrote:


Seems real enough to me.


I agree. I was wondering if you'd seen anything like it before but I see
that the question is redundant. Had anything like it come up before, I
reckon you would have mentioned it when bus_error030() was discussed a
year ago.

Quite so.

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.

And our implementation of generic_copy_from_user() has exception handling, but that is only used to fix up the copied byte count returned?

Cheers,

	Michael



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux