Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3020954rdb; Wed, 15 Nov 2023 19:14:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8cxIr242/eqsVc/M7fhswnnBDwU4j3GFfV4OBuiAkoOVHiBGoX9FyiqhaJwKARNjRn1tS X-Received: by 2002:a17:902:e741:b0:1c0:cbaf:6930 with SMTP id p1-20020a170902e74100b001c0cbaf6930mr9260325plf.54.1700104463892; Wed, 15 Nov 2023 19:14:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700104463; cv=none; d=google.com; s=arc-20160816; b=qQspBHGrhABGlC5Ic4W2qS7DMuitHl6vJX2Qvw/KzhcAShi/SxI+2afXIge2gbMAFh Azylz+XwrhTa4rmrdbqhoc7G+aSAU3hVb/8+DqLOVhrNXvV11U1vR/6sKLJN8rX9zru2 0jOW2UiQIh5V3gxmDFWCmxijK0mOJvAl44Nwl0dII0D71CMdkaywoiIBu6PtQHH4ZC9e vsXzFT5T3HuwMab+pRmolmf0pPghGzjqjkZ4IvlJM1PRbl14xdFGsrVKzcUo28aMwfes 1ZTWu5MsNmiGdptMiLzPmxHkZrlMv8i0/XlbRg47erE/1QPMn1+rfxOCY6SlSQQW1gAs KBbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:mime-version:date :dkim-signature:message-id; bh=LVTbIWjaYj/Zzkxn6Ukw8lgVfPfXoOn5/TENdtMr4GY=; fh=jyhFGwMdrQYdQ1gnNERUBwoVWoMaUKowoEMziUleRjs=; b=XbcuhT69VwREWvXgHAnYRpgrjQg+zQ+kg7tJp2QS8dqnzAntz/P7xtdAI/AR0U1cjR /1p74YATgdkS+jnjI5QzblD3+Pxm3dGTAf0tXbmTrAH9H9nRmkIuAA1r8gUYpM3kZpdg 6OLW18Lqi/PFFbWh02Eps5T3WEdqIZdsgaoh1ZjqU9gmdcSj8YpsyjSWd2lSUHzk3/4e O/LFfI70Ku4jubBAYy8wy/c3F0v7FRW/uOBvIm08geLZURfgFPBKIkPWPKmMjDgCQLds cW8ysQaC4hx8u3q2+cisyx3YXTA52ZnLPZ6d5XaYmxYPDLlVQSju53Xoz5AVlteKZ8o8 mb0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=btCmsGt0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id e4-20020a17090301c400b001cc68793f90si11724885plh.422.2023.11.15.19.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 19:14:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=btCmsGt0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 57287804F44C; Wed, 15 Nov 2023 19:14:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230250AbjKPDOI (ORCPT + 99 others); Wed, 15 Nov 2023 22:14:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229692AbjKPDOH (ORCPT ); Wed, 15 Nov 2023 22:14:07 -0500 Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [IPv6:2001:41d0:203:375::b2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D6B998 for ; Wed, 15 Nov 2023 19:14:04 -0800 (PST) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1700104441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LVTbIWjaYj/Zzkxn6Ukw8lgVfPfXoOn5/TENdtMr4GY=; b=btCmsGt0X6sFafJDU5gd7nnPc2QMLVpFrf6LWdb3nrmMtMuOSwWpcruiVM5Jy1nXiU7ZwM nZtGRfjQ6PE3QXk/UOC/NKm6GGwEq/IsL5w6mIimemiQ3+1FwRl9tA8wuc1rTDoOE28kEw YvELle5WYIK2ZVjQhlheSAuVK71UnP8= Date: Wed, 15 Nov 2023 22:13:52 -0500 MIME-Version: 1.0 Subject: Re: [PATCH 0/3] bpf: kernel/bpf/task_iter.c: don't abuse next_thread() To: Oleg Nesterov , Alexei Starovoitov Cc: Chuyi Zhou , Daniel Borkmann , Kui-Feng Lee , linux-kernel@vger.kernel.org, bpf@vger.kernel.org References: <20231114163211.GA874@redhat.com> Content-Language: en-GB X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Yonghong Song In-Reply-To: <20231114163211.GA874@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 15 Nov 2023 19:14:20 -0800 (PST) On 11/14/23 11:32 AM, Oleg Nesterov wrote: > Compile tested. > > Every lockless usage of next_thread() was wrong, bpf/task_iter.c is > the last user and is no exception. It would be great if you can give more information in the commit message about why the usage of next_thread() is wrong in bpf/task_iter.c. IIUC, some information is presented in : https://lore.kernel.org/all/20230824143112.GA31208@redhat.com/ Also, please add 'bpf' in the subject tag ([PATCH bpf 0/3]) to make it clear the patch should be applied to bpf tree. > > Oleg. > --- > > kernel/bpf/task_iter.c | 29 +++++++++++------------------ > 1 file changed, 11 insertions(+), 18 deletions(-) >