From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174]) (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 112F8232395 for ; Fri, 24 Apr 2026 15:07:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777043225; cv=none; b=HADnIvtu9wyBHQQLjjqsRxSydWC12pUq0S68pcFmWLVCNTze5ZFYP07Caxf2Cv8vOEV1jOhUGqdKiqR+SDdHfqBKjwgUgrU62/xTUt4wtG/bE8tVOIytB1Y522RgEhPHnItBO77jmF2vDzGoYPrlxyDCMWoaNGbKNoXC4na2bMI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777043225; c=relaxed/simple; bh=5jT5H/QG6L8I7pYvk2YQPYQtGs4o9CQ5dFTXrvJ4tmE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Z6YYoSduwAhHLRlTC6RAumElleR1p+JVcFGhlRQSIzp/en1tntvlmPlEsJvn9yc6Gbpup/k4E7/KRUbnhOaO4GYXw0gIb9XQDq4Sh9HHteB/kgw0NXjvyRu3BDDCuONpqoBk8eM+2/vmmdkFT+WaaoDjmbseH6dKx1pemQn+9v0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org; spf=pass smtp.mailfrom=networkplumber.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20251104.gappssmtp.com header.i=@networkplumber-org.20251104.gappssmtp.com header.b=to4xshY9; arc=none smtp.client-ip=74.125.82.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=networkplumber.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20251104.gappssmtp.com header.i=@networkplumber-org.20251104.gappssmtp.com header.b="to4xshY9" Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-2c15849aa2cso10700360eec.0 for ; Fri, 24 Apr 2026 08:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20251104.gappssmtp.com; s=20251104; t=1777043223; x=1777648023; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=tSKuWY7Ef5OGzeiVa7TUsQxq3w/z1Yph+U/asFLajis=; b=to4xshY9++AO/BH+ZGLP1wz7DOZP3rFR0avrxXjGECg6HN4sXJ7brhbk9670dUY3Jj BUhWvMv3B4DFbMHKgx43fXG5aTpQ+v6wB5bAFD7J6YEcahYZtWdLW1/7vWvAcoxTbpJj cXo0N+LriMuCkTPZkQPc0+nz0S2WtySVL2WqZz48ihe8d7YkLD3S/Doo7NrdGV8JlCBU +Dhekva67pr4R12HAF+kN8U+9GNb7OtBr6BveR1CBLmD80K8st1ypF8OXf59WrYWdiC8 kz2isPNXQ+/Jg17TovX9dL6upfx2FTDbdXXnV62qMHFeMDbdYYa0kqs2MTe9AaWQyXB8 QBHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777043223; x=1777648023; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=tSKuWY7Ef5OGzeiVa7TUsQxq3w/z1Yph+U/asFLajis=; b=Eioh2EasDxYeNnngoP78ts2IWAcwbXW7p29sOLxCcB/tl5D4Q+dXsGlEGMuOK58ocV UZQzPqwYw1nhQKCZC4gJKry+A9in2ybutkyv7WpnSfKKUrvA9FNVb225WhmD9LrjkuPh 4b7uz3cwsR19sG+N1YduO1ZXzq0TxQpLHKV6RmTC0fDB9XKVC4dXJttE0DyxlBKnd77V 1mNKOAy19fKo4Tdp7BEheDmL1BjLoRVQu6H3goqM/CWQK+DWlsIWxzeU3wCffcdz5p5O wiLDBdvE5l/uvJ8+7wSFcdp06ECuO78BLzAZaSKb+oaDNiOBt3rbBuns5Vn179qQbfOB B4iA== X-Forwarded-Encrypted: i=1; AFNElJ/jzURHLVbxZ0/bc4Ri23gPFitPLJr51tpxUOLqgOem5peKx4WaimQ7V3G+UaZWQHXdMWEBnAHuCnuxhdI=@vger.kernel.org X-Gm-Message-State: AOJu0YzSZ/cgc2pkKe5yJvtdztWcOwob8WGv203kdLUXkxl48Ge/bgJO Db21m8QleJz/DugjXFpHGJPKbXvMGpUMQ1gWqnq96Toy+eQ5LDdvQxD067WHE+OUIuQ= X-Gm-Gg: AeBDiesygxKaW0MYBh9dBRaDglbS1eXgV9K0IIQ/sGgqGCrj9eBFhu3AGTaw1K6LI43 bl8xjk+3yIgUEJke37nRGgf9h37hFbEHMSqxDJtExB8dG9a8S9StHOAnE3I6rAkfm0aw2d52mh7 IO0i3RlmF2jCwdMFulOO/o7FlldHoLyHptx+empSD5YKI+pb20avz1wHLF88efwVEPNivsTiHN0 90ttSOD/dQpX+74b7Tpr/n2Jhj9ClaEBaDg/TgZ3pdEe+3setq657DAEZavDaniAh8ajruvIvcH 9mPaTQ5htxOBO3bW+T3q+SV0haChPBgwMhQAPpLwkjPVe54mSLYGOj38Wg9Mnxr1wpzXLM3oo2F P5GvVLCcMyuoP7XjG/Ul4kDOs9fMA+DbytJC7cExEhhw08msh4875J7Qw/IRER7m6O+Qkqe57bm IIBS9n1mETYYZdrP7e098x0yZAsJ+21dcX/tZbQqD+XPzrzQ== X-Received: by 2002:a05:7300:3252:b0:2c4:ec89:bc7 with SMTP id 5a478bee46e88-2e464dacc71mr18361550eec.10.1777043223045; Fri, 24 Apr 2026 08:07:03 -0700 (PDT) Received: from phoenix.local ([104.202.41.210]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2e539fa244csm31704854eec.2.2026.04.24.08.07.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Apr 2026 08:07:02 -0700 (PDT) Date: Fri, 24 Apr 2026 08:07:00 -0700 From: Stephen Hemminger To: Jamal Hadi Salim Cc: Paolo Abeni , netdev@vger.kernel.org, jiri@resnulli.us, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Dave Taht , open list , Simon Horman Subject: Re: [PATCH net v8 4/6] net/sched: netem: validate slot configuration Message-ID: <20260424080700.6846dfcb@phoenix.local> In-Reply-To: References: <20260418032027.900913-1-stephen@networkplumber.org> <20260418032027.900913-5-stephen@networkplumber.org> <20260421131039.GA651125@horms.kernel.org> <87f5e94e-d354-423d-9976-6cf3fb0710b1@redhat.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-Transfer-Encoding: 7bit On Thu, 23 Apr 2026 17:12:15 -0400 Jamal Hadi Salim wrote: > > > This is intended and explicitly explained in the cover letter. > > Jamal, given the uAPI implication, could you please double check that > > the change is fine? > > > > It should be fine; at least iproute2 will never allow the kernel to > receive a negative number. > Stephen brought up the fact that strtod() could return a -ve number > (but at least iproute2 makes sure negative numbers are not carried > forward to the kernel). > > cheers, > jamal Iproute2 blocks negative values kind of by accident. The NEXT_IS_NUMBER() macro looks for digit at start of arg. To hit this you need to either use raw netlink or change NEXT_IS_NUMBER() to NEXT_IS_SIGNED_NUMBER() where slot values are parsed.