Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3798098rwe; Mon, 17 Apr 2023 03:51:28 -0700 (PDT) X-Google-Smtp-Source: AKy350aGx4QcrViFhDkrXe90TzDGB4XRRYurckH3zH/+Jt1vGhpp8A4AJ6TSEwO6Ig0dhPSimTZo X-Received: by 2002:a05:6a20:8f06:b0:ec:9437:84c5 with SMTP id b6-20020a056a208f0600b000ec943784c5mr17314264pzk.37.1681728688372; Mon, 17 Apr 2023 03:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681728688; cv=none; d=google.com; s=arc-20160816; b=yH0G5TlHszZUgFDPslPCx7dCThP68n2xxaCY/HcZRTUhgdtl9oZgqk2Nl2s8FkpSnw DYLU3dx1eLjcWyf3dC7ssFeNzeLdt36T5Ud12XRY01++q/hoUpDaagtkWpMT9fbDm5Cm 0zziletNYMZJrtHD1Hn3uvkNbzHZzcCiCLXzGccIySSPvhHTCaDTF7v6qHXFazpyS3PJ Nsu/NlOMZy1ThTYzJ+13fkMqQDDdrO01LDX71Kqmm9Zs5+IuKzp/TiwjQ4xjd603javZ GwbWQGmrpkKAWxK1VeIpGNZAUt858jm6HQ8/xPkVW6zqcB3WjQmfC7SpG4qps2E2/SW5 aHuA== 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; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a63f204000000b004faf33e2755si11724127pgh.349.2023.04.17.03.51.13; Mon, 17 Apr 2023 03:51:28 -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; 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 S230323AbjDQKuz (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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 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", };