From cdc7daa9e3e102fc650321c8c0d2d8cf0ced3910 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=BD=D0=B0=D0=B1?= Date: Mon, 26 Sep 2022 17:15:54 +0200 Subject: [PATCH] a.out: restore CMAGIC MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Part of UAPI and the on-disk format: this means that it's not a magic number per magic-number.rst, and it's best to leave it untouched to avoid breaking userspace and suffer the same fate as a.out in general Fixes: 53c2bd679017 ("a.out: remove define-only CMAGIC, previously magic number") Signed-off-by: Ahelenia Ziemiańska Link: https://lore.kernel.org/r/20220926151554.7gxd6unp5727vw3c@tarta.nabijaczleweli.xyz Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/a.out.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/uapi/linux/a.out.h b/include/uapi/linux/a.out.h index bb15da96df2a1..5fafde3798e57 100644 --- a/include/uapi/linux/a.out.h +++ b/include/uapi/linux/a.out.h @@ -70,6 +70,9 @@ enum machine_type { The first page is unmapped to help trap NULL pointer references */ #define QMAGIC 0314 +/* Code indicating core file. */ +#define CMAGIC 0421 + #if !defined (N_BADMAG) #define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \ && N_MAGIC(x) != NMAGIC \ -- 2.30.2