From patchwork Wed Jan 15 05:48:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 13939851 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 7D0F2C02180 for ; Wed, 15 Jan 2025 05:49:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0B077280004; Wed, 15 Jan 2025 00:49:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 05FA26B0098; Wed, 15 Jan 2025 00:49:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E6938280004; Wed, 15 Jan 2025 00:49:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C8B7B6B0096 for ; Wed, 15 Jan 2025 00:49:00 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 79A18140FE7 for ; Wed, 15 Jan 2025 05:49:00 +0000 (UTC) X-FDA: 83008607640.03.F20224D Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by imf14.hostedemail.com (Postfix) with ESMTP id A4DE3100007 for ; Wed, 15 Jan 2025 05:48:58 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b=RASwjGMe; spf=pass (imf14.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.214.182 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736920138; 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=I4SRmWOkQdk58NJ10wmqwv5TrRHdqCAxdQV3fT7eobo=; b=AcCSh4+8LchZh3humKBuJKloAFPtVtxCuSMhthd+DWEZZAxz0FDITGLJiAsgvqB74GHb6G R88vxJz6BOeLnPXX6pZS0fFC0k+0gHS4lMy54jKp4G/aadKJ7YuH0oWMlAio2K3pWLRAll JhS8EaPbuKqEFEM6h/nHB8CrmxDXYts= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1736920138; a=rsa-sha256; cv=none; b=f/0vfJHlUekqmzOTh3rqcPOPdEX06J2+YFz8pY50Yca5Of24sw33kZ10aBA1RYYaIii4RW UW9Xl/TWpGd2QpSgXSenRGC3S2Hzk//LP7kOJthm0j1h5Sv+q4eMCCk7GIJpM9Srhm0ydb N8ZYZypMOJGj4XGyVZFvze1mqclPQh8= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=daynix-com.20230601.gappssmtp.com header.s=20230601 header.b=RASwjGMe; spf=pass (imf14.hostedemail.com: domain of akihiko.odaki@daynix.com designates 209.85.214.182 as permitted sender) smtp.mailfrom=akihiko.odaki@daynix.com; dmarc=none Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-21675fd60feso139168215ad.2 for ; Tue, 14 Jan 2025 21:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1736920137; x=1737524937; 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=I4SRmWOkQdk58NJ10wmqwv5TrRHdqCAxdQV3fT7eobo=; b=RASwjGMebyX/dzZX+lAGR0Glkdi+7uxosRavZleHpgiQmo7T7iAedLsluwhUzsqDYX rhfRatd6YDdkj9PlJmVHS75eg3iwq3Y9v3owhTuKRinIwFwbOap/d180bwQzW5Bf+7/D LaYR76k7/wSCTopv11nBTmJf6yBxW4MQPEjKr9npUsQ76ULHIRUpt6rl+QIsPElYPF2t abty4JEwRVEevrwZm9q3pX0j7epkdNqLAivVZo9vrZ9oAhF5x8qKFRnH6KdBE91oYnxp r1KGgkag34ucf7npt+8pl+gTFeg/CxUAHXjReXggbnf8GJHqLkkTy1cy4cAe1NpZ92C/ xxzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736920137; x=1737524937; 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=I4SRmWOkQdk58NJ10wmqwv5TrRHdqCAxdQV3fT7eobo=; b=JUpXpKJF8qoRHioavhT8f9v8qTTaKBlCVvJPdC7Mhz8uJW/T5oHmHh2PkmmC2ZK2aT tdNeqjh73fFBbzS7cZs2Ew0dGP736T+HEuUiGQmcl9GACZ94FKOt7wDGqH2c640ufpfo 6I9meTf/phKbqA2nRMi7vJeJ33mTlkMT6PKSfXPENux7ueQHGmFgJ8wvN6/fbvPlwpgW cwKoarblHbka7ok3BAeCpEtfJQcgG1cRcUpbNbniXrkO0ueLHu+FtsSodoTpAbo9logV /rnRQF2MZIzP8OiNK5o24u+PzikdrR9dYICV5+pV+bTeD3xGq/Ko2f9HJS3XpU2lNfa7 lnFw== X-Gm-Message-State: AOJu0YzuyEMx1+xAZy9fm00BJTMGNQESLTVIDcsVOvkJwTKpxXNUB+Fc U96X4TZN+PWDuezstbvsgamQFKyXR4CirZEoJ8Fh0vxTvMn9GKaHSbyh5NlLoOg= X-Gm-Gg: ASbGncu+xELlSv4PmjDZGEb/p2XbkKXTS0s1E0SOs1flkffyxxam1az1HqM/W8H+1KR S8HhAQefi57ElBgKiBMlr8ZdD+clCdE0bwJNi8hn9wuFtny8IRsb7LEnGuvDbvy1AH994nrcA2p 43bcK48bp2WHaeC8538fCJnXxG3NEMTIkayGhVugYQLy3myD6AkCMhDdEXyzPUB9nD87lO3/xGA gC34GJOrLO+puCC3rXo+M/l9yEwFlDajmMph0bCZW09bVdgx+m/MjgtAGY= X-Google-Smtp-Source: AGHT+IELo9CjdL+yrG4BCg5jbLzJxkebkveFvc3aZpHyweclYXLk3OeSuIMKxGoccunx18mtoTdJlQ== X-Received: by 2002:a17:902:f644:b0:216:48f4:4f3d with SMTP id d9443c01a7336-21a83f56bdfmr398040455ad.13.1736920137397; Tue, 14 Jan 2025 21:48:57 -0800 (PST) Received: from localhost ([157.82.203.37]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-21a9f111b82sm75035235ad.35.2025.01.14.21.48.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jan 2025 21:48:57 -0800 (PST) From: Akihiko Odaki Date: Wed, 15 Jan 2025 14:48:00 +0900 Subject: [PATCH v5 3/6] powerpc: Use note name macros MIME-Version: 1.0 Message-Id: <20250115-elf-v5-3-0f9e55bbb2fc@daynix.com> References: <20250115-elf-v5-0-0f9e55bbb2fc@daynix.com> In-Reply-To: <20250115-elf-v5-0-0f9e55bbb2fc@daynix.com> To: Eric Biederman , Kees Cook , Catalin Marinas , Mark Brown , Dave Martin , Baoquan He , Vivek Goyal , Dave Young , LEROY Christophe Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, kexec@lists.infradead.org, binutils@sourceware.org, devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 X-Rspamd-Queue-Id: A4DE3100007 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: j4ctzkhafpu7k6h1ouim1oygfz3s7mio X-HE-Tag: 1736920138-157266 X-HE-Meta: U2FsdGVkX1/3b6fio74zNPDwYHZ+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p4ZbrjuNEL1STpvFnn6jnKk3RGvbFNJnGKjafu6d+60SR2udE2oen5BakFGHZiUe8p8pr9NBlunARvMG2c/89clUN/kkas/SrVhxX1jf0xFTUJhzOXXV03G2qmvMNfsrJ2CFAREPfuL8B+jCiBD0pSJp68INhClTa/CtL9QeZk316bzzdGSBZvz7bJOo4uoSsMBm9m8wEtVyPWxd5kPnhY9XGk1D05vJ77Ac/n4PxSVKHTKMyXYy6aYxNf5bo8xVqoSCtusSa1eMPoaDaHtbzZnYDH3flq/Q1lFLgMTFRDhtaa+yLE8DE0hFD9GvFMwiw= 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 Acked-by: Baoquan He Reviewed-by: Dave Martin --- 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)); }