Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp931458pxp; Wed, 16 Mar 2022 21:43:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKT+9l5QouQZE/VC552BPWXA6hAko3YynYeEO4boZe8WuWj1vMGXmtPUIL9c+DHEAPHKGH X-Received: by 2002:a17:902:e80c:b0:151:e743:903a with SMTP id u12-20020a170902e80c00b00151e743903amr2777458plg.65.1647492225935; Wed, 16 Mar 2022 21:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647492225; cv=none; d=google.com; s=arc-20160816; b=dJ4WQDXOx9MpBmb+7FuTWwvvGDp1w+zieXE1D0BGStJSfTeY3scBdhksVf+RfqqzOb u8C1sRm4UWOIdacGR5Gy0mMKu+oC/9ChAaisNdX0NdVjRskiuC0v+8EHgAYtsmuQmgcl yQKZ3B9H3jfv7BlpFG9ZB5r0GYYFb5kaPxdiKxubRpKckicidAByPvogifRg1a6afpH6 OIAGt+uldIPR1oL27Mwy6aWIWpAhOM8NdR+LQn49bTiyQQpIfQiU4WzreLGWGBWUM3Gi M47bYF5YSc7ZIEPSOl5jxExulETVVk7DH2dIeoLtDIQCWvaP1mc2J3fE1dbLAHtXAcA7 wfag== 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=6wSbh0Isr6f6GhNiCHqlwTTKpJ3n6qCgbiX3p6rE8r8=; b=ZWCkEFNMxZileqmHbVlkcCsvR720IGEG6MIzNl43xxi7ag1LcQTbSysPyvfCwPmsTf ox++zo3IDG7gXT+j02RHgNUiIb8iDf3uLTZ3Y68sG3d+MSLbqlLlbzZbjzWnVCj7wyK9 Vt0hh4SKlue8vp7AXASl/rkBtGa6E8ae48OCllEl9WIICQ0xkF5RS4neCzpa1tcdTAL+ PbTGrP95A9Mp9nS9luSP1T7FFtdFlQ76xu689XkyfeGaKKfqJJIRcIZMuHeA3lQkMl5F LnrSvIaW4OjmiugILw+UOjRY4VM7v9FM7/twX78yrGagtzmXQ7t+uAk+hkPH1typ2Ibc dTKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=C4ZmKleI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Aep2PmT1; 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 y9-20020a056a00180900b004f7203ad9b2si4172702pfa.373.2022.03.16.21.43.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:43:45 -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=C4ZmKleI; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Aep2PmT1; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9CAD113858A; Wed, 16 Mar 2022 21:06:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347314AbiCOKqF (ORCPT + 99 others); Tue, 15 Mar 2022 06:46:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347266AbiCOKpG (ORCPT ); Tue, 15 Mar 2022 06:45:06 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79FB833E05; Tue, 15 Mar 2022 03:43:50 -0700 (PDT) Date: Tue, 15 Mar 2022 10:43:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1647341028; 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=6wSbh0Isr6f6GhNiCHqlwTTKpJ3n6qCgbiX3p6rE8r8=; b=C4ZmKleIMtXo3G5NP5xreM+KEc+EM2lUtWVYoM/0alHuvc4ykqRxLD3A0tcTpryb/m4aUi ZqtR3JSCipAlekW6Q5CsHvTvU7N4rA2WRvaJc+iuqSHi3h3NMy/34cOVOdVdWmPt2bVXEJ iDD9eWj7PDM3O+kbBSmnYHSijPL6H1qve2XKI+o7lG0oXBQd22h46o2VTCR8C1+SypKxQ/ ZRFCm7ZwZe6zjOFpJ3L5ElRfK7m3taI4MxnKQxqFU4W8VBOpstEZK1BDCJBACkGrYXCplx PkxwLVofDJXKN2LsaBFQOQBsooRJzUybMK6aJZ3iIsjgmsjjeUjIYJMN0sETXg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1647341028; 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=6wSbh0Isr6f6GhNiCHqlwTTKpJ3n6qCgbiX3p6rE8r8=; b=Aep2PmT1mmh6bccUvACcFaWKUTWn0Jwjab7tJtRiE7dy88gBSTeaMvCQ1tzzjagevi4+b7 eEHbqOCUt5k4rFBQ== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/core] x86: Mark __invalid_creds() __noreturn Cc: "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: References: MIME-Version: 1.0 Message-ID: <164734102762.16921.16778856567952494696.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: 105cd68596392cfe15056a891b0723609dcad247 Gitweb: https://git.kernel.org/tip/105cd68596392cfe15056a891b0723609dcad247 Author: Peter Zijlstra AuthorDate: Mon, 14 Mar 2022 17:58:35 +01:00 Committer: Peter Zijlstra CommitterDate: Tue, 15 Mar 2022 10:32:44 +01:00 x86: Mark __invalid_creds() __noreturn vmlinux.o: warning: objtool: ksys_unshare()+0x36c: unreachable instruction 0000 0000000000067040 : ... 0364 673a4: 4c 89 ef mov %r13,%rdi 0367 673a7: e8 00 00 00 00 call 673ac 673a8: R_X86_64_PLT32 __invalid_creds-0x4 036c 673ac: e9 28 ff ff ff jmp 672d9 0371 673b1: 41 bc f4 ff ff ff mov $0xfffffff4,%r12d 0377 673b7: e9 80 fd ff ff jmp 6713c Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/Yi9gOW9f1GGwwUD6@hirez.programming.kicks-ass.net --- include/linux/cred.h | 2 +- kernel/cred.c | 2 +- tools/objtool/check.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/cred.h b/include/linux/cred.h index fcbc688..9ed9232 100644 --- a/include/linux/cred.h +++ b/include/linux/cred.h @@ -176,7 +176,7 @@ extern int set_cred_ucounts(struct cred *); * check for validity of credentials */ #ifdef CONFIG_DEBUG_CREDENTIALS -extern void __invalid_creds(const struct cred *, const char *, unsigned); +extern void __noreturn __invalid_creds(const struct cred *, const char *, unsigned); extern void __validate_process_creds(struct task_struct *, const char *, unsigned); diff --git a/kernel/cred.c b/kernel/cred.c index 933155c..e10c15f 100644 --- a/kernel/cred.c +++ b/kernel/cred.c @@ -870,7 +870,7 @@ static void dump_invalid_creds(const struct cred *cred, const char *label, /* * report use of invalid credentials */ -void __invalid_creds(const struct cred *cred, const char *file, unsigned line) +void __noreturn __invalid_creds(const struct cred *cred, const char *file, unsigned line) { printk(KERN_ERR "CRED: Invalid credentials\n"); printk(KERN_ERR "CRED: At %s:%u\n", file, line); diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 9896562..0c857e7 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -183,6 +183,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func, "cpu_bringup_and_idle", "do_group_exit", "stop_this_cpu", + "__invalid_creds", }; if (!func)