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=-11.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 67AB3C432C3 for ; Fri, 12 Mar 2021 02:46:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30D3C64FCE for ; Fri, 12 Mar 2021 02:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231685AbhCLCpf (ORCPT ); Thu, 11 Mar 2021 21:45:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231591AbhCLCpT (ORCPT ); Thu, 11 Mar 2021 21:45:19 -0500 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49743C061765 for ; Thu, 11 Mar 2021 18:45:19 -0800 (PST) Received: by mail-pf1-x432.google.com with SMTP id j12so847126pfj.12 for ; Thu, 11 Mar 2021 18:45:19 -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=AssdNLgVnE+ciH4+zO5lxL3YhHsnzigu9rKdFnlTKlk=; b=hIQlmeCWP7pIGfJ5QNK11xJD01Ah5yhUwvyA2ww7yhNm+fTC+X7nXsvxCf/cfPJkw8 nkcI9fivFzWEt/maVUeYndiFDn25FO8B7W04AYR/UDOt3gRYjRZzQNUCnbTnncwE0cZP XqXc4TvxtdB2n7+7RQIxaEFd3VdXAy+vdwy6o= 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=AssdNLgVnE+ciH4+zO5lxL3YhHsnzigu9rKdFnlTKlk=; b=qUTE7F+jfsvoO0CuxUu5+5/+LHN6hHeulbl2/sAlQwlA+tXoWY+j1oZP05m0jJOH30 pIUIGSXjR5hKjyo82/2GaR+k5UZ5cPaPMix6XYmLqAJUyckE0WVCtDizVavP0BxqV12S PNKr5ZEZd+zCYMa0jFfpMuvql7kLEA3Zj/UYoXJy/0/invR6uOKx1pjLJPKkrJomqp1t PCOJ61CaW9YNleaWmTg/ajyJ4slHtaRXN5f4W6ZBoDQyyP+eTzo92QSAkE67tE/DBczd aUecydhKZ+V8z5bcsFg+yqp3dcuwpDoBK86DaXmbcK2NmJ530pS+YVaZ7ifQt0O0RN+J LB1g== X-Gm-Message-State: AOAM530Z8Iw/MMaROrnEvP+xb1IEdBsXnBQeGhTlVfVTQSAFd39iz/5R I4UAZ0cZF6LdKngXVmb9QnPnFQ== X-Google-Smtp-Source: ABdhPJxI0qWCdvIWD0Iv1exumtIeT9fGoJnsI5bP8+qNI3aaTbYLPtnoi/Tg5jl4840YLUIassNTiw== X-Received: by 2002:a63:1e0a:: with SMTP id e10mr9855197pge.3.1615517118872; Thu, 11 Mar 2021 18:45:18 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 14sm3673048pfo.141.2021.03.11.18.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 18:45:18 -0800 (PST) Date: Thu, 11 Mar 2021 18:45:17 -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 08/17] bpf: disable CFI in dispatcher functions Message-ID: <202103111845.3A6EEB3E43@keescook> References: <20210312004919.669614-1-samitolvanen@google.com> <20210312004919.669614-9-samitolvanen@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210312004919.669614-9-samitolvanen@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 11, 2021 at 04:49:10PM -0800, Sami Tolvanen wrote: > BPF dispatcher functions are patched at runtime to perform direct > instead of indirect calls. Disable CFI for the dispatcher functions to > avoid conflicts. > > 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 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 5016CC433DB for ; Fri, 12 Mar 2021 02:47:31 +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 DB07764F87 for ; Fri, 12 Mar 2021 02:47:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DB07764F87 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=vR+lo9RaJfoOU3pBGrODGRRLA6TOQzv9YcZdYTsfIL0=; b=PEDQNlGyKlx//Nmqyxuq2PzzP lj/PVh3yQ6xeU1oW3rxnNdM5UGVeMlfD9KiidRHWkKOFs/dT6P0grugVcA/+xb6xbGhNisohH7HkK 6K8dENbJz1isihSzR72BNgD14vK1sWqPEbIzu8uorW0JBXYyO7C2YCAWKCj+XU1fZDGUKViltCDDM OLplRdBKSK/4hycpIKbwnK4ya9zeZsDT+RKoOJfG5Z0wYiY4G1O0HGOP9LQIVEMX9m104D/KGplQo brlaMkV58zsZtObJvjdFWNnmBIyD2wEcPT8jxvLhwEYJW1xVYM0qWjCpGxhDEUoDcHP3SEEU5CgDi piOl0m+nw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKXo0-00AV73-Bk; Fri, 12 Mar 2021 02:45:37 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKXnk-00AV3c-9E for linux-arm-kernel@lists.infradead.org; Fri, 12 Mar 2021 02:45:22 +0000 Received: by mail-pf1-x42e.google.com with SMTP id y13so888539pfr.0 for ; Thu, 11 Mar 2021 18:45:19 -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=AssdNLgVnE+ciH4+zO5lxL3YhHsnzigu9rKdFnlTKlk=; b=hIQlmeCWP7pIGfJ5QNK11xJD01Ah5yhUwvyA2ww7yhNm+fTC+X7nXsvxCf/cfPJkw8 nkcI9fivFzWEt/maVUeYndiFDn25FO8B7W04AYR/UDOt3gRYjRZzQNUCnbTnncwE0cZP XqXc4TvxtdB2n7+7RQIxaEFd3VdXAy+vdwy6o= 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=AssdNLgVnE+ciH4+zO5lxL3YhHsnzigu9rKdFnlTKlk=; b=OPe/gT58IfTE6qIKXrRNhJ8cpBMSZMpHR4CvY8Zv/I47/428teJdkTKYwQbdSRq6Z5 CZ0Ins1BxvgIqi+Q2KLQTODPHS1JkEvLuRkxWGYR/XWmqNVEMZ8h8RmluRPE+KGUfipH 9TeGXThMGlhgSPXWdw0orkpcSdoi109l6/IV4Ox5CrjCBPdmPEioR+LuzAlnWyvlMCUH 2nAf4iU2mzRPUJumJc8NlnEBxNXa/zoOJ43s4aNt59XULEEU3DaujuO6KOqQyxHxDbvZ E3gonBDChOdLI/Ol1mMFWXEwH0yPZ7vHPuYB/fw0IQGIOrGGCQVNDTanvYDWoP6+n5Ej feHg== X-Gm-Message-State: AOAM531T/w5rRmCsatNot2egsFhQE5R0Pe56IRG6OiLC+iV8PdXLMi7x tlFQByHU/oSrRSYHp2mApRTjFQ== X-Google-Smtp-Source: ABdhPJxI0qWCdvIWD0Iv1exumtIeT9fGoJnsI5bP8+qNI3aaTbYLPtnoi/Tg5jl4840YLUIassNTiw== X-Received: by 2002:a63:1e0a:: with SMTP id e10mr9855197pge.3.1615517118872; Thu, 11 Mar 2021 18:45:18 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 14sm3673048pfo.141.2021.03.11.18.45.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 18:45:18 -0800 (PST) Date: Thu, 11 Mar 2021 18:45:17 -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 08/17] bpf: disable CFI in dispatcher functions Message-ID: <202103111845.3A6EEB3E43@keescook> References: <20210312004919.669614-1-samitolvanen@google.com> <20210312004919.669614-9-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210312004919.669614-9-samitolvanen@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210312_024521_429554_1BFAE6D9 X-CRM114-Status: UNSURE ( 8.70 ) X-CRM114-Notice: Please train this message. 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:10PM -0800, Sami Tolvanen wrote: > BPF dispatcher functions are patched at runtime to perform direct > instead of indirect calls. Disable CFI for the dispatcher functions to > avoid conflicts. > > 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