[PATCH 2/4] s390/mm: Add __context_unsafe() attribute to do_secure_storage_access()

Heiko Carstens <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
Compiling do_secure_storage_access() with context analysis enabled
results in this warning:

arch/s390/mm/fault.c:472:3: warning: releasing spinlock 'fw.ptl' that was not held
  472 |                 folio_walk_end(&fw, vma);

Problem is that folio_walk_end() comes without the required context
analysis attribute. Also the proper attribute cannot be added easily,
since folio_walk_end() is a macro, and not a function.

For the time being disable context analysis only for
do_secure_storage_access() until this is resolved.

Signed-off-by: Heiko Carstens <[email protected]>
---
 arch/s390/mm/fault.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 028aeb9c48d6..5af448fca962 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -406,6 +406,7 @@ NOKPROBE_SYMBOL(do_dat_exception);
 #if IS_ENABLED(CONFIG_KVM)
 
 void do_secure_storage_access(struct pt_regs *regs)
+__context_unsafe(/* folio_walk_end() not instrumented */)
 {
 	union teid teid = { .val = regs->int_parm_long };
 	unsigned long addr = get_fault_address(regs);
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.