Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2597848lqb; Tue, 28 May 2024 05:12:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzGio5ZwSubPC3da9AfKvXEbmEAyiYgFOQCAmLW2jrDJSZgDN25JVhTXTIGhQ42TPlUUzFRygtT/jMrhB27Uxq8rRRf9f1R7yYqBtnKA== X-Google-Smtp-Source: AGHT+IHJ5iXOQTv86MAC9uvFKlAYjyin6awf3BOaUFn/pdJ1ZFX3jf2157i/obXQlzcwtwsBlspF X-Received: by 2002:a05:622a:1a15:b0:43a:c18e:678d with SMTP id d75a77b69052e-43fb0edd90cmr130457631cf.42.1716898321545; Tue, 28 May 2024 05:12:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716898321; cv=pass; d=google.com; s=arc-20160816; b=EAkGD+RPejp9D5YbSUP0dyGJ3JPDv9KIP6CCULYclYvkprAK2bdgNmWI0BBL4ookPT RovEQULgs+evbUiNFTGU2yVLYHV1ROCk2qD2TXyrCiSnpnfVm0UjuDkhpTp/WY9dou/w gZNPPO8LA/Ctqe6+nBwrEZPn9YDC5EDpO3HRZ6tXRcB704+r5xwjFwxS4jSptQOcjeHH /Dghj5vKQZE3QtYdZcRroSUTukuKbosUPJDGsQLedrq5qZIBOmTf97qGhXv0u99qa5mX YTHvh/mjkKJZAeoBcpUbTB7NT6bfw8Ee97xC6WsIKahXjkJjDzuxu6ir4GbdKM3GI4hh AqrA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=z+ePbf6YYVyuLoatenDzEi9t+2512ijImy79nCfIO9g=; fh=z29EcNIENVGxM0JYeKoeanjMxm4hvjWkFQpdQQGCUUo=; b=g8UKQeD+On3wPI5x5ne3l5+9UZujkGTyrotLPsD1CP5CTAm8P7E4TSCUyCq+tA1aQI lLxK15xj7t0QH9QKL8fGuAyDonFJ0E1v2Vmh4q0Y8LHDtadBXdos3THzBxrjJcQIDgb5 lOk3MfqZJ2MsFmQpVX0/Ofh0bHXQeg6EqVYdKfQj2dglfG3ny3byXUg/3vLg9vqTP9kW 23MdGUBNGr/SwuPJzZ8yooT289j4QMkXy/QRcPQvlLbLFL9P4fcZ5x0a7WTvZipzT7Yn ZFcySq7nviN5s3kHWGKihWfDk5FWE49/GfGqGwAU+eweCE4ksIHQJQH0wIvLbFDT2/Ol YDng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fYzt21HN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-192257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43fd8a6e191si17807871cf.73.2024.05.28.05.12.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 05:12:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=fYzt21HN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-192257-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192257-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 343781C22971 for ; Tue, 28 May 2024 12:12:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E229B16D4D1; Tue, 28 May 2024 12:11:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fYzt21HN" Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 985DE16D335; Tue, 28 May 2024 12:11:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716898309; cv=none; b=sGs8niuezLv5GrOluR9tHWnriObYhj4zCZpzUbvJ8wOjrzvZKEDCMJ2aul+EGvvyRfNkHZvy6xwBVj4d4OL+Ld6MHUb31K5TCqarPeyaN/DyPoyx9LP7278tGZskSHacuk4udDHy680f2lz7AaTFxpcg9/an5UVTuwvVlqGuMNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716898309; c=relaxed/simple; bh=qqDnq+8DCihtvxh2tA4h1Nwr54ScpfDmHOuPXfX8yLw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ei9Chhtasw7CifKBmq/8A1E/2R7RLNxGMdT1MbyVBuTLHmtfXxNbmbF18MqKp33tU/PLfkVwpn/D4m+QWf+059E+2m8KyWiSFZJygG8PUohjjN+bgKBKCQVvUzjFtdeZSMA35I8MecOOdVWhhltWv2xsfxE9lJOHthW9lZeNO2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=fYzt21HN; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4210c9d1df6so5558075e9.2; Tue, 28 May 2024 05:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716898305; x=1717503105; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=z+ePbf6YYVyuLoatenDzEi9t+2512ijImy79nCfIO9g=; b=fYzt21HNVrye5aWn8MxFHPmY+aPY9U6ImJb04XYSJ879jUdFrdpnRTvPPB05q7SIaC MJXPPGkTvd6RY6SBLPdbSAlqqrQGINytr+6lhapaFFH+roRcihOxwMDnicDTUlyB9PXi /38VRh5rfijq5mKVPXfb/8Mt3LN5ep5o07Gh6rO7k7/zvTv1L6cf/djSLcJBf3v6Ispa 41QrIYuI9q3yi6ODYkQZHHejdjikceZV6ztulaXfDE5kKevAcvFs431Nw5+Ue7fbG7Tg iw9ylbVYHOUfZ/bqTqboOIDoI3Et/Qo57ca6utj8xMly1kVBd18w6UukiI4EOE+4FDNk StCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716898305; x=1717503105; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z+ePbf6YYVyuLoatenDzEi9t+2512ijImy79nCfIO9g=; b=e7Rwfb9Rnkz/xCn6UAeSu+E488GhBbDNCi4RJjtBiwly4KehCLI0wFn9Jux0IkKDpx wp5Zw2ruJAzcq76wRLQ4bKwbzvTSC4vYzn61apDJj8SzW+/MV7U8cHBNhJGbtj6XKU8j eJZnLmXrFiYI5bg4bleecoEYEAX/8ooZd1K9Hh21UJOIYElhgvFEx3Y48I2HS9xgz4wS U5tqMrT2vqQEBJFo9nIBD8ZPOpX49tg4YHF220sX1BcqOQhcgdgpS6d9GuSTylWnKyN9 PMZ5I8Bp6TYmmq+TAOKIv0WMknG72NhVbtg11Z3eIlZ4DWe1SYor+SDk+PO5qYGAnruG 0puw== X-Forwarded-Encrypted: i=1; AJvYcCXZXq6h6aUKDE0aT7iydkz/3u8+UE0fiJz18nhiMsqZG/odEE3oAOp0659j53tid9dunstK7ySB1jZMwd5OaG933v8CbjTx4MjjcmE6I6pF93SzQPkK4kUlwzJCQA3dHoyRA0Qm+aoJW/aII9Vl X-Gm-Message-State: AOJu0YyfSBCFH3K0cRZEjyHMv2LGtSd6n7yfkfgFGo7MB35h+7T3HlXI C9u2IM3n1Lh/Umh7v6uhfMZ22eNUX+GRjX5CW/nrgTELDTEfYxbvz6jx4g== X-Received: by 2002:a05:600c:1c83:b0:420:110b:4211 with SMTP id 5b1f17b1804b1-42108a150a1mr83145125e9.39.1716898304649; Tue, 28 May 2024 05:11:44 -0700 (PDT) Received: from turbo.teknoraver.net (net-5-94-218-116.cust.vodafonedsl.it. [5.94.218.116]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f69850sm168281625e9.26.2024.05.28.05.11.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 05:11:44 -0700 (PDT) From: Matteo Croce X-Google-Original-From: Matteo Croce To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Shakeel Butt , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH net-next 0/2] net: visibility of memory limits in netns Date: Tue, 28 May 2024 14:11:37 +0200 Message-ID: <20240528121139.38035-1-teknoraver@meta.com> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Some programs need to know the size of the network buffers to operate correctly, export the following sysctls read-only in network namespaces: - net.core.rmem_default - net.core.rmem_max - net.core.wmem_default - net.core.wmem_max Matteo Croce (2): net: make net.core.{r,w}mem_{default,max} namespaced selftests: net: tests net.core.{r,w}mem_{default,max} sysctls in a netns net/core/sysctl_net_core.c | 75 ++++++++++++--------- tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/netns-sysctl.sh | 15 +++++ 3 files changed, 58 insertions(+), 33 deletions(-) create mode 100755 tools/testing/selftests/net/netns-sysctl.sh -- 2.45.1