lkml.org 
[lkml]   [2014]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 00/29] nios2 Linux kernel port
    On Mon, Sep 08, 2014 at 05:22:11PM +0800, Ley Foon Tan wrote:
    > This is the 3rd version of patchset adds the Linux kernel port for Nios II processor from
    > Altera. All of the feedback from v2 patchseries has been addressed. Thanks to all who
    > provided feedback on the previous version.

    a) signal caught in rt_sigreturn() (e.g. from change of the set of blocked
    signals) should *NOT* trigger syscall restart. IOW, wrt syscall restart
    logics, rt_sigreturn() acts as exception, not as a syscall. You are
    setting ->orig_r2 to -1, but that doesn't affect your syscall restart
    logics.

    As the matter of fact, your 'in_syscall' argument is bogus - it's always
    1. For return from interrupt as well as that from syscall. And syscall
    restart logics _really_ shouldn't apply to return from interrupts - it's
    not only wrong, but very hard to debug.

    b) multiple pending signals should be all handled before return to
    userland. Only the first one might have syscall restart logics triggered.
    The effect should be identical to what you'd get if e.g. a timer interrupt
    had hit just as you were returning to userland (possibly into handler)
    after handling the first one, etc. At the absolute least, SIGSEGV from
    failing attempt to build a sigframe should be handled before returning
    to userland.

    c) rt_sigreturn() should reset ->restart_block.fn to do_no_restart_syscall

    d) what's
    + regs->estatus = (regs->estatus & 0xffffffff);
    in rt_restore_ucontext() about?

    e) restart in handlerless case is better off without leaving the kernel
    mode. See what e.g. arm and s390 are doing.


    \
     
     \ /
      Last update: 2014-09-09 04:41    [W:3.133 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site