Re: [PATCH v4 1/2] selinux: add tracepoint on audited events

2020-08-24 Thread Thiébaud Weksteen
> Merged into selinux/next, thanks! Thanks everyone for the reviews and constructive feedback!

[PATCH v4 2/2] selinux: add basic filtering for audit trace events

2020-08-21 Thread Thiébaud Weksteen
:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:bin_t:s0 tclass=file runcon-1365 [003] 6960.955560: => <7f325b4ce45b> => <5607093efa57> Signed-off-by: Peter Enderborg Reviewed-by: Thiébaud Weksteen --- include/trace/events/avc.h |

[PATCH v4 1/2] selinux: add tracepoint on audited events

2020-08-21 Thread Thiébaud Weksteen
ped to a class by searching security/selinux/flask.h. The audited value is a bit field of the permissions described in security/selinux/av_permissions.h for the corresponding class. [1] https://source.android.com/devices/tech/debug/native_stack_dump Signed-off-by: Thiébaud Weksteen Suggested-by: J

[PATCH v4 0/2] selinux: add detailed tracepoint on audited events

2020-08-21 Thread Thiébaud Weksteen
patch to include decoded permissions. - Remove ssid and tsid from attributes list. - Update commit log with more context. Peter Enderborg (1): selinux: add basic filtering for audit trace events Thiébaud Weksteen (1): selinux: add tracepoint on audited events MAINTAINERS| 1

[PATCH v3 1/3] selinux: add tracepoint on audited events

2020-08-17 Thread Thiébaud Weksteen
ped to a class by searching security/selinux/flask.h. The audited value is a bit field of the permissions described in security/selinux/av_permissions.h for the corresponding class. [1] https://source.android.com/devices/tech/debug/native_stack_dump Signed-off-by: Thiébaud Weksteen Suggested-by: J

[PATCH v3 2/3] selinux: add basic filtering for audit trace events

2020-08-17 Thread Thiébaud Weksteen
:system_r:cupsd_t:s0-s0:c0.c1023 tcontext=system_u:object_r:bin_t:s0 tclass=file runcon-1365 [003] 6960.955560: => <7f325b4ce45b> => <5607093efa57> Signed-off-by: Peter Enderborg Reviewed-by: Thiébaud Weksteen --- include/trace/events/avc.h |

[PATCH v3 0/3] selinux: add detailed tracepoint on audited events

2020-08-17 Thread Thiébaud Weksteen
context. Peter Enderborg (2): selinux: add basic filtering for audit trace events selinux: add permission names to trace event Thiébaud Weksteen (1): selinux: add tracepoint on denials MAINTAINERS| 1 + include/trace/events/avc.h | 60

[PATCH v3 3/3] selinux: add permission names to trace event

2020-08-17 Thread Thiébaud Weksteen
ed or requested attributes. Suggested-by: Steven Rostedt Suggested-by: Stephen Smalley Reviewed-by: Thiébaud Weksteen Signed-off-by: Peter Enderborg --- include/trace/events/avc.h | 11 +-- security/selinux/avc.c | 36 2 files changed, 45 insertions(+),

Re: [PATCH v2 1/2] selinux: add tracepoint on denials

2020-08-14 Thread Thiébaud Weksteen
On Thu, Aug 13, 2020 at 5:41 PM Stephen Smalley wrote: > > An explanation here of how one might go about decoding audited and > tclass would be helpful to users (even better would be a script to do it > for them). Again, I know how to do that but not everyone using > perf/ftrace will. What

[PATCH v2 2/2] selinux: add basic filtering for audit trace events

2020-08-13 Thread Thiébaud Weksteen
s the internal numeric representation of scontext and tsid is numeric for tcontext. They are useful for filtering. Signed-off-by: Peter Enderborg Reviewed-by: Thiébaud Weksteen --- v2 changes: - update changelog to include usage examples include/trace/events/avc.h | 41 +

[PATCH v2 1/2] selinux: add tracepoint on denials

2020-08-13 Thread Thiébaud Weksteen
com/devices/tech/debug/native_stack_dump Signed-off-by: Thiébaud Weksteen Suggested-by: Joel Fernandes Reviewed-by: Peter Enderborg --- v2 changes: - update changelog to include usage examples MAINTAINERS| 1 + include/trace/events/avc.h |

[PATCH 1/2] selinux: add tracepoint on denials

2020-08-06 Thread Thiébaud Weksteen
-by: Thiébaud Weksteen Suggested-by: Joel Fernandes Reviewed-by: Peter Enderborg --- MAINTAINERS| 1 + include/trace/events/avc.h | 37 + security/selinux/avc.c | 5 + 3 files changed, 43 insertions(+) create mode 100644 include/trace

[PATCH 2/2] selinux: add attributes to avc tracepoint

2020-08-06 Thread Thiébaud Weksteen
From: Peter Enderborg Add further attributes to filter the trace events from AVC. Signed-off-by: Peter Enderborg Reviewed-by: Thiébaud Weksteen --- include/trace/events/avc.h | 41 -- security/selinux/avc.c | 22 +++- 2 files changed

Re: [PATCH] RFC: selinux avc trace

2020-07-31 Thread Thiébaud Weksteen
Thanks Peter, this looks like a great start. > Perhaps the two of you could work together to come up with a common tracepoint that addresses both needs. Agreed. > 1 Filtering. Types goes to trace so we can put up a filter for contexts or > type etc. That's right. I think this is the main

Re: [PATCH] selinux: add tracepoint on denials

2020-07-30 Thread Thiébaud Weksteen
On Tue, Jul 28, 2020 at 6:20 PM Paul Moore wrote: > I probably wasn't as clear as I should have been. I think it would be > helpful if you demonstrated how one would take the SELinux data in the > perf event and translated that into something meaningful. So the data itself is not that relevant.

Re: [PATCH] selinux: add tracepoint on denials

2020-07-28 Thread Thiébaud Weksteen
On Tue, Jul 28, 2020 at 5:12 PM Paul Moore wrote: > Perhaps it would be helpful if you provided an example of how one > would be expected to use this new tracepoint? That would help put > things in the proper perspective. The best example is the one I provided in the commit message, that is

Re: [PATCH] selinux: add tracepoint on denials

2020-07-28 Thread Thiébaud Weksteen
On Tue, Jul 28, 2020 at 3:12 PM Steven Rostedt wrote: > Where in that document does it say that trace events have a fixed size. > We have a lot of dynamically sized trace events. My mistake. From the "format" pseudo-file, I assumed the offset and size were fixed. > Please take a look at

Re: [PATCH] selinux: add tracepoint on denials

2020-07-28 Thread Thiébaud Weksteen
On Tue, Jul 28, 2020 at 3:04 PM Stephen Smalley wrote: > Ok, also please use unsigned int for the fields and %u for the cls value. Will do in v3. Thanks.

[PATCH v2] selinux: add tracepoint on denials

2020-07-28 Thread Thiébaud Weksteen
-by: Thiébaud Weksteen Signed-off-by: Joel Fernandes --- Changes in v2: - Replace %d formatter with %x - Replace TRACE_EVENT with TRACE_EVENT_CONDITION - Add pid to structure and printk - Rename structure fields for clarity MAINTAINERS| 1 + include/trace/events/selinux.h | 39

Re: [PATCH] selinux: add tracepoint on denials

2020-07-28 Thread Thiébaud Weksteen
of the printk, which should be sufficient for the correlation. On Fri, Jul 24, 2020 at 3:55 PM Paul Moore wrote: > > On Fri, Jul 24, 2020 at 9:32 AM Stephen Smalley > wrote: > > On Fri, Jul 24, 2020 at 5:15 AM Thiébaud Weksteen wrote: > > > The audit data currently captures

[PATCH] selinux: add tracepoint on denials

2020-07-24 Thread Thiébaud Weksteen
-by: Thiébaud Weksteen Signed-off-by: Joel Fernandes --- MAINTAINERS| 1 + include/trace/events/selinux.h | 35 ++ security/selinux/avc.c | 6 ++ 3 files changed, 42 insertions(+) create mode 100644 include/trace/events/selinux.h diff

scripts/gdb: multi arch lx_current

2015-05-26 Thread Thiébaud Weksteen
Hi Jan, I've been working on lx_current and cpus.py to support other architectures than just x86. From my understanding, current/get_current are not available with the default debug option (-g). We could either modify that level so that the inline functions/macros are available or reimplement

scripts/gdb: multi arch lx_current

2015-05-26 Thread Thiébaud Weksteen
Hi Jan, I've been working on lx_current and cpus.py to support other architectures than just x86. From my understanding, current/get_current are not available with the default debug option (-g). We could either modify that level so that the inline functions/macros are available or reimplement

[PATCH] scripts/gdb: Add ps command

2015-05-14 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen --- scripts/gdb/linux/tasks.py | 16 1 file changed, 16 insertions(+) diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 0fa33b0..862a4ae 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py @@ -66,6

[PATCH 3/3] scripts/gdb: Remove useless global instruction

2015-05-14 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen --- scripts/gdb/linux/tasks.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 89d38e1..0fa33b0 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py @@ -20,7 +20,6 @@ task_type

[PATCH] scripts/gdb: Add ps command

2015-05-14 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen thieb...@weksteen.fr --- scripts/gdb/linux/tasks.py | 16 1 file changed, 16 insertions(+) diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 0fa33b0..862a4ae 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux

[PATCH 3/3] scripts/gdb: Remove useless global instruction

2015-05-14 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen thieb...@weksteen.fr --- scripts/gdb/linux/tasks.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py index 89d38e1..0fa33b0 100644 --- a/scripts/gdb/linux/tasks.py +++ b/scripts/gdb/linux/tasks.py

[PATCH 2/3] scripts/gdb: Fix PEP8 compliance

2015-05-13 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen --- scripts/gdb/linux/dmesg.py | 1 - scripts/gdb/linux/symbols.py | 9 - scripts/gdb/linux/tasks.py | 2 ++ scripts/gdb/linux/utils.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/gdb/linux/dmesg.py b/scripts/gdb

[PATCH 1/3] scripts/gdb: Fix typo in exception name

2015-05-13 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen --- scripts/gdb/linux/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py index 128c306..d7ff3a3 100644 --- a/scripts/gdb/linux/utils.py +++ b/scripts/gdb/linux/utils.py @@ -83,7

[PATCH 0/3] scripts/gdb: clean up

2015-05-13 Thread Thiébaud Weksteen
Set of patches to clean up scripts/gdb Thiébaud Weksteen (3): scripts/gdb: Fix typo in exception name scripts/gdb: Fix PEP8 compliance scripts/gdb: Remove useless global instruction scripts/gdb/linux/dmesg.py | 1 - scripts/gdb/linux/symbols.py | 9 - scripts/gdb/linux/tasks.py

[PATCH 0/3] scripts/gdb: clean up

2015-05-13 Thread Thiébaud Weksteen
Set of patches to clean up scripts/gdb Thiébaud Weksteen (3): scripts/gdb: Fix typo in exception name scripts/gdb: Fix PEP8 compliance scripts/gdb: Remove useless global instruction scripts/gdb/linux/dmesg.py | 1 - scripts/gdb/linux/symbols.py | 9 - scripts/gdb/linux/tasks.py

[PATCH 1/3] scripts/gdb: Fix typo in exception name

2015-05-13 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen thieb...@weksteen.fr --- scripts/gdb/linux/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py index 128c306..d7ff3a3 100644 --- a/scripts/gdb/linux/utils.py +++ b/scripts/gdb/linux

[PATCH 2/3] scripts/gdb: Fix PEP8 compliance

2015-05-13 Thread Thiébaud Weksteen
Signed-off-by: Thiébaud Weksteen thieb...@weksteen.fr --- scripts/gdb/linux/dmesg.py | 1 - scripts/gdb/linux/symbols.py | 9 - scripts/gdb/linux/tasks.py | 2 ++ scripts/gdb/linux/utils.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/gdb/linux

[PATCH v2] scripts/gdb: Add command to check list consistency

2015-04-23 Thread Thiébaud Weksteen
Add a gdb script to verify the consistency of lists. Signed-off-by: Thiébaud Weksteen --- Implement suggestions from Jan. Changes in v2: - Add copyright line - Rename check_list to list_check - Remove casting and only accept (struct list_head) object - Add error message if argument

[PATCH v2] scripts/gdb: Add command to check list consistency

2015-04-23 Thread Thiébaud Weksteen
Add a gdb script to verify the consistency of lists. Signed-off-by: Thiébaud Weksteen thieb...@weksteen.fr --- Implement suggestions from Jan. Changes in v2: - Add copyright line - Rename check_list to list_check - Remove casting and only accept (struct list_head) object - Add error message

[PATCH] scripts/gdb: Add command to check list consistency

2015-04-22 Thread Thiébaud Weksteen
Add a gdb script to verify the consistency of lists. Signed-off-by: Thiébaud Weksteen --- scripts/gdb/linux/lists.py | 78 ++ scripts/gdb/vmlinux-gdb.py | 1 + 2 files changed, 79 insertions(+) create mode 100644 scripts/gdb/linux/lists.py diff

[PATCH] scripts/gdb: Add command to check list consistency

2015-04-22 Thread Thiébaud Weksteen
Add a gdb script to verify the consistency of lists. Signed-off-by: Thiébaud Weksteen thieb...@weksteen.fr --- scripts/gdb/linux/lists.py | 78 ++ scripts/gdb/vmlinux-gdb.py | 1 + 2 files changed, 79 insertions(+) create mode 100644 scripts/gdb