Message ID | 20220908215504.3686827-18-samitolvanen@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 25712C54EE9 for <linux-arm-kernel@archiver.kernel.org>; Thu, 8 Sep 2022 23:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=p6RcDEQ/eenkxqxbvDTFuTw/zOlhPNJgTUDaW/fDDBM=; b=0e0DqU2aDBJwokUakEsrRXOZsI ZIKu4VYomyCoi4eX/kT2iRhIwYSXsKprtSaVbvt7CSmagZgo8W0EBpu7m5FetFC+xCmUlmH0ltRqi O+ilTzZyUKibUuk4KU1TZn1+tGKMzQlKGCMI8vmsDf0kt8izyFmlRsj4t5WJhLCBeHUotaPg0h5RW krcjRJnlYYbmZkB0hXjFqLEbnCxQU0knA3M9r5jKs1BjiDcd+9oPZiEzP4v0ap5u3tyiagHIgaYGG ioBTKZh1QlkF/k/VHFyrVt/SzhDa1gryAz/5de8+tU6QQN0X4/EJD9mJEDPkfx7rjQkp5gunAOeDr ABduHo0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWQYZ-009ceZ-8K; Thu, 08 Sep 2022 23:03:35 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWQYN-009cZb-NY for linux-arm-kernel@bombadil.infradead.org; Thu, 08 Sep 2022 23:03:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Cc:To:From:Subject: References:Mime-Version:Message-Id:In-Reply-To:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XmniUTEr3IsWekZR2qFDZKEfj9hJcfqgCneNiF7ztZE=; b=VqvquV+FU9mm4s392Rdigs2uKp 2xVWhaBQXd1pnc5np88kUXJBNygJk+AAKnKQzcAguv1efSHkLm5TTPJBScuODuWwcd6u1gUlCv0IA fDajf5WMjFxt3sp8ASUEXuNq8vrE9N2oWeXekHk0VD0GbQde9Rb08swnQJESyc4su1zumxKzajXmC QsQ3cMwHsaaMKGiFUNCebh59ABsfKW0TQzqIIv/GecHCrjTjUwPDqSJFBDy77Cy1v+tgyJ1BzXLg8 lnKolI2DDkvlxaPfj6UUnjoBKfS29oSKuQbbI3EaO5n3P75YahrjY9IrM72SpXGGHacMK3yyXTXvo gsQly41w==; Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWPV2-00Apm1-Ri for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2022 21:55:54 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-3452b545544so110526337b3.3 for <linux-arm-kernel@lists.infradead.org>; Thu, 08 Sep 2022 14:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:from:to:cc:subject:date; bh=XmniUTEr3IsWekZR2qFDZKEfj9hJcfqgCneNiF7ztZE=; b=WCxXiMf9jt0TJXqJVxEGpO5FIe1m1i3ZGCw5CoV/rJ85nw+sR7A+6ka1r8pSYvcykj fdhPJfWapSH0tUHrJ7JwfesE8ueKIfcYHTxrBbgThkGTRj8VuUmZhwmCQ3RzlNEM2ecD z8ix+vkJAFymmihF+AY2LlKW9zCy2OxSuz73nD3s3LFpsgclOFOYtOtx3tG5ZwDIz+bP A+khvfFMbTOSY81mGX3NqvYc+QXhfp46q/BRrc+yAFDotGxiveN3rjh0XY2tB1HOxaXY FYx8Y77WPZ5fIYqlsyAut8OvfzqgiV3dRvDT5sKW7C/HCJM6xuapQF9Yzw/zFOz0vgK0 uWcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:references:mime-version:message-id:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date; bh=XmniUTEr3IsWekZR2qFDZKEfj9hJcfqgCneNiF7ztZE=; b=SQAumPGr/BWOtWF440speZ0splJTBxWo1MLcooMbGgLQcr1TRQ5f2Huh8tOaftTWvU 8LRo38aOg4syNPd2DN2J3+xzM7PrDriGOW03GfoTNKXH8fpNld9J0CUGWKIF363BwN9Q c9rowQa2S8F43nNyVBizEhagzNWUBdXiSPMWWKthzcnTFzi6FN9yQopnfobsKzevYIZn E/p23rraMws0pXUNtCn9XNR+uribNvAcl/UpnD4m6bktEpyVAlTdr0Ac96dezNmqUUdL dpI7wJDKhw9RY6ZfT3sqKoj60Nl8eIwdlPh8LNaj6d6Eqd82gsIY9G5O69sFTJmNjOOA 0EZA== X-Gm-Message-State: ACgBeo3LzpHB88OLEdOU8fQB9KAbz6sibHwcgamzNv0tKhN9N1A69xJQ Ma4lHaAwTEXX6lawb6pFEQYoPbClzl1Anh0EjfQ= X-Google-Smtp-Source: AA6agR6M76LG+TWjK8L+F7Pickv1R6NBQMbIyPbnehQFyZI7o5/G4d6MfhU8IvsMdeYW6PT4y2h9Gv6HjQVCTyH+TGA= X-Received: from samitolvanen1.mtv.corp.google.com ([2620:15c:201:2:a4e4:e6ec:9fdd:1bdd]) (user=samitolvanen job=sendgmr) by 2002:a81:8a81:0:b0:33d:829f:644d with SMTP id a123-20020a818a81000000b0033d829f644dmr9392736ywg.439.1662674151325; Thu, 08 Sep 2022 14:55:51 -0700 (PDT) Date: Thu, 8 Sep 2022 14:54:59 -0700 In-Reply-To: <20220908215504.3686827-1-samitolvanen@google.com> Message-Id: <20220908215504.3686827-18-samitolvanen@google.com> Mime-Version: 1.0 References: <20220908215504.3686827-1-samitolvanen@google.com> X-Developer-Key: i=samitolvanen@google.com; a=openpgp; fpr=35CCFB63B283D6D3AEB783944CB5F6848BBC56EE X-Developer-Signature: v=1; a=openpgp-sha256; l=1889; i=samitolvanen@google.com; h=from:subject; bh=NWDsac0IgzNSFTJgx7iH+qos7yriFkDjm7ciN3deLwc=; b=owEB7QES/pANAwAKAUy19oSLvFbuAcsmYgBjGmS2QtXco+6cnttk3ziU1CPssT9FS0Gu8RLffJMX DuiPTDqJAbMEAAEKAB0WIQQ1zPtjsoPW0663g5RMtfaEi7xW7gUCYxpktgAKCRBMtfaEi7xW7laHC/ kBCEQg3rEEpwp43GQ48GjqbCieliDghyyZPPBekjsBnBNrdnG8Vm9GOSBSH6jHBKRoAaPBYbHnmBxJ hbAnIoe8iH/1aMV4X2XS0DnwRarAgGvwIT41btmUEvxO+gDCKbg/1aKwS3k77DRva2rgu6fxSqbY2s OprIgnrE7+GivPv5e0Mmvr0Hm9YIpYVHRLl+3eLqWZGc9nzlWEmVmnZkVM+RbbwCUfzbxeQ1BY3ykL ZvfY5iLCkg0vVolw3s6qlVYn2LwCoGvB66ee8Z5DiX8ZyGfNaPypyV/1qr5xvpAfJroafshKOsowU5 +v/x6ze8NdAuOZ+7YdikfQwEELuZ9XXt63bCQ+UD/J8pjGQ8KBUSaXQLOKPmBga5+06qVi4a+PEfeq M84OhWdJiTRngnFB9fEWgGdP8L+iNYPNVB/x/IwOzi7A2pgIj0eJgShn2uIHPaPynu8nokZaaRX8EM Lm6ye3lWt59SFbyI0JEQFniLfVDG47lRJQZrTQ4ptFSUs= X-Mailer: git-send-email 2.37.2.789.g6183377224-goog Subject: [PATCH v5 17/22] objtool: Disable CFI warnings From: Sami Tolvanen <samitolvanen@google.com> To: linux-kernel@vger.kernel.org Cc: Kees Cook <keescook@chromium.org>, Josh Poimboeuf <jpoimboe@redhat.com>, Peter Zijlstra <peterz@infradead.org>, x86@kernel.org, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Joao Moreira <joao@overdrivepizza.com>, Sedat Dilek <sedat.dilek@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, Sami Tolvanen <samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_225553_188994_2EFF059C X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KCFI support
|
expand
|
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index e55fdf952a3a..48e18737a2d1 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3316,6 +3316,10 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, next_insn = next_insn_to_validate(file, insn); if (func && insn->func && func != insn->func->pfunc) { + /* Ignore KCFI type preambles, which always fall through */ + if (!strncmp(func->name, "__cfi_", 6)) + return 0; + WARN("%s() falls through to next function %s()", func->name, insn->func->name); return 1; @@ -4113,7 +4117,8 @@ static int validate_ibt(struct objtool_file *file) !strcmp(sec->name, "__bug_table") || !strcmp(sec->name, "__ex_table") || !strcmp(sec->name, "__jump_table") || - !strcmp(sec->name, "__mcount_loc")) + !strcmp(sec->name, "__mcount_loc") || + !strcmp(sec->name, ".kcfi_traps")) continue; list_for_each_entry(reloc, &sec->reloc->reloc_list, list)