[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87lgdc1bvr.fsf@xmission.com>
Date: Tue, 24 Apr 2018 17:24:24 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Martin Pärtel <martin.partel@...il.com>
Cc: Anton Ivanov <anton.ivanov@...-begemot.co.uk>,
Richard Weinberger <richard.weinberger@...il.com>,
Linux-Arch <linux-arch@...r.kernel.org>,
Richard Weinberger <richard@....at>,
Jeff Dike <jdike@...toit.com>, linux-um@...ts.infradead.org,
LKML <linux-kernel@...r.kernel.org>,
"user-mode-linux-devel\@lists.sourceforge.net"
<user-mode-linux-devel@...ts.sourceforge.net>
Subject: Re: [uml-devel] [REVIEW][PATCH 19/22] signal/um: Use force_sig_fault in relay_signal.
Martin Pärtel <martin.partel@...il.com> writes:
> And once more in plain text..
>
> On 25 April 2018 at 01:00, Martin Pärtel <martin.partel@...il.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
Powered by blists - more mailing lists