Page MenuHomePhabricator

kees (Kees Cook)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 6 2019, 5:35 AM (90 w, 2 d)

Recent Activity

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
kees added a comment to D60208: [X86] Extend boolean arguments to inline-asm according to getBooleanType.

What other target have their own lowering code? (Or, restated, is x86 the only target not using the generic lowering code?)

Apr 3 2019, 11:08 AM · Restricted Project

Feb 6 2019

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

I found a weird mis-compilation bug. Not sure if in LLVM or Clang half. Details here: https://reviews.llvm.org/D56571#1386973

Feb 6 2019, 11:16 PM · Restricted Project
kees added a comment to D56571: [RFC prototype] Implementation of asm-goto support in clang.

Not sure if this is the fault of the LLVM half or the Clang half, but I'm seeing mis-compilations in the current patches (llvm ca1e713fdd4fab5273b36ba6f292a844fca4cb2d with D53765.185490 and clang 01879634f01bdbfac4636ebe03b68e85b20cd664 with D56571.185489). My earlier builds were okay (llvm b1650507d25d28a03f30626843b7b133796597b4 with D53765.183738 and clang 61738985ebe78eeff6cfae7f97543d3456bac25a with D56571.181973).

Feb 6 2019, 11:15 PM
kees added a comment to D56571: [RFC prototype] Implementation of asm-goto support in clang.

I reduced the C code to this:

Feb 6 2019, 7:43 AM
kees added a comment to D53765: [RFC prototype] Implementation of asm-goto support in LLVM.

I found a weird mis-compilation bug. Not sure if in LLVM or Clang half. Details here: https://reviews.llvm.org/D56571#1386973

Feb 6 2019, 5:56 AM · Restricted Project
kees added a comment to D56571: [RFC prototype] Implementation of asm-goto support in clang.

Not sure if this is the fault of the LLVM half or the Clang half, but I'm seeing mis-compilations in the current patches (llvm ca1e713fdd4fab5273b36ba6f292a844fca4cb2d with D53765.185490 and clang 01879634f01bdbfac4636ebe03b68e85b20cd664 with D56571.185489). My earlier builds were okay (llvm b1650507d25d28a03f30626843b7b133796597b4 with D53765.183738 and clang 61738985ebe78eeff6cfae7f97543d3456bac25a with D56571.181973).

Feb 6 2019, 5:55 AM