This revision introduces atf-c(3) tests for 2 Capability mode syscalls and _exit(2).
- cap_enter(2)
- cap_getmode(2)
- _exit(2)
Paths
| Differential D16099 Authored by aniketp on Jul 2 2018, 5:41 PM.
Tags None Referenced Files
Details Summary This revision introduces atf-c(3) tests for 2 Capability mode syscalls and _exit(2).
Test Plan Execute make && make install from test/sys/audit.
Diff Detail
Event TimelineHerald added a subscriber: jonathan. · View Herald TranscriptJul 2 2018, 5:41 PM2018-07-02 17:41:33 (UTC+0) Harbormaster completed remote builds in B17792: Diff 44764.Jul 2 2018, 5:41 PM2018-07-02 17:41:35 (UTC+0) Comment Actions For me cap_enter_success passes intermittently. On a case when it failed, the global audit trail showed the cap_enter call we were looking for (as well as the child's exit(2), which is also in class "pc"). But the auditpipe showed nothing after fork. I think we're looking at a buffering issue. When I run "./process_control cap_enter_success" the last thing I see is the fork record. Then the process pauses for 10 seconds. But while it's paused, if I run any command at all in another terminal, then the test immediately passes. So I think that the auditpipe(4) device is buffering up some amount of data before its read(2) returns. Comment Actions
Harbormaster completed remote builds in B17948: Diff 45103.Jul 10 2018, 8:47 AM2018-07-10 08:47:20 (UTC+0) Harbormaster completed remote builds in B17970: Diff 45145.Jul 11 2018, 7:32 AM2018-07-11 07:32:19 (UTC+0) aniketp retitled this revision from Introduce tests for Capability mode System calls to Introduce tests for Capability mode System calls and _exit(2).Jul 11 2018, 7:33 AM2018-07-11 07:33:01 (UTC+0) Harbormaster completed remote builds in B17971: Diff 45146.Jul 11 2018, 7:57 AM2018-07-11 07:57:37 (UTC+0) Comment Actions using AUDITPIPE_FLUSH doesn't work. You should remove that part and fix the bug in utils.c instead. This revision now requires changes to proceed.Jul 11 2018, 2:58 PM2018-07-11 14:58:50 (UTC+0) aniketp updated this revision to Diff 45389.Edited · Jul 16 2018, 8:31 PM2018-07-16 20:31:52 (UTC+0) Comment Actions
Harbormaster completed remote builds in B18082: Diff 45389.Jul 16 2018, 8:31 PM2018-07-16 20:31:53 (UTC+0) Harbormaster completed remote builds in B18083: Diff 45390.Jul 16 2018, 8:33 PM2018-07-16 20:33:31 (UTC+0) Harbormaster completed remote builds in B18084: Diff 45391.Jul 16 2018, 8:35 PM2018-07-16 20:35:05 (UTC+0) Comment Actions There's nothing special about exit or cap_enter. You need to disable buffering everywhere, anytime you combine fread(3) with something like ppoll(2). This revision now requires changes to proceed.Jul 16 2018, 9:55 PM2018-07-16 21:55:20 (UTC+0) Harbormaster completed remote builds in B18089: Diff 45397.Jul 16 2018, 10:44 PM2018-07-16 22:44:52 (UTC+0) Comment Actions
Harbormaster completed remote builds in B18090: Diff 45398.Jul 16 2018, 10:47 PM2018-07-16 22:47:35 (UTC+0)
Harbormaster completed remote builds in B18092: Diff 45405.Jul 17 2018, 8:40 AM2018-07-17 08:40:03 (UTC+0) This comment was removed by aniketp. aniketp updated this revision to Diff 45406.Edited · Jul 17 2018, 8:47 AM2018-07-17 08:47:05 (UTC+0) Comment Actions
Harbormaster completed remote builds in B18093: Diff 45406.Jul 17 2018, 8:47 AM2018-07-17 08:47:07 (UTC+0) This revision is now accepted and ready to land.Jul 17 2018, 3:09 PM2018-07-17 15:09:16 (UTC+0) Closed by commit rS336418: audit(4): add tests for _exit(2), cap_enter(2), and cap_getmode(2) (authored by asomers). · Explain WhyJul 17 2018, 3:13 PM2018-07-17 15:13:15 (UTC+0) This revision was automatically updated to reflect the committed changes. Herald added a subscriber: imp. · View Herald TranscriptJul 17 2018, 3:13 PM2018-07-17 15:13:15 (UTC+0)
Revision Contents
Diff 45398 tests/sys/audit/process-control.c
tests/sys/audit/utils.c
|
It'd be helpful to have a comment indicating that this is a shadow of the max_pstreams field of epctx0.