From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 B27C01E1A2B for ; Tue, 7 Jan 2025 12:04:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736251454; cv=none; b=TbSWdfJrjIE3+Npsjw4GxQSHMl/VP9NWc9b3Ho750JeqgTuabU8v09XL4CqLxqfFhJWnwewRKE6t3ouxT2lwspIHjwRKi71G24mUmkAHd1Zh5QiyM4M0tr9ehSOFPjEaQ72MbuHqwWyZy5GnhiLRO+Vv+T4VhaYtneE5blRxg/g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736251454; c=relaxed/simple; bh=FJ2nluP0U1DNjzdsDupwT81e9JypfHhfzlKI5y49qRU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H46a8gNyMeMacT0LPRXsmwBAhpQSeYk1NRq8VCZCS10xmrMj4ddSClrR/47Kwrg0nU1YHFWCI2IJSuWwNnwuINxXC6jUpXThbZNzGJCbZxPMri7C+w8DiLf3+8YSlYxeAoJfA/8CPu0oRwuQ8E3piQEY/4ClwJ1AWFGMoUAh8wY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VnfoVGSM; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VnfoVGSM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736251450; 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=3dzBLLOp8eNpGsd6cUumXxsmOdst/gq9nNd6WoidZRM=; b=VnfoVGSMehZUnxYnACdRx8w+TwU8Nc5nKsrBUSeTDAHJf2pnSyXoZQuuf1mBT3/bthGieE rmMD0HgHeJjjE528lBoEjX5s/URKWtI9rQy41ZJPh99rVa7yMmGHzfw2+Ttr7gqbqrTdf1 AXYn/dhCR2eT2rPyGYMJYLNNuGbMT6M= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-HcSjAfYvP8KYaEj8jwrmhA-1; Tue, 07 Jan 2025 07:04:09 -0500 X-MC-Unique: HcSjAfYvP8KYaEj8jwrmhA-1 X-Mimecast-MFC-AGG-ID: HcSjAfYvP8KYaEj8jwrmhA Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-38a2140a400so9470491f8f.0 for ; Tue, 07 Jan 2025 04:04:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736251447; x=1736856247; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3dzBLLOp8eNpGsd6cUumXxsmOdst/gq9nNd6WoidZRM=; b=SIb0KDWxxdU+XuaO4VOzvVd1J0FAkbAtzUA4pB4doTsLY3+1lJSb9h7Ly+9takhmWN j0gFrJLpijaq7232V/3eqCRrFJM3ImOTFlrHrsXIlvmzfUVUsV7VTeIX7tLAYLurkPwL QCgsqhAggDBiQ+kUeTogw2o5+j8qqxmmT8/BuJ3GUTWT9zi6DzhmdItnnStuEi9HkPEy tyQLX65uiq8mSP/zOTpxYast9BQKIwDlqqKWDxPs2sdPYa7VRPgjiVzYhhYENzchJrLp uPq8V9JuYEz29hvUh9VgCFfHzaICaNuKepW8qZTrdkOYrExncQ/jGQSsg0k5f+mbClkV 0WhA== X-Forwarded-Encrypted: i=1; AJvYcCXt5UKVM1TjiX+Fh9XZr4M7BUpzx4rxlf6zYnBjERqZbyZ6Nc6NgGIkDL4ZMQeSGaAOtAmL5NHW5Y5WUnI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy+Yh2YnucJ2f5tMxFvERToAT8mpNGJklwHszyQSYI7nJbVvH9d lE9gOIqcOCoiK7YOhLWA9zq/9kPXuLDEM/yIP5LVWxfaaoVsIKr0EMkSDbcNaAjVgWWfNTBizvZ SIAvdrOH8Z2w9fAXjqAmMvboOuL4EWTjLT/TeqMOJfXo+WnP+RM7cFsAC/iFwrg== X-Gm-Gg: ASbGncuLs7shro4LtQzK+HesBgvPwY10KxumN3DFZPVDNM5Om/55IIq+VJ0IyAmXLpB yLcHquhzpS5+Onw4yaDQLzWPRkaNp8w0UqkYjzCSfg4hpzL6OdqxQnK6k1IHAlz5PfRM+dt6zKD qg189fNxl7KDlpPpFTPWVS04UqSS0FjQ1ollD1e3Q0H7YSbhw/afd+2PmM1QplRGFjYxRfIzF25 mZuKW1mTYmVVN4ZMdDiZ6kQtVzlzw2ZIdhGpzfJnnzdTaUVP4HQkx2OhzvAGCtlInZrdGdoxULk A9kGKigp X-Received: by 2002:a5d:5f56:0:b0:386:1cd3:8a00 with SMTP id ffacd0b85a97d-38a223f5b41mr59871352f8f.40.1736251445751; Tue, 07 Jan 2025 04:04:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWfb9Vm3Vt9Qk+wKzvMGFSZQzXSCS52o6qWqfR8nKRXCO5SfQ0ddtzkhw83y3pCZhrNPA7iw== X-Received: by 2002:a5d:5f56:0:b0:386:1cd3:8a00 with SMTP id ffacd0b85a97d-38a223f5b41mr59871192f8f.40.1736251443868; Tue, 07 Jan 2025 04:04:03 -0800 (PST) Received: from [192.168.88.253] (146-241-2-244.dyn.eolo.it. [146.241.2.244]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c89e278sm50877687f8f.75.2025.01.07.04.04.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jan 2025 04:04:03 -0800 (PST) Message-ID: Date: Tue, 7 Jan 2025 13:04:02 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] ptp: limit number of virtual clocks per physical clock To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , Richard Cochran , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Yangbo Lu Cc: Al Viro , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, cheung wall , stable@vger.kernel.org References: <20250103-ptp-max_vclocks-v1-1-2406b8eade97@weissschuh.net> Content-Language: en-US From: Paolo Abeni In-Reply-To: <20250103-ptp-max_vclocks-v1-1-2406b8eade97@weissschuh.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 1/3/25 2:40 PM, Thomas Weißschuh wrote: > The sysfs interface can be used to trigger arbitrarily large memory > allocations. This can induce pressure on the VM layer to satisfy the > request only to fail anyways. > > Reported-by: cheung wall > Closes: https://lore.kernel.org/lkml/20250103091906.GD1977892@ZenIV/ > Fixes: 73f37068d540 ("ptp: support ptp physical/virtual clocks conversion") > Cc: stable@vger.kernel.org > Signed-off-by: Thomas Weißschuh > --- > The limit is completely made up, let me know if there is something > better. I'm also unsure if such constant value is reasonable for all the use-cases. Any additional feedback more than welcome. In any case, I guess it would make sense to update Documentation/ABI/testing/sysfs-ptp accordingly. Thanks, Paolo