Message ID | 20211208044808.872554-1-pcc@google.com (mailing list archive) |
---|---|
Headers | show |
Series | kernel: introduce uaccess logging | expand |
On Wed, 8 Dec 2021 at 05:48, Peter Collingbourne <pcc@google.com> wrote: [...] > Peter Collingbourne (6): > include: split out uaccess instrumentation into a separate header > uaccess-buffer: add core code > fs: use copy_from_user_nolog() to copy mount() data > uaccess-buffer: add CONFIG_GENERIC_ENTRY support > arm64: add support for uaccess logging > Documentation: document uaccess logging I think it needs to be possible to disable the feature via a Kconfig option. Not all systems want or could even tolerate the additional overheads -- even though you say they are minimal elsewhere. For example, some embedded systems most likely have absolutely no use for this feature, and the increase in .text might be unacceptable. Certain features that we usually take for granted are no different (see init/Kconfig: FUTEX, EPOLL, .. etc). If you'd like it enabled by default, given the overheads are small enough, it can do "default y" and be configurable only "if EXPERT". Is it possible to add a kselftest-style test to tools/testing/selftests? In addition to the basic tests, can certain non-trivial properties, like masking of signals, also be tested? I think that'd be extremely valuable, because I'm sure we'd have to backport this to several older kernels. Thanks, -- Marco
On Wed, Dec 8, 2021 at 7:33 AM Marco Elver <elver@google.com> wrote: > > On Wed, 8 Dec 2021 at 05:48, Peter Collingbourne <pcc@google.com> wrote: > [...] > > Peter Collingbourne (6): > > include: split out uaccess instrumentation into a separate header > > uaccess-buffer: add core code > > fs: use copy_from_user_nolog() to copy mount() data > > uaccess-buffer: add CONFIG_GENERIC_ENTRY support > > arm64: add support for uaccess logging > > Documentation: document uaccess logging > > I think it needs to be possible to disable the feature via a Kconfig > option. Not all systems want or could even tolerate the additional > overheads -- even though you say they are minimal elsewhere. For > example, some embedded systems most likely have absolutely no use for > this feature, and the increase in .text might be unacceptable. Certain > features that we usually take for granted are no different (see > init/Kconfig: FUTEX, EPOLL, .. etc). If you'd like it enabled by > default, given the overheads are small enough, it can do "default y" > and be configurable only "if EXPERT". Okay, done. > Is it possible to add a kselftest-style test to > tools/testing/selftests? In addition to the basic tests, can certain > non-trivial properties, like masking of signals, also be tested? I > think that'd be extremely valuable, because I'm sure we'd have to > backport this to several older kernels. Yes, I've added a new patch with a kselftest. (Good thing I did, because it (together with DEBUG_PREEMPT) uncovered a bug in the pre/post-exit-loop code. Fixed in v4.) Peter