* [PATCH] powerpc: add link stack flush mitigation status in debugfs.
@ 2019-11-27 22:09 Michal Suchanek
2022-02-15 5:26 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michal Suchanek @ 2019-11-27 22:09 UTC (permalink / raw)
To: linuxppc-dev
Cc: Michal Suchanek, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, Diana Craciun, Josh Poimboeuf,
Anthony Steinhauser, Gustavo L. F. Walbon, YueHaibing,
Geert Uytterhoeven, Christopher M. Riedl, linux-kernel
The link stack flush status is not visible in debugfs. It can be enabled
even when count cache flush is disabled. Add separate file for its
status.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
arch/powerpc/kernel/security.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/powerpc/kernel/security.c b/arch/powerpc/kernel/security.c
index 7d4b2080a658..56dce4798a4d 100644
--- a/arch/powerpc/kernel/security.c
+++ b/arch/powerpc/kernel/security.c
@@ -446,14 +446,26 @@ static int count_cache_flush_get(void *data, u64 *val)
return 0;
}
+static int link_stack_flush_get(void *data, u64 *val)
+{
+ *val = link_stack_flush_enabled;
+
+ return 0;
+}
+
DEFINE_DEBUGFS_ATTRIBUTE(fops_count_cache_flush, count_cache_flush_get,
count_cache_flush_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(fops_link_stack_flush, link_stack_flush_get,
+ count_cache_flush_set, "%llu\n");
static __init int count_cache_flush_debugfs_init(void)
{
debugfs_create_file_unsafe("count_cache_flush", 0600,
powerpc_debugfs_root, NULL,
&fops_count_cache_flush);
+ debugfs_create_file_unsafe("link_stack_flush", 0600,
+ powerpc_debugfs_root, NULL,
+ &fops_link_stack_flush);
return 0;
}
device_initcall(count_cache_flush_debugfs_init);
--
2.23.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: add link stack flush mitigation status in debugfs.
2019-11-27 22:09 [PATCH] powerpc: add link stack flush mitigation status in debugfs Michal Suchanek
@ 2022-02-15 5:26 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2022-02-15 5:26 UTC (permalink / raw)
To: Michal Suchanek, linuxppc-dev
Cc: Benjamin Herrenschmidt, Geert Uytterhoeven, Josh Poimboeuf,
YueHaibing, Christopher M. Riedl, Michael Ellerman,
Gustavo L. F. Walbon, linux-kernel, Anthony Steinhauser,
Paul Mackerras, Diana Craciun
On Wed, 27 Nov 2019 23:09:59 +0100, Michal Suchanek wrote:
> The link stack flush status is not visible in debugfs. It can be enabled
> even when count cache flush is disabled. Add separate file for its
> status.
>
>
Applied to powerpc/next.
[1/1] powerpc: add link stack flush mitigation status in debugfs.
https://git.kernel.org/powerpc/c/b2a6f6043577e09d51a4b5577fff9fc9f5b14b1c
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-15 5:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 22:09 [PATCH] powerpc: add link stack flush mitigation status in debugfs Michal Suchanek
2022-02-15 5:26 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).