- 
  Notifications
 You must be signed in to change notification settings 
- Fork 19
Commit 44570ea
Set lockmem limit before checking BPF helper functions
In dtrace_init(), we set the locked-memory limit, either to the
user-specified value (if any) or to unlimited (by default). We also check
to make sure that certain BPF helper functions are available, falling
over to alternatives or indicating they are not available in case of
problems.
It is possible, however, that the limit is too low when dtrace starts,
causing problems with the helper-function tests before dtrace_init()
even has a chance to reset the limit.
Switch the order to set the limit before checking the helper functions.
A test is added. The underlying problem, however, depends on kernel
version, how locked memory is handled, the behavior of fallback
functions, and so on. So the test could easily pass on some systems
even if the fix is not employed.
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>1 parent 29c01a5 commit 44570ea
File tree
3 files changed
+30
-7
lines changed- libdtrace
- test/unittest/misc
3 files changed
+30
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 1213 | 1213 |  | |
| 1214 | 1214 |  | |
| 1215 | 1215 |  | |
| 1216 | - | ||
| 1217 | - | ||
| 1218 | - | ||
| 1219 | - | ||
| 1220 | - | ||
| 1221 | - | ||
| 1222 | - | ||
| 1223 | 1216 |  | |
| 1224 | 1217 |  | |
| 1225 | 1218 |  | |
|  | |||
| 1228 | 1221 |  | |
| 1229 | 1222 |  | |
| 1230 | 1223 |  | |
| 1224 | + | ||
| 1225 | + | ||
| 1226 | + | ||
| 1227 | + | ||
| 1228 | + | ||
| 1229 | + | ||
| 1230 | + | ||
| 1231 | 1231 |  | |
| 1232 | 1232 |  | |
| 1233 | 1233 |  | |
|  | |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 1 | + | ||
| 2 | + | ||
| 3 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
|  | |||
| 1 | + | ||
| 2 | + | ||
| 3 | + | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + | ||
| 7 | + | ||
| 8 | + | ||
| 9 | + | ||
| 10 | + | ||
| 11 | + | ||
| 12 | + | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + | ||
0 commit comments