[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-27 Thread Ilya Leoshkevich via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa3e56a8792ff: [KMSAN] Enable on SystemZ (authored by iii). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-25 Thread Ilya Leoshkevich via Phabricator via cfe-commits
iii updated this revision to Diff 516926. iii added a comment. Herald added a subscriber: hoy. - Fixed an issue with copyRegSaveArea() overwriting shadow of caller's locals. The problem was that the kernel is compiled with "packed-stack", so register save areas may be smaller than 160 bytes.

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-21 Thread Ilya Leoshkevich via Phabricator via cfe-commits
iii updated this revision to Diff 515661. iii added a comment. - (unsigned)0 -> 0u (0 doesn't work, because the overload becomes ambiguous). - Improve matching in the testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148596/new/

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1498 +if (MS.TargetTriple.getArch() == Triple::systemz) + MS.MsanMetadataAlloca = IRB.CreateAlloca(MS.MsanMetadata, (unsigned)0); } Just use 0. Even

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/Instrumentation/MemorySanitizer/SystemZ/basic-kernel.ll:12 + +; CHECK-LABEL: @Store1 +; CHECK: [[META_PTR:%[a-z0-9_]+]] = alloca { ptr, ptr }, align 8 `; CHECK-LABEL: define {{[^@]+}}@Store1(` to match the

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148596/new/ https://reviews.llvm.org/D148596

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Ilya Leoshkevich via Phabricator via cfe-commits
iii updated this revision to Diff 515266. iii added a comment. - Add a comment to getOrInsertMsanMetadataFunction(). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148596/new/ https://reviews.llvm.org/D148596 Files:

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. LGTM with a nit. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:750 + ArgsTy... Args) { + if (TargetTriple.getArch() == Triple::systemz) { +return M.getOrInsertFunction(Name,

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-18 Thread Ilya Leoshkevich via Phabricator via cfe-commits
iii updated this revision to Diff 514692. iii added a comment. - Better explain the ABI situation. - Extend the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148596/new/ https://reviews.llvm.org/D148596 Files:

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-18 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:118 ///(X=1,2,4,8) are accessed through pointers obtained via the /// __msan_metadata_ptr_for_load_X(ptr) /// __msan_metadata_ptr_for_store_X(ptr)

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-18 Thread Ilya Leoshkevich via Phabricator via cfe-commits
iii added a comment. The kernel patch is currently WIP; I'm trying to get rid of false positives. Just some examples of the findings so far: - s390x always uses separate address spaces for kernel and userspace, so we need to skip the `addr < TASK_SIZE` check in `is_bad_asm_addr()`. - There is a

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-18 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Do you have a working kernel patch for SystemZ? I think we'd better name the functions taking the extra parameter differently - maybe at some point we'll even want them to coexist on certain architectures. Anyway, it might just look cleaner in the kernel code.

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-17 Thread Ilya Leoshkevich via Phabricator via cfe-commits
iii created this revision. iii added reviewers: eugenis, vitalybuka, glider, uweigand, jonpa. Herald added subscribers: Enna1, pengfei, hiraditya. Herald added a project: All. iii requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added