From patchwork Sat Jan 4 14:38:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 13926270 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60988E77199 for ; Sat, 4 Jan 2025 14:39:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EBB166B0096; Sat, 4 Jan 2025 09:39:06 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E6B8C6B0098; Sat, 4 Jan 2025 09:39:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D5B8A6B0099; Sat, 4 Jan 2025 09:39:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id B7E0B6B0096 for ; Sat, 4 Jan 2025 09:39:06 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6C9FE1C71C3 for ; Sat, 4 Jan 2025 14:39:06 +0000 (UTC) X-FDA: 82970026692.18.430FBAD Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by imf13.hostedemail.com (Postfix) with ESMTP id 87FF420007 for ; Sat, 4 Jan 2025 14:39:03 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b="yIjCqO/8"; dmarc=none; spf=pass (imf13.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.214.174 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736001543; a=rsa-sha256; cv=none; b=6fbmMT2DDKlGfp6rh8zf30MHUjd4X9n5zWo8rfEO4m+6cXB+TNYfwUFMk6cMKp2K4YrK0C QV69VsO4wTSZ4kGWuiqSheIa0+s/FQmjlOPn/XRcLgIMSspaqomtTtUsXZvVqD6l4r1Kya qY24EVK9gTCLyPGyLkGje98Whe8SFl4= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b="yIjCqO/8"; dmarc=none; spf=pass (imf13.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.214.174 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736001543; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ffgGfa1tRdbMu1hKTw9Yyv/ZhjBJNeWsWiWpVjLRBnw=; b=v258qCC2AdXYmFMvddCwLWHNTczxcy8HmtKpXoGC14ZsClZ+zeQMrvKSzicWCwf9C99gdx mtfVFdPYdu/yKW0QIqrhKdFQB174n/effhY5jbAo1iEWfs4YuuJDg5L2BU/F4yxbjNGyjI WoCFn5GDdvPZZ4Ifk6H/uFwEr1gxv8I= Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-2166651f752so214486725ad.3 for ; Sat, 04 Jan 2025 06:39:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1736001542; x=1736606342; darn=kvack.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ffgGfa1tRdbMu1hKTw9Yyv/ZhjBJNeWsWiWpVjLRBnw=; b=yIjCqO/8SD8Pvvbi+wF/KhDgqbIffjaXqK3uBI5Da49JLQiJJyTY1/Aii8OlhXozZ8 LlVWonZR3J/VEL6PKi4azHHZ0hsG086oQqdF36PkV++HToPCZtL2QcVIQv++a3S7b3rY ZJjbh3GVfItqusi2GSu6VQxBRfze1y6FHmIXTgIYcvqexm2jgnhRVMy7Nt7CCYlS0iJA rhH1AN4TZOeLGc6oXXLP+OaNKqlab2EAJemei4Hx9e43yzjNMmpTjakGxymzRT0r28e9 cQ02plLaivqnPO4Ae7IGHYIgmPaPzWQIGYt5xnW8ODyUj4m4KGs1i8QjYhxlDycJzgru 4OSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736001542; x=1736606342; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ffgGfa1tRdbMu1hKTw9Yyv/ZhjBJNeWsWiWpVjLRBnw=; b=edkvUD9rAGml+vch9GUzsys7f4/KebdwL6Akbb0FYfQYJZh7rGuR9ozh4t4OxQrDlZ ClbSLnURFLyGJfP06nvqD1NYIkfq1qDWiLP3Unn6Y4aP8jP9/sNPe13srbz9GAY6CKIU oxUZD6CaOr+zyL44dLjMHbRFWksDPg7rDOQl6QMwsNckHX6dPVfxj0fEJ9do3I73dVeY +i7c5wNp0Rd0Uc6bSvv0lyBF1NOiAVOJcb5bxR73TVuO/WYQslDIZ6glBs855ib2q329 O2vau8IRO+GziWgBMa/dXOl9WucwckrtK+v0Iz9TgqfprVncfgIcaOMk+D41DQ3vgvcW dvIw== X-Gm-Message-State: AOJu0YytXW37baArGpMdaP9I7oOgrW3f3NIsQzcZ6qW7w/S+k2fdb591 /ciASDEjmAHLzCZtOpuivF9qCCnfdkXzZWOYl3k3gERLdAtE7at6ha1lMyxeU/M= X-Gm-Gg: ASbGncvqhFHvr4JJpCqnLLSazA7pGfG8USbWXDzRXLMk1+QAhlGMOzUVTCA/adp9DTa zdre2VY7nRt7po2M2f/ztqQEePyvGQatbLDqdkxFAimEtdxIJrS7N0LRcuvxA64aS4CYvJqB7j+ zSuG9rLgwpHDl3Nu3DDwmXt4B2yT8iZvBAjZlfWrMR/2mpWXw1W7ERMTWTCL1N7p30uuoWxVGA6 ZIdtJN9BR4E8ngxEDbXv9+/snVb3yk7EGNBo9THregQeavhzs8DTDj/273hF6A= X-Google-Smtp-Source: AGHT+IFOWxSlU7LboQeYrGu1ZapBf19hzzItaS6bjgdVpBMRFBzVa4lgIENsB6ZfRDlcb/evlyTHrw== X-Received: by 2002:a05:6a20:2d1f:b0:1e1:b1e4:e750 with SMTP id adf61e73a8af0-1e5e04717a2mr77843013637.18.1736001542441; Sat, 04 Jan 2025 06:39:02 -0800 (PST) Received: from localhost ([2400:4050:b783:b00:4952:3c52:120a:27e9]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-72aad8fd7b0sm17288107b3a.139.2025.01.04.06.38.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Jan 2025 06:39:02 -0800 (PST) From: Akihiko Odaki Date: Sat, 04 Jan 2025 23:38:36 +0900 Subject: [PATCH v2 3/5] powwerpc: Use note name macros MIME-Version: 1.0 Message-Id: <20250104-elf-v2-3-77dc2e06db4e@daynix.com> References: <20250104-elf-v2-0-77dc2e06db4e@daynix.com> In-Reply-To: <20250104-elf-v2-0-77dc2e06db4e@daynix.com> To: Eric Biederman , Kees Cook , Catalin Marinas , Mark Brown , Dave Martin , Baoquan He , Vivek Goyal , Dave Young Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, kexec@lists.infradead.org, devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 87FF420007 X-Stat-Signature: qo1o5s5nua5km3ojsaqd3f5qxm6bdy3p X-Rspam-User: X-HE-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EaJunXI8dmjjG1qK1LSYdZk9Fe3o7iIIMkd0nfW8b1CTeRoJnsXu7yKKmpoHmzoXnrEDfgEHdwP30SiYi5hxHciTtZ+NpfHNAuFIAOzgxy3dkBm5+ir7t5+M+IFYJLN2QMmwxmEQoKVWtFZMkAcq+uLcN8L7bLtRylQPPpxHV1tG5+CUZYpprFvQjoWR8prGrQzagDL1lMf2EhvXdUc96zU6+WgWB2CKPH0TDUBnI+Bz2CSqT9DfpjMcXswNbWO8vjEKS7tD5uwUp9hncSbjeBpB1+EyigZUy7G/uwKstbWU+Yw5CWIFAXx+Mkh X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Use note name macros to match with the userspace's expectation. Signed-off-by: Akihiko Odaki --- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 4b371c738213..d44349fe8e2b 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -751,7 +751,7 @@ u32 *__init fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs) * prstatus.pr_pid = ???? */ elf_core_copy_regs(&prstatus.pr_reg, regs); - buf = append_elf_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS, + buf = append_elf_note(buf, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); return buf; } diff --git a/arch/powerpc/platforms/powernv/opal-core.c b/arch/powerpc/platforms/powernv/opal-core.c index c9a9b759cc92..a379ff86c120 100644 --- a/arch/powerpc/platforms/powernv/opal-core.c +++ b/arch/powerpc/platforms/powernv/opal-core.c @@ -149,7 +149,7 @@ static Elf64_Word *__init auxv_to_elf64_notes(Elf64_Word *buf, /* end of vector */ bufp[idx++] = cpu_to_be64(AT_NULL); - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, NT_AUXV, + buf = append_elf64_note(buf, NN_AUXV, NT_AUXV, oc_conf->auxv_buf, AUXV_DESC_SZ); return buf; } @@ -252,7 +252,7 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf) * crashing CPU's prstatus. */ first_cpu_note = buf; - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, NT_PRSTATUS, + buf = append_elf64_note(buf, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); for (i = 0; i < oc_conf->num_cpus; i++, bufp += size_per_thread) { @@ -279,7 +279,7 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf) fill_prstatus(&prstatus, thread_pir, ®s); if (thread_pir != oc_conf->crashing_cpu) { - buf = append_elf64_note(buf, CRASH_CORE_NOTE_NAME, + buf = append_elf64_note(buf, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); } else { @@ -287,7 +287,7 @@ static Elf64_Word * __init opalcore_append_cpu_notes(Elf64_Word *buf) * Add crashing CPU as the first NT_PRSTATUS note for * GDB to process the core file appropriately. */ - append_elf64_note(first_cpu_note, CRASH_CORE_NOTE_NAME, + append_elf64_note(first_cpu_note, NN_PRSTATUS, NT_PRSTATUS, &prstatus, sizeof(prstatus)); }