Re: [PATCH v2 14/14] powerpc: Implement UACCESS validation on PPC32

From: Peter Zijlstra
Date: Thu Jun 22 2023 - 07:57:12 EST


On Thu, Jun 22, 2023 at 12:54:36PM +0200, Christophe Leroy wrote:

> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> index f850ab892ad5..8ac5711a055f 100644
> --- a/tools/objtool/check.c
> +++ b/tools/objtool/check.c
> @@ -218,6 +218,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
> "kthread_exit",
> "kunit_try_catch_throw",
> "lbug_with_loc",
> + "longjmp",
> "machine_real_restart",
> "make_task_dead",
> "mpt_halt_firmware",
> @@ -230,7 +231,9 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
> "sev_es_terminate",
> "snp_abort",
> "start_kernel",
> + "start_secondary_resume",
> "stop_this_cpu",
> + "unrecoverable_exception",
> "usercopy_abort",
> "x86_64_start_kernel",
> "x86_64_start_reservations",

Someone went and changed all that in tip/objtool/core :-)

But perhaps, like the uaccess_safe_builtins[] array below, should we
start marking sections so we can remember where stuff comes from later?

> @@ -1335,6 +1338,8 @@ static const char *uaccess_safe_builtin[] = {
> "rep_stos_alternative",
> "rep_movs_alternative",
> "__copy_user_nocache",
> + "__copy_tofrom_user",
> + "__arch_clear_user",
> NULL
> };

Do we want to rename the 'misc' sectino to 'x86' and start a 'ppc32'
section there?