Page MenuHomePhabricator

kees (Kees Cook)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 6 2019, 5:35 AM (216 w, 3 d)

Recent Activity

Feb 23 2023

kees added a comment to D144136: Add a "remark" to report on array accesses.

This gets me all 6 reports. The details about the array and the index don't really matter for the basic metrics:

Feb 23 2023, 2:56 PM · Restricted Project, Restricted Project

Feb 18 2023

kees added a comment to D144136: Add a "remark" to report on array accesses.

Here's a test-case. I'd expect 6 remarks from building this:

Feb 18 2023, 11:55 AM · Restricted Project, Restricted Project
kees added a comment to D144136: Add a "remark" to report on array accesses.

This appears to be working for me. For before/after changes, the other half is still needed, i.e. a "accessing array of unknown size" and eventually splitting the dynamic sizing check off of that one (once -fsanitize=bounds checks __builtin_dynamic_object_size).

Feb 18 2023, 11:21 AM · Restricted Project, Restricted Project

Feb 15 2023

kees added a comment to D144136: Add a "remark" to report on array accesses.

This information will be useful for evaluating the coverage of the bounds checker for a given program, which in turn can help guide both improvements to the bounds checker (e.g. adding knowledge from __builtin_dynamic_object_size()) and improvements to the built code base (e.g. refactoring data structures to take advantage of known compile-time or run-time bounds that will be covered by the bounds checker). It answers the question, "What percentage of array accesses are being bounds checked?" (With the implied goal of reaching 100% going forward.)

Feb 15 2023, 10:24 PM · Restricted Project, Restricted Project

Nov 17 2022

kees accepted D138244: Revert "Reapply: Add an error message to the default SIGPIPE handler".

Looks good. Likely future work here would be to examine why the EX_IOERR exit is being exposed instead of just leaving SIGPIPE set to SIG_DFLT. But that's a separate issue entirely. :)

Nov 17 2022, 4:24 PM · Restricted Project, Restricted Project

Oct 26 2022

kees accepted D134902: [clang] Implement -fstrict-flex-arrays=3.

The self-tests all look correct to me, so I expect it is working how I'd expect. I haven't had a chance to do kernel builds with this yet, but I'm hoping to make time soon. I'd say if others are happy, let's land it, and if anything unexpected happens we can fix those issues if they appear. :)

Oct 26 2022, 4:58 PM · Restricted Project, Restricted Project

Oct 20 2022

kees accepted D135727: [clang] Correct sanitizer behavior in union FAMs.
Oct 20 2022, 4:02 PM · Restricted Project, Restricted Project
kees added a comment to D135727: [clang] Correct sanitizer behavior in union FAMs.

This looks great to me. Thanks!

Oct 20 2022, 4:01 PM · Restricted Project, Restricted Project

Oct 17 2022

kees added inline comments to D135920: [clang][Sema] Use correct array size for diagnostic.
Oct 17 2022, 12:35 PM · Restricted Project, Restricted Project

Oct 13 2022

kees added inline comments to D135920: [clang][Sema] Use correct array size for diagnostic.
Oct 13 2022, 7:54 PM · Restricted Project, Restricted Project
kees added a comment to D135727: [clang] Correct sanitizer behavior in union FAMs.

I think we opened the can or worms. :-)

Oct 13 2022, 7:51 PM · Restricted Project, Restricted Project

Oct 12 2022

kees added a comment to D135727: [clang] Correct sanitizer behavior in union FAMs.

@kees @serge-sans-paille: It appears to me that a terminating array of size > 2 *isn't* treated as a FAM in Clang, at least Clang warns about it. The first failure above (clang/test/Sema/array-bounds-ptr-arith.c) shows that. It turns out that the same failure occurs in that testcase when the array isn't the last in a structure, so I'll change it.

Oct 12 2022, 4:55 PM · Restricted Project, Restricted Project

Oct 11 2022

kees added a comment to D135727: [clang] Correct sanitizer behavior in union FAMs.

Change log typo? "but for all" should be "but not for all" ?

Oct 11 2022, 7:19 PM · Restricted Project, Restricted Project

Oct 10 2022

kees added a comment to D134902: [clang] Implement -fstrict-flex-arrays=3.

I second the opinion here. C99 says nothing about flexible array member for unions, that's already a "language extension". (and so not be considered as FAM by -fstrict-flex-arrays=3)

Oct 10 2022, 11:06 PM · Restricted Project, Restricted Project
kees added a comment to D134902: [clang] Implement -fstrict-flex-arrays=3.

@rsmith, @serge-sans-paille, and @kees, I need some advice. There's a test in clang/test/CodeGen/bounds-checking.c that's checking bounds stuff on unions. The behavior is...weird to me. It says that an array of 0 or 1 is a FAM, but one larger is not (see below).

Oct 10 2022, 10:52 PM · Restricted Project, Restricted Project

Oct 7 2022

kees added a comment to D135411: Add generic KCFI operand bundle lowering.

That being said, I did compile a 64-bit MIPS kernel using this pass, but I didn't try booting it. I would expect to run into quite a few issues initially.

Oct 7 2022, 8:37 PM · Restricted Project, Restricted Project, Restricted Project

Oct 6 2022

kees added a comment to D135411: Add generic KCFI operand bundle lowering.

What's the best way to test this in the kernel? I assume add ARCH_SUPPORTS_CFI_CLANG to an arch, and see what blows up? :) Have you tried this on any other arch yet?

Oct 6 2022, 4:04 PM · Restricted Project, Restricted Project, Restricted Project

Oct 5 2022

kees added inline comments to D134902: [clang] Implement -fstrict-flex-arrays=3.
Oct 5 2022, 11:05 PM · Restricted Project, Restricted Project
kees accepted D135107: [clang][NFC] Use enum for -fstrict-flex-arrays.

LGTM

Oct 5 2022, 8:16 PM · Restricted Project, Restricted Project

Oct 1 2022

kees committed rGaef03c9b3bed: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will… (authored by kees).
[clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will…
Oct 1 2022, 6:46 PM · Restricted Project, Restricted Project
kees closed D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.
Oct 1 2022, 6:45 PM · Restricted Project, Restricted Project

Sep 30 2022

kees added inline comments to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.
Sep 30 2022, 11:37 PM · Restricted Project, Restricted Project
kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

Update optional removal target release to Clang 18

Sep 30 2022, 11:29 PM · Restricted Project, Restricted Project
kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

use Group<clang_ignored_legacy_options_Group>

Sep 30 2022, 11:25 PM · Restricted Project, Restricted Project
kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

Keep git-clang-format happy

Sep 30 2022, 1:29 PM · Restricted Project, Restricted Project
kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

Adjust subject to be more accurate ("deprecate" vs "remove")

Sep 30 2022, 11:26 AM · Restricted Project, Restricted Project

Sep 29 2022

kees added inline comments to D134902: [clang] Implement -fstrict-flex-arrays=3.
Sep 29 2022, 11:28 PM · Restricted Project, Restricted Project
kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

rebase and tweak

Sep 29 2022, 11:14 PM · Restricted Project, Restricted Project
kees added a comment to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

[clang][auto-init] Remove -enable flag for "zero" mode

The subject should be updated to mention the exact option name, not a vague -enable and "zero" mode

Sep 29 2022, 9:30 PM · Restricted Project, Restricted Project
kees added a comment to D134902: [clang] Implement -fstrict-flex-arrays=3.

Excellent! Thank you for getting this prepared. Having this properly managed in the kernel means we don't have to do horrible ugly hacks to work around old 0-length arrays in UAPI (which have all been unioned with a proper flexible array now).

Sep 29 2022, 4:53 PM · Restricted Project, Restricted Project
kees added a comment to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

Thanks for all the careful consideration; I appreciate it! I'll land this tomorrow unless there are new specific objections. :)

Sep 29 2022, 12:30 PM · Restricted Project, Restricted Project
kees updated subscribers of D134831: [Clang][Sema] Add -Wcast-function-type-strict.
Sep 29 2022, 9:05 AM · Restricted Project, Restricted Project

Sep 3 2022

kees added a comment to D132073: [CodeGen] Zero out only modified registers.

LKML thread: https://lore.kernel.org/lkml/20220902213750.1124421-3-morbo@google.com/

Sep 3 2022, 12:37 AM · Restricted Project, Restricted Project

Aug 19 2022

kees accepted D119296: KCFI sanitizer.
Aug 19 2022, 3:12 PM · Restricted Project, Restricted Project, Restricted Project

Jul 13 2022

kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

Example of the bug I want to block:

Jul 13 2022, 4:53 PM · Restricted Project, Restricted Project
kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

I should clarify: I still need the =3 mode. Since sizeof([0]) == 0 and sizeof([]) == error, they are being treated differently already by the compiler causing bugs in Linux. The kernel must still have a way to reject the _use_ of a [0] array. We cannot reject _declaration_ of them due to userspace API.

Looks like the linux kernel is currently chock-full of zero-length-arrays which are actually intended/required to work as flexible array members. Do you have a pending patch to convert all of them to [] which should be?

Jul 13 2022, 4:34 PM · Restricted Project, Restricted Project

Jul 12 2022

kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

I should clarify: I still need the =3 mode. Since sizeof([0]) == 0 and sizeof([]) == error, they are being treated differently already by the compiler causing bugs in Linux. The kernel must still have a way to reject the _use_ of a [0] array. We cannot reject _declaration_ of them due to userspace API.

Jul 12 2022, 11:01 AM · Restricted Project, Restricted Project
kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

@kees are you ok with current state?

Jul 12 2022, 10:58 AM · Restricted Project, Restricted Project

Jul 11 2022

kees added inline comments to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.
Jul 11 2022, 11:49 AM · Restricted Project, Restricted Project

Jun 23 2022

kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

@kees does the new version looks good to you?

Jun 23 2022, 7:57 AM · Restricted Project, Restricted Project

Jun 15 2022

kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101836 does toward -fstrict-flex-arrays=<n> with

  • n=0-fno-strict-flex-arrays, current state (the default)
  • n=1 ⇒ only consider [ 0], [1} and [ ] as flex array member
  • n=2 ⇒ only consider [ 0] and [ ] as flex array member
  • n=3 ⇒ only consider [ ] as flex array member

I personnally like that approach, and I'd rather land that implementation.

Jun 15 2022, 10:03 AM · Restricted Project, Restricted Project

Jun 14 2022

kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

If the GCC developers split this into two distinct flags, should we land something we're just going to have to turn around and modify to match the new flags/semantics they've created?

Jun 14 2022, 10:21 AM · Restricted Project, Restricted Project
kees accepted D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

Are the presubmit build failures unrelated?

Jun 14 2022, 10:13 AM · Restricted Project, Restricted Project

Jun 8 2022

kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

@kees maybe we should think about what would be needed for toolchains that don't yet support -fstrict-flex-arrays in kernel sources? Does this become a toolchain portability issue for older released toolchains we still intend to support?

Jun 8 2022, 11:48 AM · Restricted Project, Restricted Project
kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

Do we want some builtin define so headers can check if we're in -fstrict-flex-arrays mode? It might be hard to mess with the definitions otherwise.

Jun 8 2022, 11:31 AM · Restricted Project, Restricted Project

Jun 7 2022

kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

I'm a little concerned about the premise of this, though. See https://github.com/llvm/llvm-project/issues/29694 for why we relaxed this check in the first place. I mean, the Linux kernel itself can maybe ensure it isn't doing anything silly, but most code has to deal with system headers, which are apparently broken. So this option is a trap for most code.

Jun 7 2022, 11:49 AM · Restricted Project, Restricted Project
kees added a comment to D126864: [clang] Introduce -fstrict-flex-arrays=<n> for stricter handling of flexible arrays.

Thanks for working on this!

Jun 7 2022, 11:41 AM · Restricted Project, Restricted Project

May 11 2022

kees added a comment to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

I think the most relevant post from @rsmith is: https://discourse.llvm.org/t/making-ftrivial-auto-var-init-zero-a-first-class-option/55143/40

He has a prototype: https://reviews.llvm.org/D79249
I assume he would like someone to pursue it further, it was a good faith attempt at not just demanding. I'd played with it and it needed a few fixes, but overall it was pretty complete. Does someone want to give it a go?

May 11 2022, 9:59 AM · Restricted Project, Restricted Project

May 10 2022

kees added a comment to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

This is marked "needs revision", but I think it just needs wider review?

May 10 2022, 3:14 PM · Restricted Project, Restricted Project
kees added a comment to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

This cannot be committed as is. In particular, @rsmith's "We do not want to create or encourage the creation of language dialects and non-portable code," concern on https://discourse.llvm.org/t/making-ftrivial-auto-var-init-zero-a-first-class-option/55143/2 (shared by someone else) will be affected, I'd like to see that they lift their concerns.

May 10 2022, 10:52 AM · Restricted Project, Restricted Project

May 9 2022

kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

add release notes

May 9 2022, 3:42 PM · Restricted Project, Restricted Project
kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

update with suggestions

May 9 2022, 12:47 PM · Restricted Project, Restricted Project
kees planned changes to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.
May 9 2022, 12:40 PM · Restricted Project, Restricted Project

May 8 2022

kees updated the diff for D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

Report flag as "unused"

May 8 2022, 2:12 AM · Restricted Project, Restricted Project

May 7 2022

kees planned changes to D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.

It would be somewhat helpful as a transition aid if -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang remained as a no-op producing a warning (a generic unused argument warning would be fine).

May 7 2022, 11:04 PM · Restricted Project, Restricted Project

May 6 2022

kees requested review of D125142: [clang][auto-init] Deprecate -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang.
May 6 2022, 4:03 PM · Restricted Project, Restricted Project

Apr 19 2022

kees added a comment to D123544: [randstruct] Automatically randomize a structure of function pointers.

I tested this (with D123958), and it appears to be working as intended. These two fptrs are the first and second listed, and are happily randomized:

Apr 19 2022, 2:04 PM · Restricted Project, Restricted Project
kees added a comment to D123958: [randstruct] Randomize all elements of a record.

I had assumed that any structure not marked for randomization would not be randomized. Based on that, I don't think inner structure objects (anonymous or otherwise) should automatically randomize their fields. WDYT?

Apr 19 2022, 11:02 AM · Restricted Project, Restricted Project

Mar 31 2022

kees added a reviewer for D122854: [CSKY] AsmBackend: Make Inst.dump() debug-only: void.
Mar 31 2022, 4:27 PM · Restricted Project, Restricted Project
kees requested review of D122854: [CSKY] AsmBackend: Make Inst.dump() debug-only.
Mar 31 2022, 4:04 PM · Restricted Project, Restricted Project

Feb 25 2022

kees added a comment to D119816: [SanitizerBounds] Add support for NoSanitizeBounds function.

FWIW, related problems with pskb_expand_head were seen again here:
https://github.com/ClangBuiltLinux/linux/issues/1599

Feb 25 2022, 2:11 PM · Restricted Project, Restricted Project

Feb 8 2022

kees added a comment to D110869: [X86] Implement -fzero-call-used-regs option.

I can build and boot with this. Nice! :) One issue I see is in instruction sequence ordering.

Feb 8 2022, 12:39 AM · Restricted Project, Restricted Project, Restricted Project

Oct 13 2021

kees added a comment to D107934: [LowerTypeTests] Emit cfi_jt aliases regardless of function export.

Ping; Nick, do you have a moment to rework this patch? AIUI, this is still important to getting CFI more sane for Android.

Oct 13 2021, 1:11 PM · Restricted Project, Restricted Project

Sep 30 2021

kees added a comment to D109967: Simplify handling of builtin with inline redefinition.

Is https://bugs.llvm.org/show_bug.cgi?id=50322 a duplicate of https://bugs.llvm.org/show_bug.cgi?id=23280 ? (Can both be closed?)

Sep 30 2021, 11:00 AM · Restricted Project

Sep 27 2021

kees added a comment to D109967: Simplify handling of builtin with inline redefinition.

Yeah, I can confirm that many cases are improved with this patch (others are more sensitive and depend on the __bos behavior I mentioned). With the 17 kernel FORTIFY self-tests, all 17 fail without this patch. With this patch, 9 start passing. Nice!

Sep 27 2021, 4:39 PM · Restricted Project
kees added a comment to D109967: Simplify handling of builtin with inline redefinition.

I'm setting up to test this patch (thank you!) using my current kernel FORTIFY improvements. Right now I have a bunch of compile-time behavior selftests written:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=for-next/overflow&id=3c5221f3f4fd865a780f544b72c68f4209bd2e76

Sep 27 2021, 2:47 PM · Restricted Project

Sep 17 2021

kees added a comment to D109967: Simplify handling of builtin with inline redefinition.

Does this address https://bugs.llvm.org/show_bug.cgi?id=50322 ? (I assume this is a new version of https://reviews.llvm.org/D92657 ?)

Sep 17 2021, 9:17 AM · Restricted Project

May 26 2021

kees added a comment to D103120: LTO: Export functions referenced by non-canonical CFI jump tables.

PoC from Sami:
https://godbolt.org/z/xfsWjhGhq

May 26 2021, 12:14 PM · Restricted Project

May 13 2021

kees added a comment to D102367: [LowerConstantIntrinsics] reuse isManifestLogic from ConstantFolding.

FWIW, I've tested this on a full Linux kernel build and I can confirm it's building correctly; I'm able to start my incremental FORTIFY fixes now. :) Thanks!

May 13 2021, 11:41 PM · Restricted Project

Feb 9 2021

kees added a comment to D96308: [llvm-objcopy] Avoid rename if input filename = output filename.

Is it possible to plumb fd instead of pathname? Then fchown(), fsetxattr(), etc, can all be used?

Feb 9 2021, 10:46 AM · Restricted Project

Nov 25 2020

kees added a comment to D91895: [Clang] improve -Wimplicit-fallthrough GCC compat.

The kernel's stance on switch statements reads:

Nov 25 2020, 1:33 PM · Restricted Project

Aug 28 2020

kees added a comment to D68720: Support -fstack-clash-protection for x86.

Ah! Yes, I see it now. Thanks and sorry for the noise!

Aug 28 2020, 12:23 AM · Restricted Project, Restricted Project

Aug 27 2020

kees reopened D68720: Support -fstack-clash-protection for x86.

Sorry if I missed something here, but why is this marked as "Closed"? It seems like the feature has still not landed (i.e. it got reverted).

Aug 27 2020, 4:32 PM · Restricted Project, Restricted Project

Jun 29 2020

kees added a comment to D80791: [AArch64] Generate .note.gnu.property based on module flags..

Might someone wish to disable PAC/BTI on an individual function, while having it on for the rest? I guess that would mean you can't call that function indirectly?

Jun 29 2020, 12:28 PM · Restricted Project, Restricted Project
kees added a comment to D80791: [AArch64] Generate .note.gnu.property based on module flags..

Specifically, this appears to be a legitimate bug, found by the warnings: https://bugs.llvm.org/show_bug.cgi?id=46258

Jun 29 2020, 8:36 AM · Restricted Project, Restricted Project
kees added a comment to D80791: [AArch64] Generate .note.gnu.property based on module flags..

Should the per-function analysis warning actually be removed? That seems like a helpful check to catch a different form of bad behavior.

Jun 29 2020, 8:03 AM · Restricted Project, Restricted Project

Mar 9 2020

kees added a comment to D75225: [ELF] Keep orphan section names (.rodata.foo .text.foo) unchanged if !hasSectionsCommand.

.text.* -> .text

This is not accurate: ld.bfd will keep the .text.$foo names, but place them all after the .text (it does not merge them into .text). Currently, ld.lld seems to merge them into .text. FGKASLR depends on the non-merging behavior.

I think the description is correct. I have a line // If a SECTIONS command is not specified in the code block.

Here is GNU ld's internal linker script:

.text           :
{
  *(.text.unlikely .text.*_unlikely .text.unlikely.*)
  *(.text.exit .text.exit.*)
  *(.text.startup .text.startup.*)
  *(.text.hot .text.hot.*)
  *(.text .stub .text.* .gnu.linkonce.t.*)
  /* .gnu.warning sections are handled specially by elf32.em.  */
  *(.gnu.warning)
}

(As you can see, -z keep-text-section-prefix does less than what GNU ld does. One issue with GNU ld's internal linker script is that -ffunction-sections (typical when building a libc) will cause the function exit to be reordered before others...)

Mar 9 2020, 9:41 AM · Restricted Project

Mar 4 2020

kees added a comment to D73126: [X86] Generate unaligned access for fixed slots in unaligned stack.

Hi! What's the state of this change? Do you need help committing this?

Mar 4 2020, 9:32 AM · Restricted Project

Feb 27 2020

kees added a comment to D75225: [ELF] Keep orphan section names (.rodata.foo .text.foo) unchanged if !hasSectionsCommand.

This is not accurate: ld.bfd will keep the .text.$foo names, but place them all after the .text (it does not merge them into .text). Currently, ld.lld seems to merge them into .text. FGKASLR depends on the non-merging behavior.

Feb 27 2020, 9:09 AM · Restricted Project

Feb 25 2020

kees added a comment to D75151: [ELF] --orphan-handling=: don't warn/error for input SHT_REL[A] retained by --emit-relocs.

Awesome! With this and D75149 my defconfig kernel build now only shows:

Feb 25 2020, 8:26 PM · Restricted Project
kees added a comment to D75149: [ELF] --orphan-handling=: don't warn/error for unused synthesized sections.

On my orphan checking kernel series, I'm left with only .rela_* and .rela.* getting reported, along with:

Feb 25 2020, 3:59 PM · Restricted Project

Feb 18 2020

kees added a comment to D74747: [JumpThreading] Skip unconditional PredBB when threading jumps through two basic blocks.

Thank you! I can confirm this fixes the problems I saw building the Linux kernel with CONFIG_UBSAN=y.

Feb 18 2020, 3:47 PM · Restricted Project

Feb 17 2020

kees added a comment to D74510: [ELF] Fix a null pointer dereference when --emit-relocs and --strip-debug are used together.

Thank you for the quick fix! I can confirm my builds with --string-debug work now. :)

Feb 17 2020, 10:58 AM · Restricted Project

Aug 15 2019

kees added a comment to D63260: [Attr] Support _attribute__ ((fallthrough)).

For latest version see https://reviews.llvm.org/D64838

Aug 15 2019, 11:08 AM · Restricted Project

Aug 9 2019

kees added a comment to D65629: cfi-icall: Allow the jump table to be optionally made non-canonical..

Just FYI, I can confirm a happily running arm64 kernel with CFI enabled built with this patch series. The C wrappers aren't needed and CFI is still triggering on mismatches:

Aug 9 2019, 1:00 AM · Restricted Project, Restricted Project

May 30 2019

kees added a comment to D56571: [RFC prototype] Implementation of asm-goto support in clang.

Nick points out that "REQUIRES: x86-registered-target" is likely not needed.

May 30 2019, 12:14 PM
kees added inline comments to D56571: [RFC prototype] Implementation of asm-goto support in clang.
May 30 2019, 11:21 AM

May 22 2019

kees committed rGc2187c20a461: [TargetLowering] Extend bool args to inline-asm according to getBooleanType (authored by kees).
[TargetLowering] Extend bool args to inline-asm according to getBooleanType
May 22 2019, 9:16 AM
kees committed rL361404: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.
[TargetLowering] Extend bool args to inline-asm according to getBooleanType
May 22 2019, 9:16 AM
kees closed D60224: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.
May 22 2019, 9:16 AM · Restricted Project
kees committed rGa7a687e50004: [TargetLowering] Add blank line (test commit) (authored by kees).
[TargetLowering] Add blank line (test commit)
May 22 2019, 9:00 AM
kees committed rL361403: [TargetLowering] Add blank line (test commit).
[TargetLowering] Add blank line (test commit)
May 22 2019, 8:59 AM

May 20 2019

kees updated the diff for D60224: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.

Rebasing to monorepo...

May 20 2019, 5:02 PM · Restricted Project

May 18 2019

kees updated the summary of D60224: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.
May 18 2019, 9:40 AM · Restricted Project
kees updated the diff for D60224: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.

Rebased to latest LLVM

May 18 2019, 9:24 AM · Restricted Project

Apr 5 2019

kees accepted D60306: Fix -emit-reloc against local symbols..

I can confirm this fixes the Linux kernel relocation visibility problem I saw. Thank you!

Apr 5 2019, 8:55 AM · Restricted Project

Apr 3 2019

kees added a comment to D60224: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.

Should I respin to make booleans always zero extended? I can adjust the X86 code at the same time...

Apr 3 2019, 4:28 PM · Restricted Project
kees added a comment to D60208: [X86] Extend boolean arguments to inline-asm according to getBooleanType.

For the non-X86 case: https://reviews.llvm.org/D60224

Apr 3 2019, 12:23 PM · Restricted Project
kees added a comment to D60224: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.

For note, this is based on https://reviews.llvm.org/D60208

Apr 3 2019, 12:22 PM · Restricted Project
kees created D60224: [TargetLowering] Extend bool args to inline-asm according to getBooleanType.
Apr 3 2019, 12:20 PM · Restricted Project