<div dir="auto">What would be so messy about adding the extra field?<div dir="auto"><br></div><div dir="auto">I'm happy to put together a patch myself which adds it to all syscalls and to process lifecycle events. My goal isn't to identify the exact thread that performs every audit event but rather to allow tracking thread lifecycle which isn't currently possible.</div><div dir="auto"><br></div><div dir="auto">Natan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 8, 2020, 04:27 Paul Moore <<a href="mailto:paul@paul-moore.com">paul@paul-moore.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Oct 6, 2020 at 4:20 PM Steve Grubb <<a href="mailto:sgrubb@redhat.com" target="_blank" rel="noreferrer">sgrubb@redhat.com</a>> wrote:<br>
> On Monday, October 5, 2020 3:07:12 PM EDT Natan Yellin wrote:<br>
> > I've been tracking all process terminations using a rule for the exit and<br>
> > exit_group syscalls. However, by looking at the audit events for exit it is<br>
> > impossible to differentiate between the death of different threads in the<br>
> > same thread group. Is there an alternative way to track this?<br>
><br>
> I don't think the audit system was ever designed to distinguish between<br>
> threads. But there is a general need to determine the exit of a process<br>
> rather than a thread.<br>
><br>
> Paul, Richard, Do you have any thoughts?<br>
<br>
Almost everywhere in the kernel we record the TGID for the "pid="<br>
values and not the actual task/thread ID.  That decision was made<br>
before my heavy involvement with audit, but my guess is that most<br>
audit users are focused more on security relevant events at the<br>
process level, not the thread level.  After all, there isn't really<br>
much in the way of significant boundaries between threads.<br>
<br>
To get the information you are looking for, I think we would need to<br>
add an additional task/thread ID to the relevant records and that<br>
would be *very* messy.<br>
<br>
-- <br>
paul moore<br>
<a href="http://www.paul-moore.com" rel="noreferrer noreferrer" target="_blank">www.paul-moore.com</a><br>
</blockquote></div>