From patchwork Mon Apr 17 10:46:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 84169 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2032730vqo; Mon, 17 Apr 2023 04:04:25 -0700 (PDT) X-Google-Smtp-Source: AKy350ZPUPj3AdTpSb6PFsPPsjc/Rg7Hvp0FQh11j0dT2OA4VrXp7H2PO037xjP3qL3p+i4EXyFE X-Received: by 2002:aa7:8887:0:b0:627:ea7a:ff46 with SMTP id z7-20020aa78887000000b00627ea7aff46mr20775879pfe.16.1681729465614; Mon, 17 Apr 2023 04:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681729465; cv=none; d=google.com; s=arc-20160816; b=gHqn03KlNW7dbTFEXtSs27lMslkqg2b4V/Ubrl0dDx371Xrm7wWu58TJ3zFPJBLAMy aIq1EHPoV6u7HGC1/JUfWYsIReHngJmxsXrjf0UA3ZbGS/4gmx7UM3wFquWmRTBLC9/5 /UhGnaU5yWQsaicoUjQFh1I8RDQXgYEcff0qLcoRKLWBsdRK/rdrwWYnNtOuWjSnQkWl kCLmib+QBCL8YiOK4MoqxN20gX6TNc0J6JxawDuG/fuFpqUtMTm2e3drJiqIX8czR2mk nkn4OWdDB/LVMVsw+X3vhxKjWxSPfM5KPILeQDCknztvFVzAWTJcGqbgAsUiQ75rw+lK G8sQ== 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=DMJ+cbokOctSN0U6wHjIbInp6iX43XTC0mQ1d+BTzbg=; b=ZXK/eoZS/2m026RrCEXd41E5s0z7uDcrNtq0ahWs9ERROnGDeEdWyR+qmpaM+nELjL tYHsIFN1vt515DLPzHrOLTVEdPqp66DrdbJstZUClS7kxdghyG3A6xeHQcY4iFWl3euf FFrJrPu/+3ty15LqxpE+0xinpsLZwa4Z/nUNMVG72TSJQMrphbg4lhBMs+4lH+Wne1PY U/2JeLp/3+RTFr9v5oJ8VHEsly9kyconCDtY/GSf3h6rTC/mKu7OM5eBxcdOQBxSq860 lGIjQaNpPBcT5YkX8S07iumajzvtToL8K9Tgwbk+drxclkut79Xj1sD+hGYwDYhWMt34 698w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wDEBJ6Vc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 199-20020a6305d0000000b0051369870273si12519964pgf.11.2023.04.17.04.04.08; Mon, 17 Apr 2023 04:04:25 -0700 (PDT) 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=@linutronix.de header.s=2020 header.b=wDEBJ6Vc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230242AbjDQKuz (ORCPT + 99 others); Mon, 17 Apr 2023 06:50:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230232AbjDQKun (ORCPT ); Mon, 17 Apr 2023 06:50:43 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AD581737; Mon, 17 Apr 2023 03:49:59 -0700 (PDT) Date: Mon, 17 Apr 2023 10:46:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681728408; 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=DMJ+cbokOctSN0U6wHjIbInp6iX43XTC0mQ1d+BTzbg=; b=wDEBJ6VcRx9pzel12ZIixHs/KB1eWrkf43cuXt9PWu5MCrr5ghBXbYwOxQCfUJzcuA0j9w dKbkr4AP+P/r/i4yMPN9iGpSDQo/6T7T4YMOgq6KAdGMrQ5aD3xNGXU7BmS9Zzcuv3cgu0 f9MbQ4rgOStO3DKmL5kHQgyDS74XHVTlkm1AqZz3LR9agZc8C0CgitLmVQ/WEvfeFTPuCg QEH1/qEZD/yI+4fB8t4uSAWHL3LSPTCkcyxnGhFqaDPv0CbqfUm4I045er6mQqUDUcJrkG /8Z8ukx0EjZ990Qs696iYtpM0QP5mTt49QM1vdTsj8NtzMUAsdjoMCXSAQV1YA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681728408; 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=DMJ+cbokOctSN0U6wHjIbInp6iX43XTC0mQ1d+BTzbg=; b=k3HrFrko+wBbrv4Q8F85qGSgG/3MzFL4ifc9hj5VvwMqkdlmAc3vbphhS5sM9C8I+VtPE/ xHLgMa/a+GStpcCQ== From: "tip-bot2 for Josh Poimboeuf" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] x86/head: Mark *_start_kernel() __noreturn Cc: Josh Poimboeuf , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <168172840758.404.8391667372410527352.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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?1763017209482249540?= X-GMAIL-MSGID: =?utf-8?q?1763421156177914472?= The following commit has been merged into the objtool/core branch of tip: Commit-ID: 4208d2d79837ef70f260d6170e3ac7fd6fde7788 Gitweb: https://git.kernel.org/tip/4208d2d79837ef70f260d6170e3ac7fd6fde7788 Author: Josh Poimboeuf AuthorDate: Wed, 12 Apr 2023 16:49:33 -07:00 Committer: Peter Zijlstra CommitterDate: Fri, 14 Apr 2023 17:31:24 +02:00 x86/head: Mark *_start_kernel() __noreturn Now that start_kernel() is __noreturn, mark its chain of callers __noreturn. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/c2525f96b88be98ee027ee0291d58003036d4120.1681342859.git.jpoimboe@kernel.org --- arch/x86/include/asm/setup.h | 6 +++--- arch/x86/kernel/head32.c | 2 +- arch/x86/kernel/head64.c | 4 ++-- tools/objtool/check.c | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index f37cbff..f349562 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h @@ -125,11 +125,11 @@ void clear_bss(void); #ifdef __i386__ -asmlinkage void __init i386_start_kernel(void); +asmlinkage void __init __noreturn i386_start_kernel(void); #else -asmlinkage void __init x86_64_start_kernel(char *real_mode); -asmlinkage void __init x86_64_start_reservations(char *real_mode_data); +asmlinkage void __init __noreturn x86_64_start_kernel(char *real_mode); +asmlinkage void __init __noreturn x86_64_start_reservations(char *real_mode_data); #endif /* __i386__ */ #endif /* _SETUP */ diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c index ec6fefb..10c27b4 100644 --- a/arch/x86/kernel/head32.c +++ b/arch/x86/kernel/head32.c @@ -29,7 +29,7 @@ static void __init i386_default_early_setup(void) x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc; } -asmlinkage __visible void __init i386_start_kernel(void) +asmlinkage __visible void __init __noreturn i386_start_kernel(void) { /* Make sure IDT is set up before any exception happens */ idt_setup_early_handler(); diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 387e4b1..49f7629 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -471,7 +471,7 @@ static void __init copy_bootdata(char *real_mode_data) sme_unmap_bootdata(real_mode_data); } -asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data) +asmlinkage __visible void __init __noreturn x86_64_start_kernel(char * real_mode_data) { /* * Build-time sanity checks on the kernel image and module @@ -537,7 +537,7 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data) x86_64_start_reservations(real_mode_data); } -void __init x86_64_start_reservations(char *real_mode_data) +void __init __noreturn x86_64_start_reservations(char *real_mode_data) { /* version is always not zero if it is copied */ if (!boot_params.hdr.version) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 9aaad9d..a436bc1 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -225,6 +225,8 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, "start_kernel", "stop_this_cpu", "usercopy_abort", + "x86_64_start_kernel", + "x86_64_start_reservations", "xen_cpu_bringup_again", "xen_start_kernel", };