@@ -57,11 +57,16 @@ compiled application or the operating system. Integrating
the runtime into
the operating system should be preferred since otherwise all thread creation
and destruction would need to be intercepted by the application.
-The instrumentation makes use of the p
Author: Sami Tolvanen
Date: 2022-10-26T20:38:37Z
New Revision: 1aad641c793090b4d036c03e737df2ebe2c32c57
URL:
https://github.com/llvm/llvm-project/commit/1aad641c793090b4d036c03e737df2ebe2c32c57
DIFF:
https://github.com/llvm/llvm-project/commit/1aad641c793090b4d036c03e737df2ebe2c32c57.diff
LOG:
Author: Sami Tolvanen
Date: 2022-11-07T23:05:28Z
New Revision: 41ce74e6e983f523d44d3a80be5ae778c35df85a
URL:
https://github.com/llvm/llvm-project/commit/41ce74e6e983f523d44d3a80be5ae778c35df85a
DIFF:
https://github.com/llvm/llvm-project/commit/41ce74e6e983f523d44d3a80be5ae778c35df85a.diff
LOG:
Author: Sami Tolvanen
Date: 2022-11-17T21:55:00Z
New Revision: eb2a57ebc7aaad551af30462097a9e06c96db925
URL:
https://github.com/llvm/llvm-project/commit/eb2a57ebc7aaad551af30462097a9e06c96db925
DIFF:
https://github.com/llvm/llvm-project/commit/eb2a57ebc7aaad551af30462097a9e06c96db925.diff
LOG:
Author: Ramon de C Valle
Date: 2023-02-01T17:48:03Z
New Revision: b1e9ab7438a098a18fecda88fc87ef4ccadfcf1e
URL:
https://github.com/llvm/llvm-project/commit/b1e9ab7438a098a18fecda88fc87ef4ccadfcf1e
DIFF:
https://github.com/llvm/llvm-project/commit/b1e9ab7438a098a18fecda88fc87ef4ccadfcf1e.diff
L
Author: Sami Tolvanen
Date: 2023-01-11T23:45:49Z
New Revision: fd5e2627066075f3d15ef774ef368e08735a9ac9
URL:
https://github.com/llvm/llvm-project/commit/fd5e2627066075f3d15ef774ef368e08735a9ac9
DIFF:
https://github.com/llvm/llvm-project/commit/fd5e2627066075f3d15ef774ef368e08735a9ac9.diff
LOG:
samitolvanen wrote:
The patch basically changes the ShadowCallStack back-end to emit an
sspush/sspopchk instead of the usual SCS push/pop, which seems like a
reasonable approach to me. However, it would be helpful to mention the
dependency on `-fsanitize=shadow-call-stack` in the commit messag
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB,
CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; }))
return;
+ const RISCVInstrInfo *TII = STI.getInstrInfo();
+ if (STI.hasFeature(RISCV::FeatureStdExt
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB,
CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; }))
return;
+ const RISCVInstrInfo *TII = STI.getInstrInfo();
+ if (STI.hasFeature(RISCV::FeatureStdExt
Author: Sami Tolvanen
Date: 2023-07-07T16:50:30Z
New Revision: 930635271f810316f48bd1aa78935acf36a08f8f
URL:
https://github.com/llvm/llvm-project/commit/930635271f810316f48bd1aa78935acf36a08f8f
DIFF:
https://github.com/llvm/llvm-project/commit/930635271f810316f48bd1aa78935acf36a08f8f.diff
LOG:
Author: Sami Tolvanen
Date: 2022-11-22T18:20:04Z
New Revision: 5a3d6ce956c44384920557b455b4db2bb0ab2fad
URL:
https://github.com/llvm/llvm-project/commit/5a3d6ce956c44384920557b455b4db2bb0ab2fad
DIFF:
https://github.com/llvm/llvm-project/commit/5a3d6ce956c44384920557b455b4db2bb0ab2fad.diff
LOG:
Author: Sami Tolvanen
Date: 2022-11-22T23:01:18Z
New Revision: cacd3e73d7f87ef3593443271ab3f170d0360934
URL:
https://github.com/llvm/llvm-project/commit/cacd3e73d7f87ef3593443271ab3f170d0360934
DIFF:
https://github.com/llvm/llvm-project/commit/cacd3e73d7f87ef3593443271ab3f170d0360934.diff
LOG:
Author: Sami Tolvanen
Date: 2023-06-23T18:25:24Z
New Revision: 62fa708ceb027713b386c7e0efda994f8bdc27e2
URL:
https://github.com/llvm/llvm-project/commit/62fa708ceb027713b386c7e0efda994f8bdc27e2
DIFF:
https://github.com/llvm/llvm-project/commit/62fa708ceb027713b386c7e0efda994f8bdc27e2.diff
LOG:
Author: Sami Tolvanen
Date: 2023-06-23T21:42:57Z
New Revision: e809ebeb6c8b4986cc82542cffd07a453bfac66c
URL:
https://github.com/llvm/llvm-project/commit/e809ebeb6c8b4986cc82542cffd07a453bfac66c
DIFF:
https://github.com/llvm/llvm-project/commit/e809ebeb6c8b4986cc82542cffd07a453bfac66c.diff
LOG:
Author: Sami Tolvanen
Date: 2023-06-23T22:57:56Z
New Revision: 83835e22c7cd50c0e9b836cc359b6c59985b921f
URL:
https://github.com/llvm/llvm-project/commit/83835e22c7cd50c0e9b836cc359b6c59985b921f
DIFF:
https://github.com/llvm/llvm-project/commit/83835e22c7cd50c0e9b836cc359b6c59985b921f.diff
LOG:
Author: Ramon de C Valle
Date: 2023-02-08T22:24:19Z
New Revision: 71c7313f42d2b6063fea09854cf4fc46fd0627e1
URL:
https://github.com/llvm/llvm-project/commit/71c7313f42d2b6063fea09854cf4fc46fd0627e1
DIFF:
https://github.com/llvm/llvm-project/commit/71c7313f42d2b6063fea09854cf4fc46fd0627e1.diff
L
Author: Sami Tolvanen
Date: 2023-02-16T00:21:31Z
New Revision: a851d46e07c1234a0763b4630c8475c73208e776
URL:
https://github.com/llvm/llvm-project/commit/a851d46e07c1234a0763b4630c8475c73208e776
DIFF:
https://github.com/llvm/llvm-project/commit/a851d46e07c1234a0763b4630c8475c73208e776.diff
LOG:
Author: Sami Tolvanen
Date: 2023-06-05T20:39:45Z
New Revision: 5a64a826b9f0efab4ba7a8cdab4857794bbf07f3
URL:
https://github.com/llvm/llvm-project/commit/5a64a826b9f0efab4ba7a8cdab4857794bbf07f3
DIFF:
https://github.com/llvm/llvm-project/commit/5a64a826b9f0efab4ba7a8cdab4857794bbf07f3.diff
LOG:
@@ -2813,6 +2813,11 @@ void CodeGenFunction::EmitKCFIOperandBundle(
Callee.getAbstractInfo().getCalleeFunctionProtoType();
if (FP)
Bundles.emplace_back("kcfi", CGM.CreateKCFITypeId(FP->desugar()));
+ else {
+ASTContext &context = this->getContext();
+QualTy
samitolvanen wrote:
> If a function is declared without a prototype (pre-C23), it doesn't mean it
> has a void argument list; it means the argument list is undeclared. So you
> can't just assume the argument list is void; you have to compute the argument
> types from the actual arguments passe
Author: Sami Tolvanen
Date: 2021-12-20T12:55:33-08:00
New Revision: ec2e26eaf63558934f5b73a6e530edc453cf9508
URL:
https://github.com/llvm/llvm-project/commit/ec2e26eaf63558934f5b73a6e530edc453cf9508
DIFF:
https://github.com/llvm/llvm-project/commit/ec2e26eaf63558934f5b73a6e530edc453cf9508.diff
https://github.com/samitolvanen created
https://github.com/llvm/llvm-project/pull/104826
With -fsanitize-cfi-icall-experimental-normalize-integers, Clang appends
".normalized" to KCFI types in CodeGenModule::CreateKCFITypeId, which changes
type hashes also for functions that don't have integer
https://github.com/samitolvanen updated
https://github.com/llvm/llvm-project/pull/104826
>From 0f7dfc3f908651a70602f4f64a0ae06616544eeb Mon Sep 17 00:00:00 2001
From: Sami Tolvanen
Date: Fri, 16 Aug 2024 20:45:05 +
Subject: [PATCH 1/3] Fix KCFI types for generated functions with integer
no
samitolvanen wrote:
> How about changing the module flag name to "cfi-normalize-integers" to be
> more consistent with the naming convention used
Sure, renamed.
https://github.com/llvm/llvm-project/pull/104826
___
cfe-commits mailing list
cfe-commit
samitolvanen wrote:
> LG. It's best to have a test for the LLVM generated function, not just reuse
> kcfi-normalize.c whose module flags could be puzzling for readers.
I think we still need to test that Clang adds the module flag, but I added
another test for the GCOV functions to make sure th
https://github.com/samitolvanen closed
https://github.com/llvm/llvm-project/pull/104826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
samitolvanen wrote:
/cherry-pick e1c36bde0551977d4b2efae032af6dfc4b2b3936
https://github.com/llvm/llvm-project/pull/104826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
samitolvanen wrote:
It would be nice to get this cherry-picked to 19.x, so the Rust kernel folks
don't have to wait for LLVM 20:
https://lore.kernel.org/lkml/202410281414.c351044e-oliver.s...@intel.com/
https://github.com/llvm/llvm-project/pull/104826
__
https://github.com/samitolvanen milestoned
https://github.com/llvm/llvm-project/pull/104826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
samitolvanen wrote:
/cherry-pick e1c36bde0551977d4b2efae032af6dfc4b2b3936
https://github.com/llvm/llvm-project/pull/104826
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
samitolvanen wrote:
While this overall looks like a nice improvement to me, changing the hashing
scheme is going to break compatibility with Rust. I would suggest moving this
change behind a command line flag, so the kernel can choose to enable it only
if Rust support isn't enabled, or if we h
samitolvanen wrote:
> Actually, I think this code was introduced to address a compatibility issue
> with KASAN, which apparently must generate KCFI-enabled code without clang. I
> found this explanation at
> [3b14862](https://github.com/llvm/llvm-project/commit/3b14862f0a968dc079530acbce4f2ca4
samitolvanen wrote:
> Sami, I'm guessing you're mainly talking about rustc and clang needing to use
> llvm versions that agree on the kCFI implementation in use?
Correct. Both compilers must use the same hashing scheme for cross-language
indirect calls to work, so unconditionally changing how
samitolvanen wrote:
> > AFAIK the use case for KCFI is very narrow: the x86-64 Linux kernel.
>
> At the very least, it's also used in the arm64 Linux Kernel.
Linux also supports KCFI on 32-bit ARM and RISC-V. However, this change seems
to only affect X86.
https://github.com/llvm/llvm-project/
https://github.com/samitolvanen approved this pull request.
Thank you for adding the command line flag. I agree that this should be
sufficient to address compatibility concerns.
https://github.com/llvm/llvm-project/pull/121070
___
cfe-commits mailing
@@ -254,6 +254,7 @@ FEATURE(is_trivially_constructible, LangOpts.CPlusPlus)
FEATURE(is_trivially_copyable, LangOpts.CPlusPlus)
FEATURE(is_union, LangOpts.CPlusPlus)
FEATURE(kcfi, LangOpts.Sanitize.has(SanitizerKind::KCFI))
+FEATURE(kcfi_x86_arity, LangOpts.Sanitize.has(Sanitize
samitolvanen wrote:
> A gentle reminder to please review this PR.
Overall this looks fine to me, but I was hoping to get an answer to my question
about how the Kconfig detection is actually going to be implemented:
https://github.com/llvm/llvm-project/pull/121070#discussion_r1911688455
https:
samitolvanen wrote:
> And AFAIK there's no other users of kCFI besides the Linux kernel (but please
> correct me if I'm wrong).
There are firmware projects that use KCFI, but AFAIK none of them run on x86.
I'm also fairly certain that only Linux performs runtime patching based on the
code seq
https://github.com/samitolvanen created
https://github.com/llvm/llvm-project/pull/131230
With -fpatchable-function-entry (or the patchable_function_entry function
attribute), we emit records of patchable entry locations to the
__patchable_function_entries section. Add an additional parameter t
samitolvanen wrote:
@MaskRay here's a draft implementation of the patchable function entry
extension [discussed in
LKML](https://lore.kernel.org/lkml/y1qezk%2fa41pkl...@hirez.programming.kicks-ass.net/)
a couple of years ago. Could you please take a look and see if this seems
reasonable?
htt
https://github.com/samitolvanen closed
https://github.com/llvm/llvm-project/pull/131230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
41 matches
Mail list logo