alonid/llvm-experimental

Project ID: 28203

Description

This project demonstrate an experimental Clang feature named RANDSTRUCT which does similar work to the existing RANDSTRUCT GCC plugin in the Linux kernel. See lwn article. In the process of contributing this Clang feature upstream, the implementation is in github.com/clang-randstruct.

The built packages include:

  • A modified version of Clang 9.0.0
  • A modified Fedora Linux kernel enabled with RANDSTRUCT

Installation Instructions

dnf copr enable alonid/llvm-experimentall dnf install kernel-5.3.14-200.randstruct.fc30.x86_64.rpm

Reboot to the new kernel.

Randomization is reflected in the debuginfo, unlike in the GCC plugin (with gcc 9.2.0 and the plugin from Linux 5.3).

dnf install dwarves kernel-{devel,debuginfo}-5.3.14-200.randstruct.fc30.x86_64 pahole /usr/lib/debug/lib/modules/5.3.14-200.randstruct.fc30.x86_64/kernel/fs/xfs/xfs.ko.debug | less -R
struct signal_struct { long unsigned int cnivcsw; /* 0 8 */ struct hlist_head multiprocess; /* 8 8 */ u64 cutime; /* 16 8 */ long unsigned int nivcsw; /* 24 8 */ int notify_count; /* 32 4 */ int group_stop_count; /* 36 4 */ long unsigned int cmin_flt; /* 40 8 */ u64 cgtime; /* 48 8 */ wait_queue_head_t wait_chldexit; /* 56 24 */ /* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */ struct tty_audit_buf * tty_audit_buf; /* 80 8 */ struct mm_struct * oom_mm; /* 88 8 */ struct pid * pids[4]; /* 96 32 */ /* --- cacheline 2 boundary (128 bytes) --- */ struct mutex cred_guard_mutex; /* 128 32 */ ...

See the struct definition (from /usr/src/kernels/5.3.14-200.randstruct.fc30.x86_64/include/linux/sched/signal.h):

struct signal_struct { refcount_t sigcnt; atomic_t live; int nr_threads; struct list_head thread_head; wait_queue_head_t wait_chldexit; /* for wait4() */ /* current thread group signal load-balancing target: */ struct task_struct *curr_target; /* shared signal handling: */ struct sigpending shared_pending; /* For collecting multiprocess signals during fork */ struct hlist_head multiprocess;

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download

* Total number of downloaded packages.