https://github.com/kbeyls edited https://github.com/llvm/llvm-project/pull/94394
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/kbeyls requested changes to this pull request.
Do I understand correctly that "remove big-endian support" results in this code
not running correctly on big-endian machines?
I don't recall the LLVM project claiming that it cannot run on big-endian
machines.
If I understand thi
@@ -58,21 +38,15 @@
v2 = ROTL(v2, 32);
\
} while (0)
-/*
kbeyls wrote:
It might be worthwhile to keep (an edited version of) this comment? It wasn't
immediately obvious to me what the value is of
@@ -58,21 +38,15 @@
v2 = ROTL(v2, 32);
\
} while (0)
-/*
-Computes a SipHash value
-*in: pointer to input data (read-only)
-inlen: input data length in bytes (any size_t value)
-*k: pointer to the k
@@ -58,21 +38,15 @@
v2 = ROTL(v2, 32);
\
} while (0)
-/*
-Computes a SipHash value
-*in: pointer to input data (read-only)
-inlen: input data length in bytes (any size_t value)
-*k: pointer to the k
@@ -1,25 +1,19 @@
-/*
- SipHash reference C implementation
-
- Copyright (c) 2012-2022 Jean-Philippe Aumasson
-
- Copyright (c) 2012-2014 Daniel J. Bernstein
-
- To the extent possible under law, the author(s) have dedicated all copyright
- and related and neighborin
kbeyls wrote:
> I'll also mention that I left the original variable naming but did re-format
> the file, whitespace being more friendly to diffs, and this being nice and
> tidily contained. If you or others have strong opinions, I'm happy to
> recapitalize the names.
I don't have a strong opi
kbeyls wrote:
> So, regarding big-endian things. Original siphash is always "little-endian"
> regardless of the host platform. On big endian hosts it essentially does byte
> swap in the end. We do not have it here, so we will end with different hashes
> on platforms with different endianness.
kbeyls wrote:
I just checked if there indeed are big-endian bots which should pick up if a
different hash gets produced on a big-endian system. I guess this bot (the only
bot?) would pick it up: https://lab.llvm.org/buildbot/#/builders/231
I now also realize that there are no tests with this c
https://github.com/kbeyls approved this pull request.
https://github.com/llvm/llvm-project/pull/94394
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
kbeyls wrote:
> Yes, this doesn't have tests by itself because there's no exposed interface.
> It's certainly trivial to add one (which would allow using the reference test
> vectors).
>
> I don't have strong arguments either way, but I figured the conservative
> option is to force hypothetic
kbeyls wrote:
> [37c84b9](https://github.com/llvm/llvm-project/pull/94394/commits/37c84b9dce70f40db8a7c27b7de8232c4d10f78f)
> shows what I had in mind, let me know what you all think. I added:
>
> ```
> void getSipHash_2_4_64(ArrayRef In, const uint8_t (&K)[16],
>uint8_t
https://github.com/kbeyls approved this pull request.
https://github.com/llvm/llvm-project/pull/94394
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -36,38 +32,43 @@ using namespace llvm;
#define AARCH64_SLS_HARDENING_NAME "AArch64 sls hardening pass"
+static const char SLSBLRNamePrefix[] = "__llvm_slsblr_thunk_";
+
namespace {
-class AArch64SLSHardening : public MachineFunctionPass {
-public:
- const TargetInstrIn
@@ -46,13 +40,5 @@ body: |
...
-name:__llvm_slsblr_thunk_x8
-tracksRegLiveness: true
-body: |
- bb.0.entry:
-liveins: $x8
-BR $x8
kbeyls wrote:
I think it is important to check that the body of the thunk in
@@ -36,38 +32,43 @@ using namespace llvm;
#define AARCH64_SLS_HARDENING_NAME "AArch64 sls hardening pass"
+static const char SLSBLRNamePrefix[] = "__llvm_slsblr_thunk_";
+
namespace {
-class AArch64SLSHardening : public MachineFunctionPass {
-public:
- const TargetInstrIn
https://github.com/kbeyls commented:
Thank you, this mostly looks good to me.
I've only added very minor comments; feel free to disagree with them.
https://github.com/llvm/llvm-project/pull/97605
___
llvm-branch-commits mailing list
llvm-branch-commits
https://github.com/kbeyls edited https://github.com/llvm/llvm-project/pull/97605
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -68,6 +156,57 @@ struct SLSHardeningInserter :
ThunkInserter {
} // end anonymous namespace
+const ThunkKind ThunkKind::BR = {ThunkBR, "", false, false, AArch64::BR};
+const ThunkKind ThunkKind::BRAA = {ThunkBRAA, "aa_", true, true,
AArch64::BRAA};
+const ThunkKind Thunk
@@ -0,0 +1,210 @@
+# RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu \
+# RUN: -start-before aarch64-sls-hardening -o - %s \
+# RUN: -asm-verbose=0 \
+# RUN: | FileCheck %s \
+# RUN: --implicit-check-not=__llvm_slsblr_thunk_aa_x5_x8 \
+# RUN: --impli
@@ -221,13 +339,19 @@ void SLSHardeningInserter::populateThunk(MachineFunction
&MF) {
// __llvm_slsblr_thunk_xN:
// BR xN
// barrierInsts
kbeyls wrote:
I think it would be useful to update this comment to make it clear what the
different kin
@@ -221,13 +339,19 @@ void SLSHardeningInserter::populateThunk(MachineFunction
&MF) {
// __llvm_slsblr_thunk_xN:
// BR xN
// barrierInsts
kbeyls wrote:
As part of reviewing this, I was wondering why the actual thunk content is
```
// __llv
@@ -221,13 +339,19 @@ void SLSHardeningInserter::populateThunk(MachineFunction
&MF) {
// __llvm_slsblr_thunk_xN:
// BR xN
// barrierInsts
kbeyls wrote:
Maybe something like
```
// __llvm_slsblr_thunk_{aa|ab|aaz|abz|}_xN_{xM}:
// BR
@@ -68,6 +156,57 @@ struct SLSHardeningInserter :
ThunkInserter {
} // end anonymous namespace
+const ThunkKind ThunkKind::BR = {ThunkBR, "", false, false, AArch64::BR};
+const ThunkKind ThunkKind::BRAA = {ThunkBRAA, "aa_", true, true,
AArch64::BRAA};
+const ThunkKind Thunk
@@ -274,40 +398,31 @@ void SLSHardeningInserter::convertBLRToBL(
MachineInstr &BLR = *MBBI;
assert(isBLR(BLR));
- unsigned BLOpcode;
- Register Reg;
- bool RegIsKilled;
- switch (BLR.getOpcode()) {
- case AArch64::BLR:
- case AArch64::BLRNoIP:
-BLOpcode = AArch64
@@ -139,64 +262,59 @@ bool
SLSHardeningInserter::hardenReturnsAndBRs(MachineModuleInfo &MMI,
return Modified;
}
-static const unsigned NumPermittedRegs = 29;
-static const struct ThunkNameAndReg {
- const char* Name;
- Register Reg;
-} SLSBLRThunks[NumPermittedRegs] = {
-
@@ -68,6 +156,57 @@ struct SLSHardeningInserter :
ThunkInserter {
} // end anonymous namespace
+const ThunkKind ThunkKind::BR = {ThunkBR, "", false, false, AArch64::BR};
+const ThunkKind ThunkKind::BRAA = {ThunkBRAA, "aa_", true, true,
AArch64::BRAA};
+const ThunkKind Thunk
Author: Kristof Beyls
Date: 2022-01-26T09:13:22+01:00
New Revision: c816be2026af3641f9b648482c48dd1f18a73dd1
URL:
https://github.com/llvm/llvm-project/commit/c816be2026af3641f9b648482c48dd1f18a73dd1
DIFF:
https://github.com/llvm/llvm-project/commit/c816be2026af3641f9b648482c48dd1f18a73dd1.diff
Author: Kristof Beyls
Date: 2020-12-19T11:42:39Z
New Revision: 195f44278c4361a4a32377a98a1e3a15203d3647
URL:
https://github.com/llvm/llvm-project/commit/195f44278c4361a4a32377a98a1e3a15203d3647
DIFF:
https://github.com/llvm/llvm-project/commit/195f44278c4361a4a32377a98a1e3a15203d3647.diff
LOG:
Author: Kristof Beyls
Date: 2020-12-19T12:32:47Z
New Revision: 320fd3314e378ae6242a2dde97250a8a94d68e27
URL:
https://github.com/llvm/llvm-project/commit/320fd3314e378ae6242a2dde97250a8a94d68e27
DIFF:
https://github.com/llvm/llvm-project/commit/320fd3314e378ae6242a2dde97250a8a94d68e27.diff
LOG:
Author: Kristof Beyls
Date: 2020-12-19T12:33:42Z
New Revision: a4c1f5160e6d1de9a9959ecbf329c2acf4f3ed31
URL:
https://github.com/llvm/llvm-project/commit/a4c1f5160e6d1de9a9959ecbf329c2acf4f3ed31
DIFF:
https://github.com/llvm/llvm-project/commit/a4c1f5160e6d1de9a9959ecbf329c2acf4f3ed31.diff
LOG:
Author: Kristof Beyls
Date: 2020-12-19T12:39:59Z
New Revision: df8ed3928377edc6e9241a56680b694ffa9f4d6d
URL:
https://github.com/llvm/llvm-project/commit/df8ed3928377edc6e9241a56680b694ffa9f4d6d
DIFF:
https://github.com/llvm/llvm-project/commit/df8ed3928377edc6e9241a56680b694ffa9f4d6d.diff
LOG:
Author: Kristof Beyls
Date: 2020-12-19T12:49:26Z
New Revision: 9c895aea118a2f50ca8413372363c3ff6ecc21bf
URL:
https://github.com/llvm/llvm-project/commit/9c895aea118a2f50ca8413372363c3ff6ecc21bf
DIFF:
https://github.com/llvm/llvm-project/commit/9c895aea118a2f50ca8413372363c3ff6ecc21bf.diff
LOG:
Author: Kristof Beyls
Date: 2020-12-01T09:16:12+01:00
New Revision: 424fdbc3dedadf882fda107aa5638b39e7036c4d
URL:
https://github.com/llvm/llvm-project/commit/424fdbc3dedadf882fda107aa5638b39e7036c4d
DIFF:
https://github.com/llvm/llvm-project/commit/424fdbc3dedadf882fda107aa5638b39e7036c4d.diff
Author: Kristof Beyls
Date: 2020-08-31T14:10:54+02:00
New Revision: d98e4c0d9a3585e2302c717beea9b9d03df9663a
URL:
https://github.com/llvm/llvm-project/commit/d98e4c0d9a3585e2302c717beea9b9d03df9663a
DIFF:
https://github.com/llvm/llvm-project/commit/d98e4c0d9a3585e2302c717beea9b9d03df9663a.diff
35 matches
Mail list logo