lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 27 Jan 2021 16:57:40 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     vjitta@...eaurora.org
Cc:     minchan@...nel.org, glider@...gle.com, dan.j.williams@...el.com,
        broonie@...nel.org, mhiramat@...nel.org,
        linux-kernel@...r.kernel.org, ylal@...eaurora.org,
        vinmenon@...eaurora.org
Subject: Re: [PATCH v6 2/2] lib: stackdepot: Add support to disable stack
 depot

On Wed, 27 Jan 2021 17:36:38 +0530 vjitta@...eaurora.org wrote:

> Add a kernel parameter stack_depot_disable to disable
> stack depot. So that stack hash table doesn't consume
> any memory when stack depot is disabled.
> 
> The usecase is CONFIG_PAGE_OWNER without page_owner=on.
> Without this patch, stackdepot will consume the memory
> for the hashtable. By default, it's 8M which is never trivial.
> 
> With this option, in CONFIG_PAGE_OWNER configured system,
> page_owner=off, stack_depot_disable in kernel command line,
> we could save the wasted memory for the hashtable.

CONFIG_STACKDEPOT=n:

main.c:(.init.text+0x4c1): undefined reference to `stack_depot_init'


--- a/include/linux/stackdepot.h~lib-stackdepot-add-support-to-disable-stack-depot-fix
+++ a/include/linux/stackdepot.h
@@ -21,5 +21,13 @@ unsigned int stack_depot_fetch(depot_sta
 
 unsigned int filter_irq_stacks(unsigned long *entries, unsigned int nr_entries);
 
+#ifdef CONFIG_STACKDEPOT
 int stack_depot_init(void);
+#else
+static inline int stack_depot_init(void)
+{
+	return 0;
+}
+#endif	/* CONFIG_STACKDEPOT */
+
 #endif
_

Powered by blists - more mailing lists