[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

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

2022-02-06 Thread Dan Aloni via Phabricator via cfe-commits
Dan added a comment. 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. It was a fully built Fedora Linux 5.3 kernel. I remember though that

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

2022-02-04 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added a comment. In D59254#3298184 , @void wrote: > In D59254#1792134 , @connorkuehl > wrote: > >> In D59254#1792068 , @xbolva00 wrote: >> >>> Re-ping >> >>

[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

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

2019-12-19 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added a comment. In D59254#1792068 , @xbolva00 wrote: > Re-ping Still under development here: https://github.com/connorkuehl/llvm-project/tree/randstruct Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2019-12-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Re-ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59254/new/ https://reviews.llvm.org/D59254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2019-07-24 Thread Aaron Ballman via cfe-commits
On Tue, Jul 23, 2019 at 9:17 PM Connor Kuehl via Phabricator wrote: > > connorkuehl added a comment. > > In D59254#1429401 , @jfb wrote: > > > I find it easier to understand the code by looking at the tests. When you > > add tests, please make sure you

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

2019-07-23 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added a comment. In D59254#1429401 , @jfb wrote: > I find it easier to understand the code by looking at the tests. When you add > tests, please make sure you test for: > > - Bit-fields > - Zero-width bit-field Hi JF, Could you elaborate

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

2019-07-02 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59254#1566895 , @shawnl wrote: > My point is that most languages these days that intend to be compiled to > machine code want compatibility with the C ABI, and randstruct will be part > of that (and can be made compatible

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

2019-07-02 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added a comment. My point is that most languages these days that intend to be compiled to machine code want compatibility with the C ABI, and randstruct will be part of that (and can be made compatible between languages by sharing the seed). LLVM knows what a struct is. Repository:

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

2019-07-02 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59254#1566711 , @shawnl wrote: > I think the essential functionality of this patch should be in LLVM and not > Clang, so that all front-ends can benefit. Too many generally useful things > are in Clang when they should be in

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

2019-07-02 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added a comment. I think the essential functionality of this patch should be in LLVM and not Clang, so that all front-ends can benefit. Too many generally useful things are in Clang when they should be in LLVM (e.g. C ABI for ARM and x86; ranged switch statements). I opened an upstream

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

2019-07-01 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added a comment. In D59254#1565961 , @jfb wrote: > Do you intend on moving this forward? It seems like a Good Thing overall, and > I'd love to help review some more. Yes. I'm sorry it's been in limbo so long. I haven't touched base with the

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

2019-07-01 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. Do you intend on moving this forward? It seems like a Good Thing overall, and I'd love to help review some more. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59254/new/ https://reviews.llvm.org/D59254

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

2019-03-14 Thread JF Bastien via Phabricator via cfe-commits
jfb requested changes to this revision. jfb added a comment. This revision now requires changes to proceed. I find it easier to understand the code by looking at the tests. When you add tests, please make sure you test for: - Alignment attribute - Packed attribute - No unique address attribute

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

2019-03-13 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich added inline comments. Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54 + std::seed_seq Seq; + std::default_random_engine rng; +}; timpugh wrote: > connorkuehl wrote: > > pcc wrote: > > > I don't think we can use

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

2019-03-13 Thread Tim Pugh via Phabricator via cfe-commits
timpugh added inline comments. Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54 + std::seed_seq Seq; + std::default_random_engine rng; +}; connorkuehl wrote: > pcc wrote: > > I don't think we can use `default_random_engine` for this because the

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

2019-03-13 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added inline comments. Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54 + std::seed_seq Seq; + std::default_random_engine rng; +}; pcc wrote: > I don't think we can use `default_random_engine` for this because the > behaviour would

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

2019-03-13 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added a comment. In D59254#1426809 , @pcc wrote: > This needs a test under `test/CodeGen` at least. Will do, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59254/new/

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

2019-03-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. This needs a test under `test/CodeGen` at least. Comment at: clang/include/clang/AST/RecordFieldReorganizer.h:54 + std::seed_seq Seq; + std::default_random_engine rng; +}; I don't think we can use `default_random_engine` for this because

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

2019-03-12 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl added inline comments. Comment at: clang/lib/AST/DeclBase.cpp:1262 + // The last one in the chain should have a null next! + PrevDecl->NextInContextAndBits.setPointer(nullptr); + Apologies that this is included. I've left a comment on

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

2019-03-12 Thread Connor Kuehl via Phabricator via cfe-commits
connorkuehl created this revision. Herald added subscribers: cfe-commits, jdoerfert, mgorny. Herald added a project: clang. This patch set introduces structure field layout randomization into the Clang compiler. The Randstruct feature is a compile-time hardening technique that randomizes the