Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3448659pxf; Mon, 29 Mar 2021 02:28:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmCi2HVlg3lYJarVqZG7L3ijS6OYo7X/K8vllZMkEP4/e03Hi2/7r0t5WM2aOvTbWR1aue X-Received: by 2002:a17:906:ad96:: with SMTP id la22mr28605388ejb.237.1617010108447; Mon, 29 Mar 2021 02:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617010108; cv=none; d=google.com; s=arc-20160816; b=ids4AUXzDFEggG0Uuc6qeplj39COlvhP5g0sY6eeo29Pb0bSjNxa+PON50WdPIb69f HhhkcXVc2BLQR0fNQCmvAFOnH5/ZM1kr7gEBvb2tY00K2F2kNmgp7y837elKat1j5QHT 4Sf2BMoO0+vnGGgxv/LK9RhWT5YHgsx8mfMqYF9iKCbY8O+KBzKsyYuZ2BOaI/F+IBjn vSSvtPKKdwuvH1yzlwTfec4ekmo2arPv7givcqnm7+dNcZG8MvvT9Cu2qd0NZ8ss0Z+s P9hJLShMLuI135+oWN/sGIu59xOmwjUtDnlzqHgU96d+YHoLjVGaSVP/rn4C3DHja6wP /sbg== 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=2m63iLs4WAe9lYjvi0CAGkdEF4a/0HxPdd40RsaZgHE=; b=zmKNM7YwiAPgR4s4L7gM8BoAsxynckM7I7LebjUxJ4ubf/RHYsmvZWS3tLZ9Wti3OI S9L5PJ4afEpgdLuDwifV/YTd3nLnM8d9m4Atj+9CxCt2f+UrRq91u16QwYGRaz3gIaJ6 zleGC6oZruO/47uKMk3riW6RkeKA4sKC7+3CLrvtCe63XfdCRIYxwcstpUyJKX6Hb5NJ pXTQqOSehtOKMnfk9eVT/tal9fu3yeTqCb2wcFFsLyPq1G16MrpEjTpAw77FmMSwqteV 6VfBO96L+ECy7mEbMpVoVu6yujTWQoCdTdKgJoKljzdSzNoa2/TnmbT0v3CMq2Hgx2nu sBPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YDnyZC5Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s11si12811430edd.147.2021.03.29.02.28.05; Mon, 29 Mar 2021 02:28:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YDnyZC5Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231539AbhC2J03 (ORCPT + 99 others); Mon, 29 Mar 2021 05:26:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:56828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231659AbhC2J0T (ORCPT ); Mon, 29 Mar 2021 05:26:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B45876193C; Mon, 29 Mar 2021 09:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617009979; bh=2m63iLs4WAe9lYjvi0CAGkdEF4a/0HxPdd40RsaZgHE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YDnyZC5YOgX7yXRUjz9IGEO0C6G0nFmFS/eHflmgry96kPs8l5LfKHOfjeOx1269E 9AKlzXbO73/J3hgxgOJ3WYU8xLgMtAhEyA/YTdmezdrEGiYR1Fre1yP8TTftBagrNC wv3RmU15M+bgWdIZUnlXbkpLQVt1BkWh1L3AI4zr5NW//9NVSaS2METzlmPoClL74i AehOpRfLKdbxWuSRWc036zO/qqoOyDZ9y25rnaJCDrzPrUmzQzv1Kko/WdUBeMJZgk Cci7SrTHk1S6Jj+IJPSSAgN+6ISiauwjudqnn+snE9Psh1UV2z4bwsdwYP57+VxxFj sjSV9H1gLbeMQ== Date: Mon, 29 Mar 2021 11:26:12 +0200 From: Jessica Yu To: Sami Tolvanen Cc: Kees Cook , Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Will Deacon , Arnd Bergmann , Tejun Heo , "Paul E. McKenney" , Christoph Hellwig , Peter Zijlstra , bpf@vger.kernel.org, linux-hardening@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 04/17] module: ensure __cfi_check alignment Message-ID: References: <20210323203946.2159693-1-samitolvanen@google.com> <20210323203946.2159693-5-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210323203946.2159693-5-samitolvanen@google.com> X-OS: Linux gunter 5.11.6-1-default x86_64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Sami Tolvanen [23/03/21 13:39 -0700]: >CONFIG_CFI_CLANG_SHADOW assumes the __cfi_check() function is page >aligned and at the beginning of the .text section. While Clang would >normally align the function correctly, it fails to do so for modules >with no executable code. > >This change ensures the correct __cfi_check() location and >alignment. It also discards the .eh_frame section, which Clang can >generate with certain sanitizers, such as CFI. > >Link: https://bugs.llvm.org/show_bug.cgi?id=46293 >Signed-off-by: Sami Tolvanen Acked-by: Jessica Yu Thanks!