From nobody Thu Dec 18 00:09:38 2025 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) (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 08A44272816 for ; Mon, 27 Oct 2025 23:17:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761607065; cv=none; b=mIHvOiMa2Lm3xJjQFw6iwkX46TqWYGhOvT8OXDCw0mw+eStqdAzrZQbdFx0t8XAxIq7sg7CFMMV7L3ckmm5qoHW/8Kdn5qtgADVmx+TJVzZp5wnagysl10+lkNTRpAMn9TmQIRmPwmNkuoKG9zQTg2DdZ3rEQJH5WTe4qxv8y/s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761607065; c=relaxed/simple; bh=ekBQrsBPe80TpWVUSqHQRJhm/p0zZcNT6CP5E5otsgQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hGjQfjEsjFz0/zCIkNr4qNtF2AtlOLL3nfmNYRHLFpJCDjAJjJ6JHdrr9tOdnV9OURr0ox0YAjEL7x+bvMD1n0gKpUef+7IcliGoinj80Gx7etLOqEADRCp/atbXILKT/qQIZ7HxKtQFch+BKXuqAp2gZuKQzv0Xx1NrgSibNws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=lJD2QcuS; arc=none smtp.client-ip=95.215.58.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lJD2QcuS" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1761607061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Pie7GrC+9+lsUm8ND6bCvId8ysPp7dmE7YlQN8G+ZkY=; b=lJD2QcuScgMclRJ6mDHlCLu1e/Po/2+/GKKJZqnv3su5QYU6Yn9p+hz/5DJblXQYn/HUVM REvI4h4hi9CbZi48THsPHxWgjBsXmbbIlEnzvgXARMru7YA1bCStqffp+NSOqSsAWR1g81 J7Zg8jJlzKa2E2a1Bk7M0RzVoh7Tg58= From: Roman Gushchin To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Alexei Starovoitov , Suren Baghdasaryan , Michal Hocko , Shakeel Butt , Johannes Weiner , Andrii Nakryiko , JP Kobryn , linux-mm@kvack.org, cgroups@vger.kernel.org, bpf@vger.kernel.org, Martin KaFai Lau , Song Liu , Kumar Kartikeya Dwivedi , Tejun Heo , Roman Gushchin Subject: [PATCH v2 01/23] bpf: move bpf_struct_ops_link into bpf.h Date: Mon, 27 Oct 2025 16:17:04 -0700 Message-ID: <20251027231727.472628-2-roman.gushchin@linux.dev> In-Reply-To: <20251027231727.472628-1-roman.gushchin@linux.dev> References: <20251027231727.472628-1-roman.gushchin@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" Move struct bpf_struct_ops_link's definition into bpf.h, where other custom bpf links definitions are. It's necessary to access its members from outside of generic bpf_struct_ops implementation, which will be done by following patches in the series. Signed-off-by: Roman Gushchin --- include/linux/bpf.h | 6 ++++++ kernel/bpf/bpf_struct_ops.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index a47d67db3be5..eae907218188 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1845,6 +1845,12 @@ struct bpf_raw_tp_link { u64 cookie; }; =20 +struct bpf_struct_ops_link { + struct bpf_link link; + struct bpf_map __rcu *map; + wait_queue_head_t wait_hup; +}; + struct bpf_link_primer { struct bpf_link *link; struct file *file; diff --git a/kernel/bpf/bpf_struct_ops.c b/kernel/bpf/bpf_struct_ops.c index a41e6730edcf..45cc5ee19dc2 100644 --- a/kernel/bpf/bpf_struct_ops.c +++ b/kernel/bpf/bpf_struct_ops.c @@ -55,12 +55,6 @@ struct bpf_struct_ops_map { struct bpf_struct_ops_value kvalue; }; =20 -struct bpf_struct_ops_link { - struct bpf_link link; - struct bpf_map __rcu *map; - wait_queue_head_t wait_hup; -}; - static DEFINE_MUTEX(update_mutex); =20 #define VALUE_PREFIX "bpf_struct_ops_" --=20 2.51.0