From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 027FD2F25 for ; Sat, 14 May 2022 21:56:51 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id n18so11114132plg.5 for ; Sat, 14 May 2022 14:56:51 -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=UzEc79j8AjgmtnYhq+y/+BW9R9AHQWOyNxKvlH84T77p76qCcgLZr+RqrnT3keHhho DiLaIe0k/hNWGEZypRSPn4/z8Jg2JRc5CwJ5cWE4MfVZ2MdgDyEM+589tIqWbQ+XqCMv K6kmwngwufHPXDLXEgGxjve8EXMULoY41pKWBpFR/+xUwfqSw3LVb14s3Gd7JB9wAEH2 1rXHMrmB3b/9niH2ht/e9D6jQJ2usvY7pJz6KeLu/Rt1MqzawL9qBmtWjbja52Fjf4QL NUuMvRGTQ0VthNLFKN5CJ7hWLGyWtteUwc1J2MSVCSRGtoEiBOkhzoVDxmQoZZU/8nNR 5AaQ== X-Gm-Message-State: AOAM533SXSOs6O6h8Gr9UFnJ1GRDOI7eieRKGauMUdseWVtaJ8ol2MsE 8JcyYe2HYv8teHdASBH+AMOsHP6Sovcdxw== X-Google-Smtp-Source: ABdhPJxYql9CKgnQAH/6nysRco+nTc9rw86pT4JEKLv1mVouDl0G3T6mTm3JsTqv8m6tl1+a5OAhsw== 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> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220513202159.1550547-16-samitolvanen@google.com> 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 21230C433F5 for ; Sat, 14 May 2022 21:57:54 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Gh0C4MSCz+AAes421nhlyP+/bgy32uaogyBQVw2LX+A=; b=IrYcFpoXiG/Eyw K7iXbpalx1CyPhJvu+8z6EqmVL7eLhU9RfOl6IivLqCbxMmadiFWQ2qK/E8uunshIuLE0XgX4INIL mq/uH4w9rxtfEcw8hVxuOMg1b/yK+lmG+VKDvPfNm5dbeYaFaLv0AGXDdAW8uNLgvMzAz+SbuZhqM Gw0i8wxuXmSDJTw5qJoHdIBU4oNHTPYcrwBVCzxBARGaBwGF+YMSKpPXNjY1h29AZqvaAvtdMPu20 qz6FNsu/hCgGar1U4yNbsVAcO5yqQkUY/yGIjcuDfRlaU/nuqPZxnTWlZKyOFLKi/erGJEzVxE8Pj LfucOuM/DrSk0KurNzEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1npzkx-002PLW-DD; Sat, 14 May 2022 21:56:59 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1npzkr-002PIv-N3 for linux-arm-kernel@lists.infradead.org; Sat, 14 May 2022 21:56:54 +0000 Received: by mail-pl1-x62a.google.com with SMTP id j14so11119411plx.3 for ; Sat, 14 May 2022 14:56:51 -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=P9Fzo3V+efGmk+pvGA/4QtrzCtbFkeFrbep0wWoryi0A33lip4kslrNjrlhNd/RT+a KEhih7hO9IiNnZoLPByOXrbF5hzfbsNsx2yVKJMxIdGqVWMf1wNSo5Pfg4MLnYT6zs+k e6sxOA7Pdn/i46DEBMyzVqTC+ZAR2vUq0NpQoVL11s6Os/ig3U3mXhTfUP9YACnhoiv/ esCc4Meqp3CQCxnjSY421BycUzhHlW0A+HrjKTn5EEtYWsV7awEYj7WgeEzF1OSv3zdk sIIRYVBXYSKYujcXy/ZAwk+Ga8wiR1WDWHeY+7RzZ187Ub4rbE+ZdhsanesoCcXFM8/F oQrQ== X-Gm-Message-State: AOAM531BHmtYPc3unxLNSEZDeE7yVjH9WYgEqx7DtE1acZxb5qWnyRRh Tzt33d5YLKYOttDZVzyxPPr0nA== X-Google-Smtp-Source: ABdhPJxYql9CKgnQAH/6nysRco+nTc9rw86pT4JEKLv1mVouDl0G3T6mTm3JsTqv8m6tl1+a5OAhsw== 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-Disposition: inline In-Reply-To: <20220513202159.1550547-16-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220514_145653_776450_282C1AFB X-CRM114-Status: GOOD ( 12.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel