Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp769188lqh; Thu, 28 Mar 2024 16:23:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV7JZm67/JFi9Ob5B1XuFyHOhizw6VpFWotGrnzMuYHgoiLGMHTAInVcdDLKx6ow0z1K1blET7AX+ejiWJ9tk48ZUlRBvu01EvJuncQZQ== X-Google-Smtp-Source: AGHT+IHI0WwqG3yp/mQ/6318UGGbmXuMh/WGt+H82mVflBckSOqcWQASACscR1eQKiBxvRX0T9AP X-Received: by 2002:a05:6870:c14b:b0:221:8dd0:9920 with SMTP id g11-20020a056870c14b00b002218dd09920mr664501oad.47.1711668218596; Thu, 28 Mar 2024 16:23:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711668218; cv=pass; d=google.com; s=arc-20160816; b=XVAVmYVrAUnUIOgyrm6g32I5fPqr02+WVU7bJyEUj8xD6DO69BxmcfYM2GHhMk18Sy EDNeDaCFkT8jOmuI05UU90f0QvdF54oNKJFHVHIui0cNYxDbec2xm3xOPtQh517OrFUY /q3vRNKBHJmtVtOye6nhqGzOli3xZWboRHJI41KPQ2VMf8fpyttoq07DSRFVoMaX0xet jgZiUpBGB67d/CkEOWLYN0Q+c9NnNLCPNtnD6tRTcKJpbTIu4PK3zWX2+aZm5Tt/pCyb bSyjsphQMDNkuHyixJsj1j9lSsVetBWa12SRs7NSYFGGJa0Al8AdY1MOVqKCJckgUlQa Clew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=pjgXiS9mThv24KOLFrcYAxjGt4bSxcV19+6gwf0UgxU=; fh=vV5W3L7xW1X+LyrF+cQup2lycvwEQUZZhYxL1Aej7Dc=; b=IzZrpC+GikKDYzQKJ70LainmByUReh69W+zqxaucHg/9yiSDS+YTIy3ajo0k7ROkE/ zjvsMC2eeKtvp2kUZzNOGahTDRjLusBUlQAIrJdsg8oGN2DVS4yZaKr8rTmnZ8VRt74B YgvX5x+sxkl53rACasdGVISV7KBl4w1g7r9olUwBdF0Ptbz2yPttqn/JTgX6nNl/6GgE mfQI+2DW2GafzuI8ao7/quh99U4IyH8VjTG6mQqD3qo/QLPfe8gMS//hOSDif1TLMKC0 9j2uGbHF70mdWrQLyP55DFodXoPbiKjH0xDnms0fEYBGq7AW33ZXa2gOUZeHtzrvphHB 23Vw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HsUzo0Dx; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-123824-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123824-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x184-20020a6386c1000000b005dc85e8a9e1si2322125pgd.45.2024.03.28.16.23.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 16:23:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123824-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HsUzo0Dx; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-123824-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123824-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 457B92947C7 for ; Thu, 28 Mar 2024 23:23:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA3E51369AA; Thu, 28 Mar 2024 23:23:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HsUzo0Dx" Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BCFA3F9EA; Thu, 28 Mar 2024 23:23:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711668206; cv=none; b=GgPpP40mfkaA5eElv27qi2lZ2ZZKEqQimNI+jYR0ZtnWeLk7ELCEr92RH0oYsQa5bGD/GlTcgxtiNEiJvwmuu3mRpB1rE3+cKyztc7V+rE4LH2QZgyHFtPVPsrzBYQ2LpVkAotYvk1wFFPTgy8I7kznZJHlSd7UDgHa7wMuyYA8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711668206; c=relaxed/simple; bh=f+Fn0IVd1CXhIBMUfKxmbY6PpiZuXCT5Jwa6jncWG1c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=j/fSNAuRKHY70oeLFpbQJrkOQRTZC74Rzd3F80pUUEO2pdKpxCWohIHCt10bBhMJg1N7mIHCaOFObjJs39ogovKHht08nLs41pUVcJgHN5bgIqf1pywJhHubkXP3ANBwoFKSOjVThNGlSfT0FPfGfhkJUzA3PGv7Ss0PoeDPeoU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HsUzo0Dx; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-6e740fff1d8so1327639b3a.1; Thu, 28 Mar 2024 16:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711668204; x=1712273004; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=pjgXiS9mThv24KOLFrcYAxjGt4bSxcV19+6gwf0UgxU=; b=HsUzo0Dxh1VYe4WWFqSmxN/uGTbMb4jeaLMWzKxAivvIRD0w2fi3P21vdDhPCAd8xw vkJnbMUX1GuJsC6Mzsp1HqFfwL5ahrzWcPHk8o2qSStAvMj/h5JQYNWY6biSAcYU4/0T LBu5TKHZzLpoQj5YcH8oeDLzYw3ZQerXZhWbwSazCn8ltQDYdZn3oAq7InXrK1w2cIJ/ 7InQeSASODFeYc+z9kAgFJEq+P/MKRJqSvgo+OTSdAFHazZ6v1zLaO3OfRfxGD+C7iUe Was0zY43K57AYYD1x9NfgcH7KJd/fCXC0WSt81ebZ5sDGlVTGZxWl1kkq9T6ZBLOM7Fb O0lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711668204; x=1712273004; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pjgXiS9mThv24KOLFrcYAxjGt4bSxcV19+6gwf0UgxU=; b=BZhyGagJTBWm047299r0wwnleZ6YGjF0nfBOOTO5bz7t3xuTjwPfcEGniZBG9W8Hle oPXcnBfDqLwCuYXddeQrBd3uWfLndmaCEpUiHuCcFceVPPFYuS54EblFyNAnUdRi7D4k 2llGqxXodgUIeNOTSFnrO9TXc+YtRYHAdlFru8cex4zptPLHq2JxbvKjOJwfGz62dmRW 8eaOeINZzAMQ4VUCgGVSIsnw4lpr7oPlsQHn8mRZHQVvtYQd5UDbsJjZHgKDXPoiGdSL uCvczGotbLh0YOYoW79WhKySGuw04VzzXG381i0jbnGS3utCt63jfGWQPzcKc2gvYfsy BofQ== X-Forwarded-Encrypted: i=1; AJvYcCXNRAFsaUFyMf+wds197nQJULS2/AKiVooK0hu2LNbcpptbNq+nVLSMZbBrdqaJs984/prRz+3GTl4DQYclPkiaUZzt74Qs2dQbGETLsXFQNJzHfzJAuv6+dQngVSnIrRm/xP2C3XOr3D8mWM+DSOJNjbEi8Te7w2OaCGbpv5RYxlEkKgQf8urZ2ReANN1WD4DTMNqHNdM4YjqzFg== X-Gm-Message-State: AOJu0YzXM9fsVEc/cc39dLqXHxbJrNgcrqqKcuryKpArpf4/n+yKaIgi sromWI4DFK1ilTOI9MN0HO3gejLtxWL84vO9AVXE6pBukvZOwMlG X-Received: by 2002:a05:6a00:9284:b0:6ea:c2ef:3b71 with SMTP id jw4-20020a056a00928400b006eac2ef3b71mr927159pfb.20.1711668203684; Thu, 28 Mar 2024 16:23:23 -0700 (PDT) Received: from localhost (dhcp-141-239-158-86.hawaiiantel.net. [141.239.158.86]) by smtp.gmail.com with ESMTPSA id e5-20020aa79805000000b006eac9c54f7csm1968972pfl.96.2024.03.28.16.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 16:23:23 -0700 (PDT) Sender: Tejun Heo Date: Thu, 28 Mar 2024 13:23:22 -1000 From: Tejun Heo To: Alexei Starovoitov Cc: Djalal Harouni , Zefan Li , Johannes Weiner , 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 , Mykola Lysenko , Shuah Khan , LKML , "open list:CONTROL GROUP (CGROUP)" , bpf , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [RFC PATCH bpf-next 0/3] bpf: freeze a task cgroup from bpf Message-ID: References: <20240327-ccb56fc7a6e80136db80876c@djalal> <20240327225334.58474-1-tixxdz@gmail.com> 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=us-ascii Content-Disposition: inline In-Reply-To: Hello, On Thu, Mar 28, 2024 at 02:28:51PM -0700, Alexei Starovoitov wrote: > > > So filename will be one of cgroup_base_files[].name ? > > > We probably don't want psi or cgroup1_base_files in there. > > > > Would it matter? > > Few weak reasons: > . cgroup_psi_files have show/write/poll/release which > doesn't map to this bpf_cgroup_knob_write/read ? > . cgroup1_base_files probably needs to a separate kfunc > bpf_cgroup1_... > > > If the user has root perm, they can do whatever with the > > files anyway, so I'm not sure why we'd restrict any specific knob. Maybe we > > wanna make sure @filename doesn't include '/'? Or is it that you don't want > > to go through the usual file name look up? > > yeah. why do a file lookup? The names are there in the array. > cgroup pointer gives that "relative path" and knob name is the last > part of such "path". Easy to search in that array(s). Difficult to tell without looking at the implementation but I don't have strong opinions. The interface makes sense to me and as long as we can hook it up in a reasonably way, it should be okay. We can always change internal implementation later if necessary. Thanks. -- tejun