From patchwork Thu Feb 2 04:42:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 51675 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp37663wrn; Wed, 1 Feb 2023 20:45:56 -0800 (PST) X-Google-Smtp-Source: AK7set83miniCGTnmPhG49EuHWpph4IYzmk+MAysb08izyoyD8kBRJEdTDft9CsEcWUJdC7R3wdy X-Received: by 2002:a17:90a:30d:b0:22b:b824:827c with SMTP id 13-20020a17090a030d00b0022bb824827cmr5014434pje.48.1675313156425; Wed, 01 Feb 2023 20:45:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675313156; cv=none; d=google.com; s=arc-20160816; b=TxisUsU9oQIfBt3Yy6dIiuFALgCRSgo/8d80ahRtMf3RPMkNWJT6pFgn07HtHcLN1i amVDdlHPElA59naAEDeAlO/CWOdW1bu3LyeIJbYQnJEtgVJY6n1D1WBhk9InzlXk5epw oaWfHZpiShvLU8twHfaVDVfYlxzK8vcoJCLw5JEmBJai0iOCEyGaD6Z87cqXxH8lnnLe jzVIOpEneAfS1gsLlG3k1G127g4lU9lkwnEu9gSiSh7Y9JCbBSPNDVMiKvofIDwkNFSi g6ZCdboPvKjUCdV/pabC5Zjn5g9a1apXjN9YnsLRPaIfpaTOenTeQlk18TZAy1kgHHRY 4UHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0+ip4U/OqP5VNuiYiDuTDXWGm7K8l7d7AlcU1RpRoOI=; b=EHW5XZxVuOvlDzo2vqT18TsZBcDd25o8ux1lE7+Pd8hRd47/0ThOQl2VrHXwHTZpy9 QOGvf/XYLUpnCYd1n4jNnyhGDePzkf7NG1BvAOw4EU/RKIWxHue/Oe557S9k0uJnz7MS QhM8WdbDwbX+gfxliFW3J3Rz2AXs6Q3LkU2USBAaiHonPawK1I/frDKuKnkw3yXrVVCl z/bf5YItSLb/cKt6m4jYRXtn4p03sp9rgmqeB1gxQHiVTt9qZAl+b16a73la3zwMY0TY CLkBlftbSIvcAtqP5xX77s8eQU6CX5WWcek5jjmSPoDskQeqZuVYTnLR36ac8oJiMGLT PgEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GSlRYvtk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a63af47000000b004e853906f2dsi302879pgo.480.2023.02.01.20.45.42; Wed, 01 Feb 2023 20:45:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GSlRYvtk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbjBBEox (ORCPT + 99 others); Wed, 1 Feb 2023 23:44:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231537AbjBBEoN (ORCPT ); Wed, 1 Feb 2023 23:44:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F56679F35; Wed, 1 Feb 2023 20:43:53 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C86C8B82419; Thu, 2 Feb 2023 04:43:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35618C433A8; Thu, 2 Feb 2023 04:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675313030; bh=w2+gKam0hgvqls1hiqaw8OhtqAs87LqFnf26zQZbz5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GSlRYvtkuUFWe4vbS/HNXihmDyie8RQeqw+ns+JXTbzbI2stS5ZtZmI5tW88p7p9P 3zOUOHQhOab0uZA11IDkNDz4ni3/KlpN58Sj/bTx1yCxg/kwC2ciUBD745WJBkZ8d4 3K67pxTWaYRYojL5FJBo+7yP92zbVNlOnPwEVxy+fQPiNjEk8XfzfgDawCTWIUEzLh nkr8sBUaa/gumUuJLGVa4+EQjjnTJYGkgTDK1r0+RsB3upNATXzjgUHwfocpcQ20zD YVBH086RxKANA2ETy6Zv9M0EBamaTFOxMPdEL9jRbCzhw8Pg6mJ6S9YdF65mnwYPri 8Z9nNa359BmsA== From: Eric Biggers To: stable@vger.kernel.org Cc: Harshit Mogalapalli , Kees Cook , SeongJae Park , Seth Jenkins , Jann Horn , "Eric W . Biederman" , linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH 5.4 07/17] h8300: Fix build errors from do_exit() to make_task_dead() transition Date: Wed, 1 Feb 2023 20:42:45 -0800 Message-Id: <20230202044255.128815-8-ebiggers@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230202044255.128815-1-ebiggers@kernel.org> References: <20230202044255.128815-1-ebiggers@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756693167974598822?= X-GMAIL-MSGID: =?utf-8?q?1756693167974598822?= From: Nathan Chancellor commit ab4ababdf77ccc56c7301c751dff49c79709c51c upstream. When building ARCH=h8300 defconfig: arch/h8300/kernel/traps.c: In function 'die': arch/h8300/kernel/traps.c:109:2: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration] 109 | make_dead_task(SIGSEGV); | ^~~~~~~~~~~~~~ arch/h8300/mm/fault.c: In function 'do_page_fault': arch/h8300/mm/fault.c:54:2: error: implicit declaration of function 'make_dead_task' [-Werror=implicit-function-declaration] 54 | make_dead_task(SIGKILL); | ^~~~~~~~~~~~~~ The function's name is make_task_dead(), change it so there is no more build error. Additionally, include linux/sched/task.h in arch/h8300/kernel/traps.c to avoid the same error because do_exit()'s declaration is in kernel.h but make_task_dead()'s is in task.h, which is not included in traps.c. Fixes: 0e25498f8cd4 ("exit: Add and use make_task_dead.") Signed-off-by: Nathan Chancellor Link: https://lkml.kernel.org/r/20211227184851.2297759-3-nathan@kernel.org Signed-off-by: Eric W. Biederman Signed-off-by: Eric Biggers --- arch/h8300/kernel/traps.c | 3 ++- arch/h8300/mm/fault.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/h8300/kernel/traps.c b/arch/h8300/kernel/traps.c index a284c126f07a6..090adaee4b84c 100644 --- a/arch/h8300/kernel/traps.c +++ b/arch/h8300/kernel/traps.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -110,7 +111,7 @@ void die(const char *str, struct pt_regs *fp, unsigned long err) dump(fp); spin_unlock_irq(&die_lock); - make_dead_task(SIGSEGV); + make_task_dead(SIGSEGV); } static int kstack_depth_to_print = 24; diff --git a/arch/h8300/mm/fault.c b/arch/h8300/mm/fault.c index a8d8fc63780e4..573825c3cb708 100644 --- a/arch/h8300/mm/fault.c +++ b/arch/h8300/mm/fault.c @@ -52,7 +52,7 @@ asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address, printk(" at virtual address %08lx\n", address); if (!user_mode(regs)) die("Oops", regs, error_code); - make_dead_task(SIGKILL); + make_task_dead(SIGKILL); return 1; }