Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13477689rwd; Sat, 24 Jun 2023 00:41:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6U54Mtu9wFvAPSsPVM/2nUIVUfHll+QxGgrpUwT586EqNfKceljxEdukH7z9Onals8Kq/g X-Received: by 2002:a05:6a20:430e:b0:125:9d2e:ae1a with SMTP id h14-20020a056a20430e00b001259d2eae1amr6161707pzk.9.1687592498396; Sat, 24 Jun 2023 00:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687592498; cv=none; d=google.com; s=arc-20160816; b=xNX5QVadgFABkVyK/GVa3KxUVB5n3rIv/ebJm5oo0HWGNWf4GzCleShzxrWcSAIHKm U1MfDXT3/fG6iPJVkq72tmqMbT1vinUcj/N83WsN1HhzTiYyzxosLLXGqZAdNbjF/E+y P53y1gDuWcqdCR3ehFhJLOFtjS7Iyd2Ucrcnclo5/jqQCFC1JhYgjvCH/FPlAJCTf846 LdqmKP1gvD5jLoxQLQo2agXGRHIzNE9WyDsbTvFE9Bq0AERC69w1Di6AAaXl6A7pee/w zGAf2d/qdKydooOI8ijVH/I5/97ushX3TXsX7CUqj7qBHuxm1OLl2Hk7/GhNrXPcih09 bcQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=/mk+XxNLxtLpMGX3Ch6O40Ea3UB65fn2VQCUMFkDIAM=; fh=+N5v8Dv08COAO66HHLVcGyTiH+seTWKHdoPw5DSegIA=; b=YAcQSrt26+2yiS3AzfoEMoOSN+l06fE4VUB9xyWl+rP3XCA+qwEPlt4EKFM1ZS7/4/ QsnICEP2IQwnAuHqLRiW9YFh81++cWX/DEX5qaivCRJePdasLkfOt0hhi8CRd356IxAB 8e0/BHf1GRQJVPYZPkJPMTli1NZk4GT8Oep8IPQLxkdab6cg6CI8PGAfpWHR6eH7n9t6 Jz+5KD+clE4cnAMVAdKC0jiWX5Z946EYqjC5X9vn3vkQZBByrP6K09HnaX6oHUG2/brq cl0QK7yGQUzQjS2IeCSiuX9rkMlBL4Mkp1VstIZ1+VGV4l68Ak/jBKsWBZqd/x2Hgvr5 9GMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=NHVZShzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q17-20020a632a11000000b00553d7157e8bsi1083322pgq.794.2023.06.24.00.41.19; Sat, 24 Jun 2023 00:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=NHVZShzE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229599AbjFXH31 (ORCPT + 99 others); Sat, 24 Jun 2023 03:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjFXH30 (ORCPT ); Sat, 24 Jun 2023 03:29:26 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C122E1FE9; Sat, 24 Jun 2023 00:29:25 -0700 (PDT) Date: Sat, 24 Jun 2023 09:29:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1687591764; bh=wCDc9Zgqu/UjZScOD7aU4VLNUFSOVvbL5pgzwU+j1nA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NHVZShzEb2lXh9c325egu1+Qg0uAzF8KguS3GgNfuhTcCiE3u9efDJmAUqcy0XTlH egybFYlxr2BPvDdL6y+YrdeWREWxg7F5EDsz/lf9TSO8EY7yj9G8ZGr8Td27EAbp4C qTSmpEGHab4TmQZVcT/bk9P3ELwAaQ1czqjDlIvc= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Zhangjin Wu , arnd@arndb.de, w@1wt.eu Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v1 00/17] selftests/nolibc: allow run with minimal kernel config Message-ID: References: <20230622184559.1188894-1-falcon@tinylab.org> <0322e204-f3ea-4af2-a3eb-f23506b2d779@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0322e204-f3ea-4af2-a3eb-f23506b2d779@t-8ch.de> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-06-24 08:52:55+0200, Thomas Weißschuh wrote: > As for the CONFIG_NET dependency, which I would guess is one of the more > expensive configs to enable: > > link_cross can be easily adapted to instead use /proc/self. > > chmod_net relies on /proc/$PID/net accepting chmod(). > It is the only file in /proc/$PID/ that works that way. > > Maybe its a kernel bug anyways and we shouldn't rely on it anyways? > I'm taking a look. It indeed seems to be a kernel bug. The following patch aligns /proc/$PID/net with all the other /proc/$PID stuff. diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index a0c0419872e3..8c5e9abf4380 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c @@ -320,6 +320,7 @@ static int proc_tgid_net_getattr(struct mnt_idmap *idmap, const struct inode_operations proc_net_inode_operations = { .lookup = proc_tgid_net_lookup, + .setattr = proc_setattr, .getattr = proc_tgid_net_getattr, }; I'm not entirely sure about the process to synchronize the application of the fix in the procfs tree and the fix/removal of the testcase in the nolibc tree so we avoid broken states. Or if this would technically be a (relevant) break of userspace ABI and therefore has to stay as it is. Any ideas? Thomas