lib/test_min_heap: use inline min heap variants to reduce attack vector
authorKuan-Wei Chiu <visitorckw@gmail.com>
Fri, 29 Nov 2024 18:12:20 +0000 (02:12 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 13 Jan 2025 04:20:57 +0000 (20:20 -0800)
commit93aa1b5c1722b697ecc4eae490fdb55c0f3cfe22
tree894670517b9a45aa0ceb145d6183294529d125d7
parentec01e9d001fef6278df1900df4207c70166095b4
lib/test_min_heap: use inline min heap variants to reduce attack vector

To address concerns about increasing the attack vector, remove the select
MIN_HEAP dependency from TEST_MIN_HEAP in Kconfig.debug.

Additionally, all min heap test function calls in lib/test_min_heap.c are
replaced with their inline variants.  By exclusively using inline
variants, we eliminate the need to enable CONFIG_MIN_HEAP for testing
purposes.

Link: https://lore.kernel.org/lkml/CAMuHMdVO5DPuD9HYWBFqKDHphx7+0BEhreUxtVC40A=8p6VAhQ@mail.gmail.com
Link: https://lkml.kernel.org/r/20241129181222.646855-3-visitorckw@gmail.com
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/Kconfig.debug
lib/test_min_heap.c