Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2781618iob; Mon, 16 May 2022 06:14:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/nNgI3fWDhx0au51zfdOaR4BX9o5Gls8wu+Gn247PWDncLuK0LdV+zuYvU2abrB9S14Mp X-Received: by 2002:a17:906:7311:b0:6fe:178c:a6ff with SMTP id di17-20020a170906731100b006fe178ca6ffmr11165807ejc.489.1652706856433; Mon, 16 May 2022 06:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652706856; cv=none; d=google.com; s=arc-20160816; b=FDp4tuyMhF9DgjALlLipOvlXYi0z3i4C0pzKcn11g812AK3xuklU92eMq/gkCVnNXA 0G0gj9Ad7q+FsipiTvDtCyAgkPuPdaxEous6TAcoumLCVMdC/zSQnp8cHK213vPF4Nxk QrS0+RFA1UbhzUuIVjGdkieglyb0AfHTTYW70OsMJ6d6xJvoImPWct/R5NTUcVk3s3rN T7SfUJTtjeeDPYYK2UQxpFNIDuFVfslLmzsCztNjMW1rAnnGR1EpB+J1gmF1+YR3FHXE jMWoZQ0O3gmgu+HCCNapBO6HAqb++aDCrU8nBW2ZNsBbZFY21kFtjv5lin5EFUORfFJ5 pMzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=t9B0ELg8h6PY+Vl2TDucjtXSCma3zXaus6HyZVuhPIE=; b=fijQE+GvYfHX6ubZVstFBPwuRRWUvF+ZOHti9at9b0y+8py3p1FzOJ21rPmqXXYgTm ZNjlnOXANQ9p/gCRsi/NWCmVUQ4ewj4179Mesn7Y1IJ3T+8vyin7CH5kzUouD7/oPQ8j wm/KPhiLXARQKmB7TIzGMYCPwNj6qLc8+s7OuFQm9Xu1K2b/kTI8wV/ZLNlwTbIKur5G oCtIjkJ5Tqkz3unlkWSeHxXvjw+CMhtiDKPAOCwKJg9qbQMgEUVFlzM3WjPrGjgzel4d rZxPDaA57gH0unb5VaNrLb5/glN7um8zkNIn6rHc/5LMcMi0qhIcJIzCE+1UsTCuXaPS I60g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W1eubUSb; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk30-20020a1709077f9e00b006df76385be4si10214839ejc.132.2022.05.16.06.13.49; Mon, 16 May 2022 06:14:16 -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=@chromium.org header.s=google header.b=W1eubUSb; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230194AbiENV6D (ORCPT + 99 others); Sat, 14 May 2022 17:58:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236066AbiENV4x (ORCPT ); Sat, 14 May 2022 17:56:53 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08DB831527 for ; Sat, 14 May 2022 14:56:52 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id l14so118813pjk.2 for ; Sat, 14 May 2022 14:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=t9B0ELg8h6PY+Vl2TDucjtXSCma3zXaus6HyZVuhPIE=; b=W1eubUSb/5LGT0PX48eWAAjFP3e+45qNMMJH5elMun/Sun50qtQzJU6DnSdp6Eg/+a sZUGxqEPzvzsqRpYUlnPpUwqsnDjU3f8F0t6paJwsZDv37wZBcBScTKMeytTqcg+gQ85 fq0u+JX10bVU5Nl4qNuwnXTR65D2Gmk7mjZv4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t9B0ELg8h6PY+Vl2TDucjtXSCma3zXaus6HyZVuhPIE=; b=ixIHzZwrb6nGRDaGrssDKPbSjaxpDQozqzqjHUF5QhmS6gPJtCT+9Pvg15YSxLQaFg T6UpMjMpUPkvWwv2RBKXE7n/IAtxHALDFNisVI6poRMxVOYeDMIRGzlQtidx0G8WrAcB yud4EvaLg3FT8whrEg3n4iJKxTRMivvaXeys9Bb7Ndf75NU3KrGq8quSDarXCVWWxetT 7Ycip/S1DXSgInegfQzm5LW2fa3duLsHt5u/KNEQ/PBy6lA/iWN/H0B2bG7IQ5TzKdXO Fl/X+2ySmbI4ne1yqjo4ErKrnYu7Nuf3/h6BT8F1NgdbRoxp6qM6M4/WbmUzqVq8VcyW EOLQ== X-Gm-Message-State: AOAM5320yf6btzqThOD3wkPM+nMQcvARVQzlzIGjY/qzO5k3v6zK3LrR RNZEKcQkuVKk5pj/nBPr3XzAbg== X-Received: by 2002:a17:90b:4f81:b0:1dc:69a0:432b with SMTP id qe1-20020a17090b4f8100b001dc69a0432bmr22733023pjb.203.1652565411533; Sat, 14 May 2022 14:56:51 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id s16-20020a63f050000000b003c14af5060fsm3886055pgj.39.2022.05.14.14.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 May 2022 14:56:51 -0700 (PDT) Date: Sat, 14 May 2022 14:56:50 -0700 From: Kees Cook To: Sami Tolvanen Cc: linux-kernel@vger.kernel.org, Josh Poimboeuf , Peter Zijlstra , x86@kernel.org, Catalin Marinas , Will Deacon , Mark Rutland , Nathan Chancellor , Nick Desaulniers , Joao Moreira , Sedat Dilek , Steven Rostedt , linux-hardening@vger.kernel.org, linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [RFC PATCH v2 15/21] objtool: Don't warn about __cfi_ preambles falling through Message-ID: <202205141456.72950C77B@keescook> References: <20220513202159.1550547-1-samitolvanen@google.com> <20220513202159.1550547-16-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220513202159.1550547-16-samitolvanen@google.com> X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 On Fri, May 13, 2022 at 01:21:53PM -0700, Sami Tolvanen wrote: > The __cfi_ preambles contain valid instructions, which embed KCFI > type information in the following format: > > __cfi_function: > int3 > int3 > mov , %eax > int3 > int3 > function: > ... > > While the preambles are STT_FUNC and contain valid instructions, > they are not executed and always fall through. Skip the warning for > them. > > Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook -- Kees Cook