lkml.org 
[lkml]   [2018]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [uml-devel] [REVIEW][PATCH 19/22] signal/um: Use force_sig_fault in relay_signal.
    Martin Pärtel <martin.partel@gmail.com> writes:

    > And once more in plain text..
    >
    > On 25 April 2018 at 01:00, Martin Pärtel <martin.partel@gmail.com> wrote:
    >>
    >> Hi all,
    >>
    >> This was ages ago, but from what I remember...
    >>
    >>>
    >>> Having a second look I really don't understand what relay_signal is
    >>> trying to do.
    >>>
    >>> The function relay_signal does not pass siginfo through unchanged.
    >>
    >>
    >> Just copying the entire struct would do the wrong thing. It was discussed here:
    >> https://marc.info/?l=user-mode-linux-devel&m=133910707911999&w=2

    So you are regnerating siginfo to ensure you don't copy unintended
    things such as the host pid and host uid.

    Then my analysis is correct that you simply missed filtering out the
    si codes that are not signal specific and do not use the fault layout
    in struct siginfo.

    Is si_addr safe to copy across? I presume so since the kernel just
    ptraces an ordinary process, but I figure I should ask and double
    check.

    I am going to respin my patch. I would say that you really need a
    white-list of si_codes that whose use of struct siginfo that you know.
    Otherwise you could get into the same problem of under or over copying
    data.

    Eric

    \
     
     \ /
      Last update: 2018-04-25 00:26    [W:2.313 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site