• Alexander Atanasov's avatar
    mm: Make failslab writable again · 7c82b3b3
    Alexander Atanasov authored
    In (060807f8 mm, slub: make remaining slub_debug related attributes
    read-only) failslab was made read-only.
    I think it became a collateral victim to the two other options for which
    the reasons are perfectly valid.
    Here is why:
     - sanity_checks and trace are slab internal debug options,
       failslab is used for fault injection.
     - for fault injections, which by presumption are random, it
       does not matter if it is not set atomically. And you need to
       set atleast one more option to trigger fault injection.
     - in a testing scenario you may need to change it at runtime
       example: module loading - you test all allocations limited
       by the space option. Then you move to test only your module's
       own slabs.
     - when set by command line flags it effectively disables all
       cache merges.
    
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Roman Gushchin <guro@fb.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Jann Horn <jannh@google.com>
    Cc: Vijayanand Jitta <vjitta@codeaurora.org>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Pekka Enberg <penberg@kernel.org>
    Link: http://lkml.kernel.org/r/20200610163135.17364-5-vbabka@suse.czSigned-off-by: default avatarAlexander Atanasov <alexander.atanasov@virtuozzo.com>
    Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
    7c82b3b3
slub.rst 17 KB