02 Jun, 2012

6 commits


24 May, 2012

1 commit


06 Mar, 2012

1 commit

  • The pt_regs struct had both a 'syscallno' field and an 'orig_gpr11' field
    and it wasn't really clear how these were supposed to be used. This patch
    removes the syscallno field altogether and makes orig_gpr11 work more
    like other architectures: keep track of syscall number in progress or
    hold -1 for non-syscall exceptions.

    Signed-off-by: Jonas Bonn

    Jonas Bonn
     

17 Feb, 2012

4 commits

  • As described in e6fa16ab ("signal: sigprocmask() should do
    retarget_shared_pending()") the modification of current->blocked is
    incorrect as we need to check whether the signal we're about to block
    is pending in the shared queue.

    Also, use the new helper function introduced in commit 5e6292c0f28f
    ("signal: add block_sigmask() for adding sigmask to current->blocked")
    which centralises the code for updating current->blocked after
    successfully delivering a signal and reduces the amount of duplicate
    code across architectures. In the past some architectures got this
    code wrong, so using this helper function should stop that from
    happening again.

    Cc: Oleg Nesterov
    Cc: Jonas Bonn
    Cc: Arnd Bergmann
    Cc: linux@lists.openrisc.net
    Signed-off-by: Matt Fleming
    Signed-off-by: Jonas Bonn

    Matt Fleming
     
  • setup_rt_frame() needs to return an indication of whether it succeeded
    or failed in setting up the signal stack frame. If setup_rt_frame()
    fails then we must not modify current->blocked.

    Acked-by: Oleg Nesterov
    Cc: Jonas Bonn
    Cc: Arnd Bergmann
    Cc: linux@lists.openrisc.net
    Signed-off-by: Matt Fleming
    Signed-off-by: Jonas Bonn

    Matt Fleming
     
  • get_signal_to_deliver() already resets the signal handler if
    SA_ONESHOT is set in ka->sa.sa_flags, there's no need to do it again
    in handle_signal(). Furthermore, because we were modifying
    ka->sa.sa_handler (which is a copy of sighand->action[]) instead of
    sighand->action[] the original code actually had no effect on signal
    delivery.

    Acked-by: Oleg Nesterov
    Cc: Jonas Bonn
    Cc: Arnd Bergmann
    Cc: linux@lists.openrisc.net
    Signed-off-by: Matt Fleming
    Signed-off-by: Jonas Bonn

    Matt Fleming
     
  • Instead of open coding the sequence from force_sigsegv() just call
    it. This also fixes a bug because we were modifying ka->sa.sa_handler
    (which is a copy of sighand->action[]), whereas the intention of the
    code was to modify sighand->action[] directly.

    As the original code was working with a copy it had no effect on
    signal delivery.

    Acked-by: Oleg Nesterov
    Cc: Jonas Bonn
    Cc: Arnd Bergmann
    Cc: linux@lists.openrisc.net
    Signed-off-by: Matt Fleming
    Signed-off-by: Jonas Bonn

    Matt Fleming
     

05 Sep, 2011

1 commit

  • As it was decided not to export struct pt_regs to userspace, struct
    sigcontext shouldn't be using it either. The pt_regs struct for OpenRISC
    is kernel internal and the layout of the registers may change in the
    future. The struct user_regs_struct is what is guaranteed to remain
    stable, so struct sigcontext may use that instead.

    This patch removes the usage of struct pt_regs in struct sigcontext and
    makes according changes in signal.c to get the register layout right.

    The usp field is removed from the sigcontext structure as this information
    is already contained in the user_regs_struct.

    Signed-off-by: Jonas Bonn
    Reviewed-by: Emilio Cota

    Jonas Bonn
     

23 Jul, 2011

1 commit