linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] kbuild: allow symbol whitelisting with TRIM_UNUSED_KSYM
@ 2020-02-07 18:07 Quentin Perret
  2020-02-07 18:07 ` [PATCH v3 1/3] kbuild: allow symbol whitelisting with TRIM_UNUSED_KSYMS Quentin Perret
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Quentin Perret @ 2020-02-07 18:07 UTC (permalink / raw)
  To: masahiroy, nico
  Cc: linux-kernel, linux-kbuild, maennich, kernel-team, jeyu, hch, qperret

The current norm on Android and many other systems is for vendors to
introduce significant changes to their downstream kernels, and to
contribute very little (if any) code back upstream. The Generic Kernel
Image (GKI) project in Android attempts to improve the status-quo by
having a unique kernel for all android devices of the same architecture,
regardless of the SoC vendor. The key idea is to make all interested
parties agree on a common solution, and contribute their code upstream
to make it available to use by the wider community.

The kernel-to-drivers ABI on Android devices varies significantly from
one vendor kernel to another today because of changes to exported
symbols, dependencies on vendor symbols, and surely other things. The
first step for GKI is to try and put some order into this by agreeing on
one version of the ABI that works for everybody.

For practical reasons, we need to reduce the ABI surface to a subset of
the exported symbols, simply to make the problem realistically solvable,
but there is currently no upstream support for this use-case.

As such, this series attempts to improve the situation by enabling users
to specify a symbol 'whitelist' at compile time. Any symbol specified in
this whitelist will be kept exported when CONFIG_TRIM_UNUSED_KSYMS is
set, even if it has no in-tree user. The whitelist is defined as a
simple text file, listing symbols, one per line.

v2 -> v3:
 - added a cover letter to explain why this is in fact an attempt to
   help usptream in the long term (Christoph)
 - made path relative to the kernel source tree (Matthias)
 - made the Kconfig help text less confusing (Jessica)
 - added patch 02 and 03 to optimize build time when a whitelist is
   provided

v2:
 - make sure to quote the whitelist path properly (Nicolas)

Quentin Perret (3):
  kbuild: allow symbol whitelisting with TRIM_UNUSED_KSYMS
  kbuild: split adjust_autoksyms.sh in two parts
  kbuild: generate autoksyms.h early

 Makefile                    |  2 +-
 init/Kconfig                | 13 +++++++++++
 scripts/adjust_autoksyms.sh | 27 ++++------------------
 scripts/gen_autoksyms.sh    | 45 +++++++++++++++++++++++++++++++++++++
 4 files changed, 63 insertions(+), 24 deletions(-)
 create mode 100755 scripts/gen_autoksyms.sh

-- 
2.25.0.341.g760bfbb309-goog


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-02-13 18:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 18:07 [PATCH v3 0/3] kbuild: allow symbol whitelisting with TRIM_UNUSED_KSYM Quentin Perret
2020-02-07 18:07 ` [PATCH v3 1/3] kbuild: allow symbol whitelisting with TRIM_UNUSED_KSYMS Quentin Perret
2020-02-07 18:22   ` Nicolas Pitre
2020-02-11  5:41     ` Quentin Perret
2020-02-08  5:05   ` Masahiro Yamada
2020-02-11  5:44     ` Quentin Perret
2020-02-07 18:07 ` [PATCH v3 2/3] kbuild: split adjust_autoksyms.sh in two parts Quentin Perret
2020-02-08  5:08   ` Masahiro Yamada
2020-02-11  5:45     ` Quentin Perret
2020-02-07 18:07 ` [PATCH v3 3/3] kbuild: generate autoksyms.h early Quentin Perret
2020-02-08  5:09   ` Masahiro Yamada
2020-02-11  5:46     ` Quentin Perret
2020-02-11  2:14   ` kbuild test robot
2020-02-12 19:56     ` Quentin Perret
     [not found]       ` <20200213084251.GU12867@shao2-debian>
2020-02-13 18:07         ` [kbuild-all] " Quentin Perret

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).