devcoredump: provide a one-way disable function
authorJohannes Berg <johannes.berg@intel.com>
Thu, 13 Nov 2014 21:16:29 +0000 (22:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Nov 2014 03:40:12 +0000 (19:40 -0800)
commitd45333294da8341f64d22219729249f7102c490e
treeb9b7194a4789377ddfbdf8591f52e974d468348f
parente135303bd5bebcd22bcf8a6b06ec0dd5a9432708
devcoredump: provide a one-way disable function

Since device/firmware coredumps can contain private data, it can
be desirable to turn them off unconditionally to be certain that
no such data will be collected by the system.

To achieve this, provide a "disabled" sysfs class attribute that
can only be changed from 0 to 1 and not back. Upon disabling,
discard existing coredumps and stop storing new ones.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/devcoredump.c