13 May, 2016

1 commit

  • The generic copy_siginfo() is currently defined in
    asm-generic/siginfo.h, after including uapi/asm-generic/siginfo.h which
    defines the generic struct siginfo. However this makes it awkward for an
    architecture to use it if it has to define its own struct siginfo (e.g.
    MIPS and potentially IA64), since it means that asm-generic/siginfo.h
    can only be included after defining the arch-specific siginfo, which may
    be problematic if the arch-specific definition needs definitions from
    uapi/asm-generic/siginfo.h.

    It is possible to work around this by first including
    uapi/asm-generic/siginfo.h to get the constants before defining the
    arch-specific siginfo, and include asm-generic/siginfo.h after. However
    uapi headers can't be included by other uapi headers, so that first
    include has to be in an ifdef __kernel__, with the non __kernel__ case
    including the non-UAPI header instead.

    Instead of that mess, move the generic copy_siginfo() definition into
    linux/signal.h, which allows an arch-specific uapi/asm/siginfo.h to
    include asm-generic/siginfo.h and define the arch-specific siginfo, and
    for the generic copy_siginfo() to see that arch-specific definition.

    Signed-off-by: James Hogan
    Cc: Arnd Bergmann
    Cc: Ralf Baechle
    Cc: Petr Malat
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: Christopher Ferris
    Cc: linux-arch@vger.kernel.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-ia64@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: # 4.0-
    Patchwork: https://patchwork.linux-mips.org/patch/12478/
    Signed-off-by: Ralf Baechle

    James Hogan
     

09 Nov, 2013

1 commit


05 Oct, 2012

1 commit


04 May, 2012

1 commit


24 Apr, 2012

1 commit

  • For the particular issue of x32, which shares code with i386 in the
    handling of compat_siginfo_t, the use of a 64-bit clock_t bumps the
    sigchld structure out of alignment, which triggers a messy cascade of
    padding.

    This was already handled on the kernel compat side, but it needs
    handling on the user space side, which uses the generic header. To
    make that possible:

    1. Allow __kernel_clock_t to be overridden in struct siginfo;
    2. Allow there to be attributes added to struct siginfo.

    Reported-by: H.J. Lu
    Cc: Bruce J. Beare
    Cc: Arnd Bergmann
    Link: http://lkml.kernel.org/r/CAMe9rOqF6Kh6-NK7oP0Fpzkd4SBAWU%2BG53hwBbSD4iA2UzyxuA@mail.gmail.com
    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     

14 Apr, 2012

2 commits

  • Adds a new return value to seccomp filters that triggers a SIGSYS to be
    delivered with the new SYS_SECCOMP si_code.

    This allows in-process system call emulation, including just specifying
    an errno or cleanly dumping core, rather than just dying.

    Suggested-by: Markus Gutschke
    Suggested-by: Julien Tinnes
    Signed-off-by: Will Drewry
    Acked-by: Eric Paris

    v18: - acked-by, rebase
    - don't mention secure_computing_int() anymore
    v15: - use audit_seccomp/skip
    - pad out error spacing; clean up switch (indan@nul.nu)
    v14: - n/a
    v13: - rebase on to 88ebdda6159ffc15699f204c33feb3e431bf9bdc
    v12: - rebase on to linux-next
    v11: - clarify the comment (indan@nul.nu)
    - s/sigtrap/sigsys
    v10: - use SIGSYS, syscall_get_arch, updates arch/Kconfig
    note suggested-by (though original suggestion had other behaviors)
    v9: - changes to SIGILL
    v8: - clean up based on changes to dependent patches
    v7: - introduction
    Signed-off-by: James Morris

    Will Drewry
     
  • This change enables SIGSYS, defines _sigfields._sigsys, and adds
    x86 (compat) arch support. _sigsys defines fields which allow
    a signal handler to receive the triggering system call number,
    the relevant AUDIT_ARCH_* value for that number, and the address
    of the callsite.

    SIGSYS is added to the SYNCHRONOUS_MASK because it is desirable for it
    to have setup_frame() called for it. The goal is to ensure that
    ucontext_t reflects the machine state from the time-of-syscall and not
    from another signal handler.

    The first consumer of SIGSYS would be seccomp filter. In particular,
    a filter program could specify a new return value, SECCOMP_RET_TRAP,
    which would result in the system call being denied and the calling
    thread signaled. This also means that implementing arch-specific
    support can be dependent upon HAVE_ARCH_SECCOMP_FILTER.

    Suggested-by: H. Peter Anvin
    Signed-off-by: Will Drewry
    Acked-by: Serge Hallyn
    Reviewed-by: H. Peter Anvin
    Acked-by: Eric Paris

    v18: - added acked by, rebase
    v17: - rebase and reviewed-by addition
    v14: - rebase/nochanges
    v13: - rebase on to 88ebdda6159ffc15699f204c33feb3e431bf9bdc
    v12: - reworded changelog (oleg@redhat.com)
    v11: - fix dropped words in the change description
    - added fallback copy_siginfo support.
    - added __ARCH_SIGSYS define to allow stepped arch support.
    v10: - first version based on suggestion
    Signed-off-by: James Morris

    Will Drewry
     

31 Mar, 2011

1 commit


16 Sep, 2009

1 commit

  • Add new SIGBUS codes for reporting machine checks as signals. When
    the hardware detects an uncorrected ECC error it can trigger these
    signals.

    This is needed for telling KVM's qemu about machine checks that happen to
    guests, so that it can inject them, but might be also useful for other programs.
    I find it useful in my test programs.

    This patch merely defines the new types.

    - Define two new si_codes for SIGBUS. BUS_MCEERR_AO and BUS_MCEERR_AR
    * BUS_MCEERR_AO is for "Action Optional" machine checks, which means that some
    corruption has been detected in the background, but nothing has been consumed
    so far. The program can ignore those if it wants (but most programs would
    already get killed)
    * BUS_MCEERR_AR is for "Action Required" machine checks. This happens
    when corrupted data is consumed or the application ran into an area
    which has been known to be corrupted earlier. These require immediate
    action and cannot just returned to. Most programs would kill themselves.
    - They report the address of the corruption in the user address space
    in si_addr.
    - Define a new si_addr_lsb field that reports the extent of the corruption
    to user space. That's currently always a (small) page. The user application
    cannot tell where in this page the corruption happened.

    AK: I plan to write a man page update before anyone asks.

    Signed-off-by: Andi Kleen

    Andi Kleen
     

14 Apr, 2009

1 commit

  • Impact: (nearly) trivial

    The patch

    commit da654b74bda14c45a7d98c731bf3c1a43b6b74e2
    Author: Srinivasa Ds
    Date: Tue Sep 23 15:23:52 2008 +0530

    signals: demultiplexing SIGTRAP signal

    forgot to update the NSIGTRAP define in asm-generic/siginfo.h to the new
    number of sigtrap subcodes. Nothing in the tree seems to use it, but
    presumably something in user space might. So update it.

    Cc: Srinivasa Ds
    Signed-off-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

27 Mar, 2009

1 commit

  • A number of standard posix types are used in exported headers, which
    is not allowed if __STRICT_KERNEL_NAMES is defined. In order to
    get rid of the non-__STRICT_KERNEL_NAMES part and to make sane headers
    the default, we have to change them all to safe types.

    There are also still some leftovers in reiserfs_fs.h, elfcore.h
    and coda.h, but these files have not compiled in user space for
    a long time.

    This leaves out the various integer types ({u_,u,}int{8,16,32,64}_t),
    which we take care of separately.

    Signed-off-by: Arnd Bergmann
    Acked-by: Mauro Carvalho Chehab
    Cc: David Airlie
    Cc: Arnaldo Carvalho de Melo
    Cc: YOSHIFUJI Hideaki
    Cc: netdev@vger.kernel.org
    Cc: linux-ppp@vger.kernel.org
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: David Woodhouse
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Ingo Molnar

    Arnd Bergmann
     

23 Sep, 2008

1 commit

  • Currently a SIGTRAP can denote any one of below reasons.
    - Breakpoint hit
    - H/W debug register hit
    - Single step
    - Signal sent through kill() or rasie()

    Architectures like powerpc/parisc provides infrastructure to demultiplex
    SIGTRAP signal by passing down the information for receiving SIGTRAP through
    si_code of siginfot_t structure. Here is an attempt is generalise this
    infrastructure by extending it to x86 and x86_64 archs.

    Signed-off-by: Srinivasa DS
    Cc: Roland McGrath
    Cc: akpm@linux-foundation.org
    Cc: paulus@samba.org
    Cc: linuxppc-dev@ozlabs.org
    Signed-off-by: Ingo Molnar

    Srinivasa Ds
     

01 May, 2005

1 commit

  • Discussing with Matthew Wilcox some of his outstanding patches lead me to
    this patch (among others).

    The preamble in struct sigevent can be expressed independently of the
    architecture.

    Also use __ARCH_SI_PREAMBLE_SIZE on ia64.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds