1. 03 Oct, 2018 4 commits
    • Eric W. Biederman's avatar
      signal: Introduce copy_siginfo_from_user and use it's return value · 4cd2e0e7
      Eric W. Biederman authored
      In preparation for using a smaller version of siginfo in the kernel
      introduce copy_siginfo_from_user and use it when siginfo is copied from
      userspace.
      
      Make the pattern for using copy_siginfo_from_user and
      copy_siginfo_from_user32 to capture the return value and return that
      value on error.
      
      This is a necessary prerequisite for using a smaller siginfo
      in the kernel than the kernel exports to userspace.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      4cd2e0e7
    • Eric W. Biederman's avatar
      signal: Remove the need for __ARCH_SI_PREABLE_SIZE and SI_PAD_SIZE · f2838018
      Eric W. Biederman authored
      Rework the defintion of struct siginfo so that the array padding
      struct siginfo to SI_MAX_SIZE can be placed in a union along side of
      the rest of the struct siginfo members.  The result is that we no
      longer need the __ARCH_SI_PREAMBLE_SIZE or SI_PAD_SIZE definitions.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      f2838018
    • Eric W. Biederman's avatar
      signal: Fail sigqueueinfo if si_signo != sig · e75dc036
      Eric W. Biederman authored
      The kernel needs to validate that the contents of struct siginfo make
      sense as siginfo is copied into the kernel, so that the proper union
      members can be put in the appropriate locations.  The field si_signo
      is a fundamental part of that validation.  As such changing the
      contents of si_signo after the validation make no sense and can result
      in nonsense values in the kernel.
      
      As such simply fail if someone is silly enough to set si_signo out of
      sync with the signal number passed to sigqueueinfo.
      
      I don't expect a problem as glibc's sigqueue implementation sets
      "si_signo = sig" and CRIU just returns to the kernel what the kernel
      gave to it.
      
      If there is some application that calls sigqueueinfo directly that has
      a problem with this added sanity check we can revisit this when we see
      what kind of crazy that application is doing.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      e75dc036
    • Eric W. Biederman's avatar
      signal/sparc: Move EMT_TAGOVF into the generic siginfo.h · 018303a9
      Eric W. Biederman authored
      When moving all of the architectures specific si_codes into
      siginfo.h, I apparently overlooked EMT_TAGOVF.  Move it now.
      
      Remove the now redundant test in siginfo_layout for SIGEMT
      as now NSIGEMT is always defined.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      018303a9
  2. 27 Sep, 2018 27 commits
  3. 21 Sep, 2018 9 commits