Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1015840pxb; Fri, 15 Apr 2022 18:26:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTONRm2lYYUQ2NoBYqsZ527pYfVYtS/b2oTXi72br9uhSOD4iqslvpkk6yRGDc9koaEUzW X-Received: by 2002:a05:6a00:1ac9:b0:508:6739:5638 with SMTP id f9-20020a056a001ac900b0050867395638mr1527377pfv.75.1650072387128; Fri, 15 Apr 2022 18:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650072387; cv=none; d=google.com; s=arc-20160816; b=bNmMUiGaRhghHWzeRPHLEWItmSktclXIuNwx2KzQs/G2bUQWUjXOm7saSaiutMEA/7 gYPHtEOl29vSk3+q6ACdBIegQNDPhuWI4t4vmO8o8tkhtFX+M5WL7qjj2Vv/Mtwy3AVm lHThirngbyzygqiw9z69u5yDdnegvef7yAMg5H/ozGbxF87cY2oBGic/lffAcZLtD2w9 oLar+KPKa3Zyxu4gPOpL5yN7zB8UZvI5RJ8/RJ+QrDGTbQNI6Ag4kEDQYrRQjF9eA4rG NQvfKUDL4YC5S3yE3Zl9Awa2KxfKFFflwXGrD09kHnhrA/J4egY/MFvbsSArP4ILBSnU ywBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=OaWHcjI5jzSN+btLdV7n53XabIHh5QmAWpRah4D530Q=; b=L+sIZo+KyY/LDhcKzRk85GnTzLFoG4vGv2a2oxIWoty3E5gdQwTfQ1zokL6EmlggEq mHykLOgNWmzh13OE1MJj8nh0Jvug7lJrqhw7f/qUey3mFgd2rvdW3egcwobBfdDryCJz 9XvlMn4K5kE2lx5ZMif1gqal37jFmgwNPBcHB/dsiWlFJ09GntYxk8jS8yLSFnI/ymOh D5rFXecHk76kOplckYzQhVkggT9GkHNfC7mq1gy9vNzCnAZb2CNNQlddzP0cs0cn9jY7 szGIjzU1fhliIxQ/LxQF52TLrhiyP7EFI5r4Gs31ugMAa7x8R2uLdIs8X8f3ddf0fibF aung== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="TYCS/5tQ"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kgJ7Gxor; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id nn9-20020a17090b38c900b001bd14e01f2asi6097539pjb.24.2022.04.15.18.26.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:26:27 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="TYCS/5tQ"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kgJ7Gxor; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 55B08140745; Fri, 15 Apr 2022 17:57:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351832AbiDOJoz (ORCPT + 99 others); Fri, 15 Apr 2022 05:44:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351815AbiDOJow (ORCPT ); Fri, 15 Apr 2022 05:44:52 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEA62AC042; Fri, 15 Apr 2022 02:42:23 -0700 (PDT) Date: Fri, 15 Apr 2022 09:42:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1650015742; h=from:from:sender:sender:reply-to: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; bh=OaWHcjI5jzSN+btLdV7n53XabIHh5QmAWpRah4D530Q=; b=TYCS/5tQUUepLaVDvKZBUm5an8Vfd7DOBIfbCHVTotatqJMg/qiE4SfQ+nluZbeTaZnqKx guOyhfUSEZj6UJTJCcIIwRZI6q+dV0dAK0j5NsdtdmzKn5XAtin6vC0+nNJ3UMZDLthgbd pel0OPj3i/hpG21NicDED6/IfMuKLHjthk749Vk6qrozwN/+jVkTs26BueMtS9HJw+kJOx J+fD/oIg+pZ48W+TEtunpY/aeWeVU1+OwsmmIq3v4I+GKBE5Cq/wlinE3MpTuBwX4LREa8 XnjTW7m+8RFC1CUTcMErO9dCwGxzpuQZ2hSBO0RKKzzXIabOCZWAL9kPAVxtNg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1650015742; h=from:from:sender:sender:reply-to: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; bh=OaWHcjI5jzSN+btLdV7n53XabIHh5QmAWpRah4D530Q=; b=kgJ7GxorN7KCcZ8OppF3/DUR/xqUGeZAN/MJe1Qrt2rgA/SoxLHrPgOX/Kq7kJsSh6DSFo 8yuDEywmtT0htnCw== From: "tip-bot2 for Brian Gerst" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] ELF: Remove elf_core_copy_kernel_regs() Cc: Brian Gerst , Borislav Petkov , Thomas Gleixner , Andy Lutomirski , Michael Ellerman , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220325153953.162643-3-brgerst@gmail.com> References: <20220325153953.162643-3-brgerst@gmail.com> MIME-Version: 1.0 Message-ID: <165001574130.4207.13922320216714992747.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/core branch of tip: Commit-ID: 9554e908fb5d02e48a681d1eca180225bf109e83 Gitweb: https://git.kernel.org/tip/9554e908fb5d02e48a681d1eca180225bf109e83 Author: Brian Gerst AuthorDate: Fri, 25 Mar 2022 11:39:51 -04:00 Committer: Borislav Petkov CommitterDate: Thu, 14 Apr 2022 14:08:26 +02:00 ELF: Remove elf_core_copy_kernel_regs() x86-32 was the last architecture that implemented separate user and kernel registers. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Acked-by: Andy Lutomirski Acked-by: Michael Ellerman Link: https://lore.kernel.org/r/20220325153953.162643-3-brgerst@gmail.com --- arch/powerpc/kernel/fadump.c | 2 +- arch/powerpc/platforms/powernv/opal-core.c | 2 +- include/linux/elfcore.h | 9 --------- kernel/kexec_core.c | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c index 65562c4..4c09c66 100644 --- a/arch/powerpc/kernel/fadump.c +++ b/arch/powerpc/kernel/fadump.c @@ -752,7 +752,7 @@ u32 *__init fadump_regs_to_elf_notes(u32 *buf, struct pt_regs *regs) * FIXME: How do i get PID? Do I really need it? * prstatus.pr_pid = ???? */ - elf_core_copy_kernel_regs(&prstatus.pr_reg, regs); + elf_core_copy_regs(&prstatus.pr_reg, regs); buf = append_elf_note(buf, CRASH_CORE_NOTE_NAME, 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 b97bc17..adcb1a1 100644 --- a/arch/powerpc/platforms/powernv/opal-core.c +++ b/arch/powerpc/platforms/powernv/opal-core.c @@ -112,7 +112,7 @@ static void __init fill_prstatus(struct elf_prstatus *prstatus, int pir, struct pt_regs *regs) { memset(prstatus, 0, sizeof(struct elf_prstatus)); - elf_core_copy_kernel_regs(&(prstatus->pr_reg), regs); + elf_core_copy_regs(&(prstatus->pr_reg), regs); /* * Overload PID with PIR value. diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index f8e206e..346a8b5 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h @@ -84,15 +84,6 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re #endif } -static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs) -{ -#ifdef ELF_CORE_COPY_KERNEL_REGS - ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs); -#else - elf_core_copy_regs(elfregs, regs); -#endif -} - static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) { #if defined (ELF_CORE_COPY_TASK_REGS) diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index 68480f7..be4b54c 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -1078,7 +1078,7 @@ void crash_save_cpu(struct pt_regs *regs, int cpu) return; memset(&prstatus, 0, sizeof(prstatus)); prstatus.common.pr_pid = current->pid; - elf_core_copy_kernel_regs(&prstatus.pr_reg, regs); + elf_core_copy_regs(&prstatus.pr_reg, regs); buf = append_elf_note(buf, KEXEC_CORE_NOTE_NAME, NT_PRSTATUS, &prstatus, sizeof(prstatus)); final_note(buf);