Re: [PATCH] connector: add parent pid and tgid to coredump and exit events

From: Evgeniy Polyakov
Date: Mon Apr 30 2018 - 11:06:43 EST


Stefan, hi

Sorry for delay.

26.04.2018, 15:04, "Stefan Strogin" <stefan.strogin@xxxxxxxxx>:
> Hi David, Evgeniy,
>
> Sorry to bother you, but could you please comment about the UAPI change and the patch?

With 4-bytes pid_t everything looks fine, and I do not know arch where pid is larger currently, so it looks safe.

David, please pull it into your tree, or should it go via different path?

Acked-by: Evgeniy Polyakov <zbr@xxxxxxxxxxx>


>> ÂI don't see how it breaks UAPI. The point is that structures
>> Âcoredump_proc_event and exit_proc_event are members of *union*
>> Âevent_data, thus position of the existing data in the structure is
>> Âunchanged. Furthermore, this change won't increase size of struct
>> Âproc_event, because comm_proc_event (also a member of event_data) is
>> Âof bigger size than the changed structures.
>>
>> ÂIf I'm wrong, could you please explain what exactly will the change
>> Âbreak in UAPI?
>>
>> ÂOn 30/03/18 19:59, David Miller wrote:
>>> ÂFrom: Stefan Strogin <sstrogin@xxxxxxxxx>
>>> ÂDate: Thu, 29 Mar 2018 17:12:47 +0300
>>>
>>>> Âdiff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h
>>>> Âindex 68ff25414700..db210625cee8 100644
>>>> Â--- a/include/uapi/linux/cn_proc.h
>>>> Â+++ b/include/uapi/linux/cn_proc.h
>>>> Â@@ -116,12 +116,16 @@ struct proc_event {
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂstruct coredump_proc_event {
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ__kernel_pid_t process_pid;
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ__kernel_pid_t process_tgid;
>>>> Â+ __kernel_pid_t parent_pid;
>>>> Â+ __kernel_pid_t parent_tgid;
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ} coredump;
>>>>
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂstruct exit_proc_event {
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ__kernel_pid_t process_pid;
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ__kernel_pid_t process_tgid;
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ__u32 exit_code, exit_signal;
>>>> Â+ __kernel_pid_t parent_pid;
>>>> Â+ __kernel_pid_t parent_tgid;
>>>> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂ} exit;
>>>>
>>>> ÂÂÂÂÂÂ} event_data;
>>>
>>> ÂI don't think you can add these members without breaking UAPI.