[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Ping? :-) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55616/new/ https://reviews.llvm.org/D55616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: test/CodeGen/builtin-constant-p.c:2 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -O2 | FileCheck --check-prefix=O2 %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-

[PATCH] D55616: Emit ASM input in a constant context

2018-12-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 178582. void added a comment. Reduce duplication by using multiple check prefixes. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55616/new/ https://reviews.llvm.org/D55616 Files: lib/Basic/TargetInfo.cpp lib/CodeGen/CGStmt.

[PATCH] D55616: Emit ASM input in a constant context

2018-12-18 Thread Bill Wendling via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349561: Emit ASM input in a constant context (authored by void, committed by ). Changed prior to commit: https://reviews.llvm.org/D55616?vs=178793&id=178794#toc Repository: rC Clang CHANGES SINCE LA

[PATCH] D55616: Emit ASM input in a constant context

2018-12-18 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: test/CodeGen/builtin-constant-p.c:2 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -O2 | FileCheck --check-prefix=O2 %s +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-

[PATCH] D55616: Emit ASM input in a constant context

2018-12-18 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 178793. void added a comment. Fix how prefixes are used in the testcase. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55616/new/ https://reviews.llvm.org/D55616 Files: lib/Basic/TargetInfo.cpp lib/CodeGen/CGStmt.cpp lib/

[PATCH] D55616: Emit ASM input in a constant context

2018-12-18 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D55616#1335587 , @vitalybuka wrote: > Looks like it's broken by this patch > > clang: > /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm/tools/clang/lib/AST/ExprConstant.cpp:11055: > llvm::APSInt clang::Expr::EvaluateKnownCo

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 418305. void added a comment. Herald added a subscriber: MaskRay. Fix how the command line flags are handled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: cl

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 418307. void marked 5 inline comments as done. void added a comment. Add "err_" prefix to error message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/i

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-25 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/include/clang/AST/Decl.h:2842 mutable unsigned CachedFieldIndex : 30; + mutable unsigned OriginalFieldIndex : 30; aaron.ballman wrote: > It's unfortunate that every field node in the AST is now going to be 4 byt

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-25 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 418356. void marked 2 inline comments as done. void added a comment. Move casting check into the SemaCast where it belongs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D12155

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-27 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 418480. void added a comment. - Make sure the command line seed is properly passed on to each front-end level. - Some general cleanups. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llv

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-30 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 419282. void added a comment. Moved the randomization to a better spot. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/include/clang/AST/Decl.h clang/i

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-30 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly ping for review. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3419184 , @aaron.ballman wrote: > Generally I think things are looking pretty good, but there's still an open > question and Precommit CI is still failing on Windows: > > Failed Tests (7): > Clang-Unit :: > AST/./

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 420294. void marked an inline comment as done. void added a comment. Simplify the attributes by using an accessor instead of a separate "no_ranomize_layout" attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3419184 , @aaron.ballman wrote: > Generally I think things are looking pretty good, but there's still an open > question and Precommit CI is still failing on Windows: > > Failed Tests (7): > Clang-Unit :: > AST/./

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3427604 , @xbolva00 wrote: > Release note is missing Sorry about that. I'll add one with the next update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https:/

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 420307. void added a comment. - Add an entry in the Release Notes. - Change the command line flags to better match the attribute naming. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.ll

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 420312. void added a comment. First pass at fixing the Windows unit test errors. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/docs/ReleaseNotes.rst c

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 420332. void added a comment. Second attempt to fix Windows errors. Expecting one more iteration. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/docs/Rel

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-05 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:8550-8556 + case ParsedAttr::AT_RandomizeLayout: +handleSimpleAttribute(S, D, AL); +break; + case ParsedAttr::AT_NoRandomizeLayout: +// Drop the "randomize_layout" attribute if it's on the decl.

[PATCH] D120857: WIP [randstruct] Add randomize structure layout support

2022-03-09 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 414030. void added a comment. Place the randomization call where it'll actually work. :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120857/new/ https://reviews.llvm.org/D120857 Files: clang/include/clang/AS

[PATCH] D120857: WIP [randstruct] Add randomize structure layout support

2022-03-09 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. @connorkuehl This is almost ready to unleash upon the whole community. I wanted to give you the first chance to review it. Please let me know what you think! Hopefully I didn't mess your code up too badly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D120857: WIP [randstruct] Add randomize structure layout support

2022-03-10 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 414500. void added a comment. Improve bad cast warning message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120857/new/ https://reviews.llvm.org/D120857 Files: clang/include/clang/AST/Decl.h clang/include/c

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-13 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. Herald added subscribers: dang, jdoerfert, mgorny. Herald added a reviewer: aaron.ballman. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The Randstruct feature is a compile-tim

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-13 Thread Bill Wendling via Phabricator via cfe-commits
void added reviewers: jfb, connorkuehl, rsmith, timpugh. void added subscribers: connorkuehl, Dan, xbolva00, shawnl, dexonsmith, daloni, hintonda, riccibruno, vlad.tsyrklevich, ebevhan, kees, pcc, nickdesaulniers. void added a comment. This is a soft reworking of @connorkuehl's work in https://r

[PATCH] D93182: [clang-tidy] Add linux kernel log functions checker

2022-03-16 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D93182#2451509 , @lebedev.ri wrote: > Out of curiocity, are all checkpatch diagnostics (and something else)? > are planned to be ported into being clang-tidy checks? > How many will checks will that be? > I'll be slightly worried i

[PATCH] D93182: [clang-tidy] Add linux kernel log functions checker

2022-03-16 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang-tools-extra/clang-tidy/linuxkernel/LogFunctionsCheck.cpp:51 +void LogFunctionsCheck::check(const MatchFinder::MatchResult &Result) { + if (FixerKind == LFFK_H) { +const auto *Call = Result.Nodes.getNodeAs("call"); ---

[PATCH] D120857: WIP [randstruct] Add randomize structure layout support

2022-03-17 Thread Bill Wendling via Phabricator via cfe-commits
void abandoned this revision. void added a comment. In D120857#3389022 , @aaron.ballman wrote: > This seems like a duplicate of https://reviews.llvm.org/D121556 -- should > this review be abandoned? Yes. Thanks :-) Repository: rG LLVM Github Monore

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-17 Thread Bill Wendling via Phabricator via cfe-commits
void marked 7 inline comments as done. void added inline comments. Comment at: clang/include/clang/AST/Decl.h:4067 + + void setIsRandomized(bool V) const { RecordDeclBits.IsRandomized = V; } + aaron.ballman wrote: > A setter that is marked `const` does not spark

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-17 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 416354. void marked 3 inline comments as done. void added a comment. General cleanup of code. Removing unneeded headers and comments. Removing a "const" from a setter. Not defining this for MS's declspecs or making the attributes keywords. Repository: rG LL

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-03-20 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 416808. void added a comment. Move SEED into LangOpts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/include/clang/AST/Decl.h clang/include/clang/AST/

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 420972. void marked 3 inline comments as done. void added a comment. Don't re-randomize a structure. Also some minor style changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.or

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-06 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:27 #include "clang/AST/NonTrivialTypeVisitor.h" +#include "clang/AST/Randstruct.h" #include "clang/AST/StmtCXX.h" aaron.ballman wrote: > Is this include necessary? Yes. There's a call to `rands

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 421358. void added a comment. Make the randomize_layout and no_randomize_layout attributes mutually exclutsive. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files:

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 421416. void added a comment. Fix bad formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Decl.h

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 421616. void added a comment. Fix simple test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Decl.h cl

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3438722 , @aaron.ballman wrote: > Precommit CI is failing on one test: > > Failed Tests (1): > > Clang :: Misc/pragma-attribute-supported-attributes-list.test > > but with that test fixed, this LGTM! (Feel free to land

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling 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 rG3f0587d0c668: [randstruct] Add randomize structure layout support (authored by connorkuehl, committed by void). Repository: rG LLVM Github Monorep

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3440089 , @dyung wrote: > Hi, the test you added is failing on the PS4 Windows bot > https://lab.llvm.org/buildbot/#/builders/216/builds/2647. > > Can you take a look? Crud! I thought I got all of the Windows issues. I'l

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3440290 , @thakis wrote: > Looks like this breaks tests on mac: http://45.33.8.238/macm1/32938/step_7.txt > > Please take a look, and revert for now if it takes a while to fix. Ugh! This sucks. I just removed the test unt

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3440308 , @thakis wrote: > It's more important to remove it from the cmakelists file than to delete the > source file ;) > > Please revert the whole thing instead of just removing the test coverage > though. You can rela

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3440383 , @MaskRay wrote: > Windows test is still failing after the std::shuffle => llvm::shuffle change, > guess time for revert. > > ../../clang/unittests/AST/RandstructTest.cpp(165): error: Expected equality > of th

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4244 + if (const Arg *A = Args.getLastArg(OPT_frandomize_layout_seed_file_EQ)) { +std::ifstream SeedFile(A->getValue(0)); MaskRay wrote: > Why is -frandomize-layout-seed-file

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 421692. void added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/docs/ReleaseNotes.rst clang/include/clang/AST/Decl.h clang/incl

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-09 Thread Bill Wendling via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG7aa8c38a9e19: [randstruct] Add randomize structure layout support (authored by connorkuehl, committed by void). Repositor

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-11 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Strutures of function pointers are a good sur

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-11 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:17982 + +// Maybe randomize the field order. We automatically randomize a structure +// of function pointers, unless it has the "no_randomize_layout" attribute. xbolva00 wrote: > Is this

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-11 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/unittests/AST/RandstructTest.cpp:154-158 +#ifdef _WIN32 + const field_names Expected = {"lettuce", "bacon", "mayonnaise", "tomato"}; +#else + const field_names Expected = {"mayonnaise", "bacon", "tomato", "lettuce"}; +#endif ---

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-11 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3444006 , @MaskRay wrote: > The relanded form still lacks the -f option testing I requested. The unit test tests the `-frandomize-layout-seed=` option already. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-11 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3444026 , @MaskRay wrote: > In D121556#3444015 , @void wrote: > >> In D121556#3444006 , @MaskRay >> wrote: >> >>> The relanded form still

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-11 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3444021 , @MaskRay wrote: > 7aa8c38a9e190aea14116028c38b1d9f54cbb0b3 > still > uses `std::shuffle`, not incorporating the `llvm::shuffle` fixes I did.

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-11 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3444221 , @MaskRay wrote: > In D121556#3444131 , @void wrote: > >> In D121556#3444021 , @MaskRay >> wrote: >> >>> 7aa8c38a9e190aea1411602

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#334 , @MaskRay wrote: > In D121556#3444260 , @void wrote: > >> In D121556#3444221 , @MaskRay >> wrote: >> >>> In D121556#3444131

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3445425 , @xbolva00 wrote: >>> While I agree with the security aspects of this in principle, it is not a >>> conforming behavior in C and it runs significant risk of breaking existing >>> code such that it introduces new

[PATCH] D121556: [randstruct] Add randomize structure layout support

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D121556#3445124 , @aaron.ballman wrote: > In D121556#3444837 , @void wrote: > >> In D121556#334 , @MaskRay >> wrote: >> >>> In D121556#34442

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3446285 , @lebedev.ri wrote: > Does this not lead to non-deterministic/non-reproducible builds? It's deterministic based on the randomization seed. > I do not understand why this feature must be inflicted onto everyone.

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This test makes sure that the "-frandomize-la

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3446416 , @aaron.ballman wrote: > However, I had forgotten that the base feature *requires* the user to pass a > randomization seed via a flag in addition to requiring the attribute (thank > you for bringing that back t

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-12 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3446519 , @xbolva00 wrote: >>> If we had error diagnostics when the user is about to shoot their foot off, >>> I'd be more comfortable with the automatic hardening behavior. > > This feature IMHO should be enabled with si

[PATCH] D123544: [randstruct] Automatically randomize a structure of function pointers

2022-04-13 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123544#3448046 , @aaron.ballman wrote: > In D123544#3446814 , @void wrote: > >> Let me work on that. But otherwise are you okay with this patch? > > Yes, I'm okay with the direction of t

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-13 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/unittests/AST/RandstructTest.cpp:56 + llvm::SmallString<256> SeedFilename; + EXPECT_FALSE(llvm::sys::fs::createTemporaryFile("seed", "rng", SeedFileFD, + SeedFilename)); -

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A randomized structure needs to use a designa

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 422934. void marked an inline comment as done. void added a comment. Accept initialzers of the forms: struct foo f = {}; struct foo g = {0}; Move tests to lit tester. Improve error message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 422936. void marked an inline comment as done. void added a comment. Add some smoke tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123763/new/ https://reviews.llvm.org/D123763 Files: clang/include/clang/B

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Updated with those changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123763/new/ https://reviews.llvm.org/D123763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void marked an inline comment as done. void added inline comments. Comment at: clang/unittests/AST/RandstructTest.cpp:72 + + return std::tuple(AST.release(), ASTFileSeed.release()); +}; MaskRay wrote: > aaron.ballman wrote: > > void wrote: > > > aaron.ballman w

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 422965. void added a comment. Use "unique_ptr" when possible. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123636/new/ https://reviews.llvm.org/D123636 Files: clang/unittests/AST/RandstructTest.cpp Index: cla

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/unittests/AST/RandstructTest.cpp:72 + + return std::tuple(AST.release(), ASTFileSeed.release()); +}; MaskRay wrote: > void wrote: > > MaskRay wrote: > > > aaron.ballman wrote: > > > > void wrote: > > > > > aaron.bal

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-14 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 422976. void added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123636/new/ https://reviews.llvm.org/D123636 Files: clang/unittests/AST/RandstructTest.cpp Index: clang/unittests/AST/Randstr

[PATCH] D123636: [randstruct] Add test for "-frandomize-layout-seed-file" flag

2022-04-14 Thread Bill Wendling 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 rG31ea4798ad09: [randstruct] Add test for "-frandomize-layout-seed-file" flag (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-15 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 423139. void added a comment. Add tests for empty and single element structs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123763/new/ https://reviews.llvm.org/D123763 Files: clang/include/clang/Basic/Diagnost

[PATCH] D123763: [randstruct] Enforce using a designated init for a randomized struct

2022-04-15 Thread Bill Wendling 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 rGaed923b1246a: [randstruct] Enforce using a designated init for a randomized struct (authored by void). Changed prior to commit: https://reviews.ll

[PATCH] D123958: [randstruct] Randomize all elements of a record

2022-04-18 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A record may have more than just FieldDecls i

[PATCH] D123958: [randstruct] Randomize all elements of a record

2022-04-19 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123958#3459205 , @aaron.ballman wrote: > I think you'll need a more targeted approach than assuming the only kinds of > declarations in a struct are field-like in C. > > It seems that the issue you've got is with anonymous obje

[PATCH] D123958: [randstruct] Randomize all elements of a record

2022-04-20 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D123958#3461714 , @aaron.ballman wrote: > In D123958#3461020 , @void wrote: > >> In D123958#3459205 , >> @aaron.ballman wrote: >> >>> I think yo

[PATCH] D123958: [randstruct] Randomize all elements of a record

2022-04-20 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 424034. void added a comment. Correctly handle all types of Decls that can be found in a RecordDecl. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123958/new/ https://reviews.llvm.org/D123958 Files: clang/inclu

[PATCH] D124199: [randstruct] Check final randomized layout ordering

2022-04-21 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: aaron.ballman, MaskRay. Herald added a subscriber: StephenFan. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This uses "llvm::shuffle" to stop differences

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-02 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 405531. void added a comment. Make sure we're zeroing the registers in the return block, not just some random block. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 File

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-02 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3289073 , @nickdesaulniers wrote: > Diff 405119 still kernel panics for me. This is building the linux-next tree. > > $ qemu-system-x86_64 --version > QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-1) Works now. PTAL

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3294696 , @nathanchance wrote: > This diff allows me to boot on bare metal as of v5.17-rc2: > > diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile > index 6aef9ee28a39..8ee176dac669 100644 > --- a/arch

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3295147 , @nathanchance wrote: > > I tested this patch but it did not change the hang. Okay. We need to determine which function is failing. Could you do something like this: #define zcur __attribute__((zero_call

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3295477 , @nathanchance wrote: > It looks like `_paravirt_ident_64()` is the problematic function. This diff > on top of v5.17-rc2 allows me to boot: > > diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravi

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-03 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3295578 , @nickdesaulniers wrote: > In D110869#3295559 , @void wrote: > >> Weird. We generate similar code to GCC: >> >> Clang: >> _paravirt_ident_64: # @_

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-04 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3295912 , @craig.topper wrote: > In D110869#3295906 , @void wrote: > >> In D110869#3295578 , >> @nickdesaulniers wrote: >> >>> In D11086

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-04 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 405897. void added a comment. Only need to zero out 32-bit registers with xor. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files: clang/include/clang/Basic/Attr.td

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2022-02-04 Thread Bill Wendling via Phabricator via cfe-commits
void added subscribers: kees, void. void added a comment. Herald added a subscriber: dang. In D59254#1792134 , @connorkuehl wrote: > In D59254#1792068 , @xbolva00 wrote: > >> Re-ping > > Still under development here

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2022-02-06 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D59254#3299150 , @Dan wrote: > Hi @void, @connorkuehl > > Reminding that I also participated in working on this, and back then in 2019 > I did manage to compile and boot a working Linux kernel with this feature > enabled in Clang

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 406596. void marked an inline comment as done. void added a comment. Better define what we mean by "call-used". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files:

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 406646. void marked 4 inline comments as done. void added a comment. General updates NFC.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files: clang/include/clang/B

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-07 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3296047 , @craig.topper wrote: > In D110869#3296031 , @void wrote: > >> In D110869#3295912 , @craig.topper >> wrote: >> >>> In D110869#3

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-08 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:595 +continue; + XorOp = X86::PXORrr; +} else if (X86::VR256RegClass.contains(Reg)) { nickdesaulniers wrote: > void wrote: > > nickdesaulniers wrote: > > > Is there

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 406924. void added a comment. Move register clearning to after the "pop"s. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files: clang/include/clang/Basic/Attr.td c

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-08 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 406948. void added a comment. Remove obsolete change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110869/new/ https://reviews.llvm.org/D110869 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Ba

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-08 Thread Bill Wendling 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 rGdeaf22bc0e30: [X86] Implement -fzero-call-used-regs option (authored by void). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-09 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3307106 , @nikic wrote: > It looks like this breaks expensive checks builds due to machine verifier > errors: https://lab.llvm.org/buildbot/#/builders/16/builds/24103 Sorry about that. Looking into it now. Repository:

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-10 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3312360 , @RKSimon wrote: > @void This buildbot appears to be still broken due to this change: > https://lab.llvm.org/buildbot/#/builders/110/builds/10271 Strange...This is the first time seeing something like this. I'll

[PATCH] D110869: [X86] Implement -fzero-call-used-regs option

2022-02-11 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. In D110869#3313443 , @void wrote: > In D110869#3312360 , @RKSimon wrote: > >> @void This buildbot appears to be still broken due to this change: >> https://lab.llvm.org/buildbot/#/builders/1

[PATCH] D119592: Insert a blurb about the -fzero-call-used-regs feature

2022-02-11 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added reviewers: nickdesaulniers, kees. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D119592 Files: clang/docs/ReleaseNotes.rst In

<    1   2   3   4   5   6   >