Skip to content

Split CFI jump tables between core kernel and entry code so KPTI doesn't have to map the entire jump table #23

Closed

Description

@kees

https://outflux.net/blog/archives/2019/11/20/experimenting-with-clang-cfi-in-upstream-linux/

There seems to be some generated code that is being run at syscall entry that is not mapped. I suspect there is something still doing CFI checks on entry (and their resulting jump tables are missing), but I haven't found them yet. For now, disable KPTI under CFI (at run time, so test kernels can still boot with "pti" to enable it again).

Activity

  1. added
    [ARCH] x86_64Needed on the 64-bit x86 architecture (ARCH=x86)
    [Feature] CFIInvolves Control Flow Integrity
    on Nov 21, 2019
  2. kees commented on Feb 25, 2020

    @kees
    Author

    Looks like current best solution is to just always map the jump tables.

  3. changed the title [-]KPTI+CFI on x86 trips over something in entry code[/-] [+]Split CFI jump tables between core kernel and entry code so KPTI doesn't have to map the entire jump table[/+] on Mar 11, 2021
  4. kees commented on Sep 16, 2021

    @kees
    Author

    No longer an issue; the entry code is using the opaque types to avoid CFI instrumentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [ARCH] x86_64Needed on the 64-bit x86 architecture (ARCH=x86)[Feature] CFIInvolves Control Flow Integrity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions