Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp712074lqj; Sun, 2 Jun 2024 19:46:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlaISmRExrYFIKEFUw5k3NNnLiVry89OVQGfip6PQmK+m82KpLBUYYl/9HMAjjXFbxmbDxx7EP8kykUIQfz7PJGZP8KxTjuWhPseF72A== X-Google-Smtp-Source: AGHT+IEp9hBaWZwvFBAVomU99o1+gS3k4qygystGlTt24Qq0gUoTQKyCssZs/zOMAGz//ib37ylv X-Received: by 2002:a17:902:7844:b0:1f4:7d8b:cd87 with SMTP id d9443c01a7336-1f6370d1b99mr69572185ad.67.1717382777930; Sun, 02 Jun 2024 19:46:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717382777; cv=pass; d=google.com; s=arc-20160816; b=pHZweiDcvYIHUDwEgWmYu8RlQlTwviUraCe8289QXGjCosFlxWEEn1D1owT87+Qq3z KmUGifZ1GEcLN3nYkG2TfR0mE+AP4vGzF803gofLzb6i7Milvb0jsGtdLPTfrH574mrr aEqA9ObgV3DvXUZD5OW2EcEelqYJTCpOrtfHBigYN1OH8+3AFQnwrt+WFbol/O+m192o 0YuRZ8K7xO599TNNmjC6xfUyCL8fObSxAHRKYcqvO8oL9cf7+w9dCJWrHhgxycNLNi5Q iPYijfZBtvyDGB4TbmH+AqXlm8DNWGdA7SYQO8PcyliNnrOwOJS/EM+dElGrw9SBtzB1 AJEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from; bh=QJx1HqojqlilW6HO/PyekKKNPCv8WMAQvNX73xInoaA=; fh=mf7yeavo9SucE++TFd3DlTdfKOMukTLJw/4MYoR4UEk=; b=dguKVR65tv/ujfxsyekaPBefP4AVu/hCgmNRSFkKxJN+KDq4ONAIfglKJ6TbrdF8pP /JstnwVEI5jJkK6agns3kJrT9MRzYX6OcUZ1um46Av1dt3B9Yb7cQnjCIze7HEWSPziL CPf0X02GjhMff+NeqEz4yWELE+wSuL4+2sZwf/xT+pEwAJB8UAYjPr5h59vh0PAsOiXn bEjhzPTIElQQv26Pwa9/HbRCRgec86c+LY3dDdIVjHtVPR52Oak/UIpm5Ia66IY9NV6X zuh1JLyFciHPfxVV7OlbM76g+CdftUaus33XAsGvUMnWeZaDQrQXXn3qM1n9V46+jH65 IH/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-198550-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198550-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f6676de17csi21582775ad.584.2024.06.02.19.46.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 19:46:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198550-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ellerman.id.au); spf=pass (google.com: domain of linux-kernel+bounces-198550-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198550-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 18E9FB20CA6 for ; Mon, 3 Jun 2024 02:46:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C24C5B663; Mon, 3 Jun 2024 02:45:58 +0000 (UTC) Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E8574C94; Mon, 3 Jun 2024 02:45:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=150.107.74.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717382758; cv=none; b=DJPLI/RpPr1b34/Hz2fzZ6GARSeEQSdUkPSU8CB/olV6cDBS5kRx5ZyCpYx0YYxxglJg3Y7ZqXD5yX58hsq7S/Jn+VWy6F3faIfWMAzyr9qnrqLLRXgyuK5tVPdTqjmp7X6DEn9orxer6/zozHoSfof9Zc3f0iOX20a0WhnD8qs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717382758; c=relaxed/simple; bh=0poVrFSY2Uk6oDd3H41VjCnbX7bVm6ZgIXHVtooKAGc=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=r7Qsfu5/3KpSCRyrqrRbZCDqUnQfmCBQ50Fj5/ywZMlSRkLSJT3ahPxXbaueMH8RroNFws2q4at+YrslUKObgUMy4FQAWkwK+w8j0hD+7g1VOcM/gcSQ4hxVIeBXK50EpqGyet41OqfKymQmWWPQstlRsNxx9yotkwCy17nfH6Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au; spf=pass smtp.mailfrom=ellerman.id.au; arc=none smtp.client-ip=150.107.74.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ellerman.id.au 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 X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4VsylN3kNRz4x10; Mon, 3 Jun 2024 12:45:52 +1000 (AEST) From: Michael Ellerman To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , "Naveen N. Rao" , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Aneesh Kumar K.V" , Hari Bathini , bpf@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, paulmck@kernel.org, Puranjay Mohan Cc: Puranjay Mohan In-Reply-To: <20240513100248.110535-1-puranjay@kernel.org> References: <20240513100248.110535-1-puranjay@kernel.org> Subject: Re: [PATCH bpf v3] powerpc/bpf: enforce full ordering for ATOMIC operations with BPF_FETCH Message-Id: <171738271132.1517513.12789013884540856700.b4-ty@ellerman.id.au> Date: Mon, 03 Jun 2024 12:45:11 +1000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Mon, 13 May 2024 10:02:48 +0000, Puranjay Mohan wrote: > The Linux Kernel Memory Model [1][2] requires RMW operations that have a > return value to be fully ordered. > > BPF atomic operations with BPF_FETCH (including BPF_XCHG and > BPF_CMPXCHG) return a value back so they need to be JITed to fully > ordered operations. POWERPC currently emits relaxed operations for > these. > > [...] Applied to powerpc/fixes. [1/1] powerpc/bpf: enforce full ordering for ATOMIC operations with BPF_FETCH https://git.kernel.org/powerpc/c/b1e7cee96127468c2483cf10c2899c9b5cf79bf8 cheers