lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 12 Jun 2021 06:24:21 +0300
From:   Jarmo Tiitto <jarmo.tiitto@...il.com>
To:     Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        clang-built-linux@...glegroups.com
Cc:     Jarmo Tiitto <jarmo.tiitto@...il.com>, samitolvanen@...gle.com,
        morbo@...gle.com, wcw@...gle.com, keescook@...omium.org,
        jeyu@...nel.org, linux-kernel@...r.kernel.org
Subject: [RFC PATCH 0/5] pgo: Add PGO support for module profile data

This patch series intends to extend the current Clang PGO code to
support profile data from modules. Note that current PGO can and *does* 
instrument all kernel code, including modules, but this profile data
is inaccessible.

This patch series adds pgo/<module>.profraw files from what
per loaded module profile data can be read.

The final profile can be generated by merging all these profile files:
llvm-profdata merge --output=vmlinux.profdata vmlinux.profraw ...
and then building the optimized kernel.

This v2 patch series is still an bit of RFC so I'd like feedback how
to do things better still.

The patches itself are based on Kees/for-next/clang/features tree
where I have two of my bug fix patches already in. :-)

I have done some initial testing:
 * Booted the instrumented kernel on qemu *and* bare hardware.
 * Module un/loading via test_module in QEMU.
 * Built optimized kernel using the new profile data.

Jarmo Tiitto (5):
  pgo: Expose module sections for clang PGO instumentation.
  pgo: Make serializing functions to take prf_object
  pgo: Wire up the new more generic code for modules
  pgo: Add module notifier machinery
  pgo: Cleanup code in pgo/fs.c

 include/linux/module.h  |  15 +++
 kernel/Makefile         |   6 +
 kernel/module.c         |   7 ++
 kernel/pgo/fs.c         | 241 ++++++++++++++++++++++++++++++++++------
 kernel/pgo/instrument.c |  57 +++++++---
 kernel/pgo/pgo.h        |  85 ++++++++++----
 6 files changed, 342 insertions(+), 69 deletions(-)


base-commit: 0039303120c0065f3952698597e0c9916b76ebd5
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ