Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp24050ybm; Wed, 27 May 2020 18:05:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1S2CgNIvJ76s3TOoMg4GOen0A5SrtQJZlbt9F5c9Y2z5W33ZfE03cYLesZ8zmoJOKGT0R X-Received: by 2002:a17:906:16c2:: with SMTP id t2mr854960ejd.17.1590627931982; Wed, 27 May 2020 18:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590627931; cv=none; d=google.com; s=arc-20160816; b=Ws2/nETRP2537k1P2XmZgZngjc+DiS4aJtaY4L6YbYcL446r/uvc1rYFc5q+6w13ol gat3tRxAkOV+rxwLinwEVzkWPOX/bZuu1jpKuUhy9lzseqlCe+rUyLBdcj9suMKtDeYg MjJyMko+QTxKgnSEAcCL0o92c+yREgySaO7F3XZsxHzsQBrcgo7mLrETOa3q9AHUXACN KvEqrGNOf63f46Ol1B2BSho/s3Kv5sFfoUxoWEcR7SD3U+n/kW6/57Dh3yVrZyHQEFdk 5AfavBHSjP98boB+VzvnWRQceMtv/cG7iKNhwcnAZJB07DQt9KLDpfoANdSNYfy9fqok DqMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=DoJMZjswH62/zOt4HjkXtF7vlmBtTg+HrZbIbCMgQ4o=; b=0esYd0Hg+VTy0EAmhdePKWXEqiV2ET0ZaMFKb8x+7+w21TR+6fKJVTf2U7K2JZR4ns J5W3jmr5Wj5TAx0bFTvPj63RVnt4fKb8ij8uHAoyWNLIyzr4nNX0jzihBvIbfjq7+qdn hhyde1GJrM+aFB5A87X8bmrX5lDt95UpR5X21916HGlPFQ8TIffSe50mw9m7++p/CWln rImjUbl5VYiFF1pX2MEEMj9wh9oZY0rIpsvxFUmJJv4rGBAq1ATWJ5MAcO1J8J2Qgrpq 53aC24CrWqt/D5KBd05q1ZBUCfWF/ogINTQOGheIqGCLdf3U0arhanSk8qatx+s781S5 7F1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=A7fz2X4J; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si1601068edi.491.2020.05.27.18.05.07; Wed, 27 May 2020 18:05:31 -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=@ellerman.id.au header.s=201909 header.b=A7fz2X4J; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725901AbgE1BDZ (ORCPT + 99 others); Wed, 27 May 2020 21:03:25 -0400 Received: from ozlabs.org ([203.11.71.1]:33185 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725849AbgE1BDZ (ORCPT ); Wed, 27 May 2020 21:03:25 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 49XTwB4G0Tz9sRK; Thu, 28 May 2020 11:03:22 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1590627803; bh=N/Z40R+KK3M6wyiKZjsa8P/TxBi0+LFYhTsyo1gvTKc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=A7fz2X4Jn/z7PCmN6BPHq89o5QO57U4B3BrvRBG77+sHqWD1fKk76BbL/eG4omIWp EkSpNcKmaDKWnZVFWJN2DMAchGRaEZVkFZRlpABlU/3gCgcRubN4hLALIhPOIcWL7m Cz2l+2XPkYJ9savJl+QDyInt60UXqb2l08HS1RaLYpFBxRg/nXc3ZY05pvUHnaSxTo 4tEiTd4boJEjRBkb+aU0auwr5YSIwkFJgyjfkMHcfxkmDLAEG+A8Y3AQmv3LAKI3Cz 4Zh6IEFX3iJtZW3qs6M0S9GRdMYwL9Y/qM/fnXxZBEyVH+GA2I5DFPLToku8qmn8ID 8qfjDdBlYmyew== From: Michael Ellerman To: Petr Mladek Cc: Miroslav Benes , Petr Mladek , Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Daniel Borkmann , Alexei Starovoitov , Masami Hiramatsu , Brendan Gregg , Christoph Hellwig Subject: Re: [PATCH] powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again In-Reply-To: <20200527122844.19524-1-pmladek@suse.com> References: <20200527122844.19524-1-pmladek@suse.com> Date: Thu, 28 May 2020 11:03:43 +1000 Message-ID: <87ftbkkh00.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Petr Mladek writes: > The commit 0ebeea8ca8a4d1d453a ("bpf: Restrict bpf_probe_read{, str}() only > to archs where they work") caused that bpf_probe_read{, str}() functions > were not longer available on architectures where the same logical address > might have different content in kernel and user memory mapping. These > architectures should use probe_read_{user,kernel}_str helpers. > > For backward compatibility, the problematic functions are still available > on architectures where the user and kernel address spaces are not > overlapping. This is defined CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE. > > At the moment, these backward compatible functions are enabled only > on x86_64, arm, and arm64. Let's do it also on powerpc that has > the non overlapping address space as well. > > Signed-off-by: Petr Mladek This seems like it should have a Fixes: tag and go into v5.7? cheers > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig > index d13b5328ca10..b29d7cb38368 100644 > --- a/arch/powerpc/Kconfig > +++ b/arch/powerpc/Kconfig > @@ -126,6 +126,7 @@ config PPC > select ARCH_HAS_MMIOWB if PPC64 > select ARCH_HAS_PHYS_TO_DMA > select ARCH_HAS_PMEM_API > + select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE > select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64 > select ARCH_HAS_PTE_SPECIAL > select ARCH_HAS_MEMBARRIER_CALLBACKS > -- > 2.26.2