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 X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03B4AC433DB for ; Fri, 12 Mar 2021 02:52:36 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A1C1664F73 for ; Fri, 12 Mar 2021 02:52:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1C1664F73 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=u0p8lOIKtM8I+S0aJQUvs8kdVJcTF9pV9CGX6uUmRiM=; b=DaIv5gJ0/Efa1Rn5F71KWr/+g iOVhqOiYw76WJ3EE9ZfEaCPScwCs3yUKix5yWEOui5UpEmLTLbaeJSdjO2fDmwdQQ349WJBlEpuvw EYDnTADhAvDANgodlZB9AoWXBQIgHm1SIBJoilsN4A8ntVz92uryBPzGKzRL02LfdEAw4e/eYAxuL K6/sVF4LfwLjtYBaNHcBLuoTsS3WcoCwTnbc8GW/4pz/FrKiW8WuJQyQpTGMHet7WAhowyvnvKtXP 5u8MwWSgPpYOh/PdfkHwqPDk3g/A0F5NJH/9b8dtwNAnFSSauOs7+1ZdhXuQF7pZm2gdk7gEYsd8c T//C8I/7Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKXsu-00AWeL-F3; Fri, 12 Mar 2021 02:50:42 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKXso-00AWcu-HJ for linux-arm-kernel@lists.infradead.org; Fri, 12 Mar 2021 02:50:36 +0000 Received: by mail-pl1-x62c.google.com with SMTP id w7so7736901pll.8 for ; Thu, 11 Mar 2021 18:50:33 -0800 (PST) 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=KIk3Qle+BUsBeCAQycfR+lWVDkST8GkFi9wSAJ/kiAg=; b=gaAUqBZl7VidujMHHgtZeA9Q5o5T4yTMa+Mfcm1wWfqy1OpliQkGvD/DCYzfxEeSLL mDO9Kkp+4pfOQRwDcV0GOLSdFkIdBuELW21sTwrdxjOLa06icoLqesEfjuRfSfkbNz/7 TyqTR6nQkuhk2OjDCpKT9lbxEDST5JhduvaJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KIk3Qle+BUsBeCAQycfR+lWVDkST8GkFi9wSAJ/kiAg=; b=LmhPflyyaEQ4dDuEVux+JemnMV+A6Qfypg5RT+lG4Y7uu0hlRrQkr65r66GSffY44O J2YBBHuvaaOpUbMJOrx0jfGieJ8BHw6CSw9UA3yNVEZ4GXm+Sd1zHPofJawqaFRxXZNM uvPBwMd3e4IC7Tn2UU1h+MoiO67sRjhfJ2Iu4p+q3iZN+o6xpK9xUtq74cnBGg3oTOt7 JCMuG3NvigyGQ66raPepFxdllRbazmbu6PHPrlsQ7hYqhhLDpdnMC6PaK0Ix3+j5oRd3 i3JFfZaoySvVp6XMYtb9kYE2z+BNLj43PT+pHJ0EhY8HZTZ2dW4ll18t2tMgeivY66p8 VSFw== X-Gm-Message-State: AOAM532ZzI0eJFawfpPgK1vOikP30WmGCLGb/4WIdFL38xj8EJFtDtw1 0uPqu5bZgxPER1/ODmw/jUJZhw== X-Google-Smtp-Source: ABdhPJw0xZuePYZII/VnCaft+tZdrW5vwu4SWxI9nYaEkp6DHSxNhqBlAcK8pKbEPNeLsU/yPQL/MQ== X-Received: by 2002:a17:903:2301:b029:e4:9026:4c7b with SMTP id d1-20020a1709032301b02900e490264c7bmr11209369plh.76.1615517432925; Thu, 11 Mar 2021 18:50:32 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id fr23sm403194pjb.22.2021.03.11.18.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 18:50:32 -0800 (PST) Date: Thu, 11 Mar 2021 18:50:31 -0800 From: Kees Cook To: Sami Tolvanen Cc: Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Will Deacon , Jessica Yu , Arnd Bergmann , Tejun Heo , 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 15/17] arm64: add __nocfi to __apply_alternatives Message-ID: <202103111850.4C29C4C47@keescook> References: <20210312004919.669614-1-samitolvanen@google.com> <20210312004919.669614-16-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210312004919.669614-16-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210312_025034_707695_DAB8A343 X-CRM114-Status: GOOD ( 11.01 ) 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 Thu, Mar 11, 2021 at 04:49:17PM -0800, Sami Tolvanen wrote: > __apply_alternatives makes indirect calls to functions whose address > is taken in assembly code using the alternative_cb macro. With > non-canonical CFI, the compiler won't replace these function > references with the jump table addresses, which trips CFI. Disable CFI > checking in the function to work around the issue. > > 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