The quilt patch titled Subject: core_pattern: add CPU specifier has been removed from the -mm tree. Its filename was core_pattern-add-cpu-specifier.patch This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Oleksandr Natalenko <oleksandr@xxxxxxxxxx> Subject: core_pattern: add CPU specifier Date: Sat, 3 Sep 2022 08:43:30 +0200 Statistically, in a large deployment regular segfaults may indicate a CPU issue. Currently, it is not possible to find out what CPU the segfault happened on. There are at least two attempts to improve segfault logging with this regard, but they do not help in case the logs rotate. Hence, lets make sure it is possible to permanently record a CPU the task ran on using a new core_pattern specifier. Link: https://lkml.kernel.org/r/20220903064330.20772-1-oleksandr@xxxxxxxxxx Signed-off-by: Oleksandr Natalenko <oleksandr@xxxxxxxxxx> Suggested-by: Renaud Métrich <rmetrich@xxxxxxxxxx> Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: "Eric W . Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Grzegorz Halat <ghalat@xxxxxxxxxx> Cc: "Guilherme G. Piccoli" <gpiccoli@xxxxxxxxxx> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx> Cc: Jason A. Donenfeld <Jason@xxxxxxxxx> Cc: Joel Savitz <jsavitz@xxxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Laurent Dufour <ldufour@xxxxxxxxxxxxx> Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx> Cc: Rob Herring <robh@xxxxxxxxxx> Cc: Stephen Kitt <steve@xxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: Xiaoming Ni <nixiaoming@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/admin-guide/sysctl/kernel.rst | 1 + fs/coredump.c | 5 +++++ include/linux/coredump.h | 1 + 3 files changed, 7 insertions(+) --- a/Documentation/admin-guide/sysctl/kernel.rst~core_pattern-add-cpu-specifier +++ a/Documentation/admin-guide/sysctl/kernel.rst @@ -174,6 +174,7 @@ core_pattern %f executable filename %E executable path %c maximum size of core file by resource limit RLIMIT_CORE + %C CPU the task ran on %<OTHER> both are dropped ======== ========================================== --- a/fs/coredump.c~core_pattern-add-cpu-specifier +++ a/fs/coredump.c @@ -325,6 +325,10 @@ static int format_corename(struct core_n err = cn_printf(cn, "%lu", rlimit(RLIMIT_CORE)); break; + /* CPU the task ran on */ + case 'C': + err = cn_printf(cn, "%d", cprm->cpu); + break; default: break; } @@ -534,6 +538,7 @@ void do_coredump(const kernel_siginfo_t */ .mm_flags = mm->flags, .vma_meta = NULL, + .cpu = raw_smp_processor_id(), }; audit_core_dumps(siginfo->si_signo); --- a/include/linux/coredump.h~core_pattern-add-cpu-specifier +++ a/include/linux/coredump.h @@ -22,6 +22,7 @@ struct coredump_params { struct file *file; unsigned long limit; unsigned long mm_flags; + int cpu; loff_t written; loff_t pos; loff_t to_skip; _ Patches currently in -mm which might be from oleksandr@xxxxxxxxxx are