From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 21E6163CB for ; Mon, 10 Aug 2026 02:16:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786328207; cv=none; b=PGxOySoHVP/Z31fbjaWWmyGahZxtt8h6kpqYc3tvbShAUCMw73YSYw4JwP89sTmaebpRIk1HXbRi7o33sduaGTnN8vrXLZ433okKKVzFkVM4w6LgwsX1vrfa3B5b/fUrjpCk0d4Iyye7SvmdkAX2/1xgQQHn7tBayH1Ry3xCk3Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786328207; c=relaxed/simple; bh=d6fyS4o6oHm6FjRqR4vniJmeWIw+Ne8bx2l2lJLE6Kk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oex0w9dh1hN55xER97u14Bz/Z79qglIbleyy347NPxt1o0zBXSdWH9QNwNE/qF9sc7P0DDXeO+VjRLamP1yozLi6jqsO06yRrtsLPNDutYt+o1mjvafDRGyfQdLcCwL9Qz8jk14+1+81OPojweRFZo/3OfqWjabde9jcolTjaTE= 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=kLdsQPqK; arc=none smtp.client-ip=209.85.215.171 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kLdsQPqK" Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-ca80d708489so748504a12.1 for ; Sun, 09 Aug 2026 19:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786328205; x=1786933005; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=T50296aExFxsj0I/+ZL970YLUh41lH37G/h3Ek1dg8U=; b=kLdsQPqKtApS76xuhhU/jPkb+Xrj088RM/V1KWynMHFeQSoVcNDWpL92zW6kVeqzEl lrWNnLrt4K+IRaHs26ZJZsDDRF4709MBrSpsRyC7bT8v/HtGA2Rjnbid2X6dqmK1SyBb OvPgmRL1xyL6DFlJySLW9TcZcQ1eFnXJyJoN2tAY0FqVvEyf8AoNhYsueNL0SMvEyDnB +z7P+r7mHkqT56N74Ogw8Iba5T58SmNPdFkyTqGi8hf38F1LHWTFKpUY3cp4dkzCcXAf JXYF8FLH0qfkGGA0ZXTKRIZuJpY8AVFgkcuGJDwSZI1I7axecRTmSerVgsZOP+Sv5jbn 1dbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786328205; x=1786933005; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=T50296aExFxsj0I/+ZL970YLUh41lH37G/h3Ek1dg8U=; b=scB/my5GY8hlzKESLDLKKIA1eyhdqVjd1ayVx813LhkBvngs+4YX49RE91zTxmvWZQ Zckdmmc926oGJToDzhRUTV9n5Qyzp/QaPeRDU8IbcH8AekLCqjvPrdpPfmUVnZNCjyVV 2pabGca+/f7MZ/OR8lqlSr0w4tA0PySeob7mFx8Re4SL1N/1Fw09BenLkpLUK8cBTIAA NMCwu90M+dHAoM+ovH9/oBij/7oeu6rQ4eycut1SIIicIDy9jKVBadz8yeRsTcmd8uAG 6/vE9rD51WVFDibd0PyKX4D6aigOGznWbAdh+xpRSHPwmey8YHdAp3daOCrLFMxTil3a 2Huw== X-Forwarded-Encrypted: i=1; AHgh+Rq1Lmer5G8vT4R9stLwCRpz3NvKnK4CVJsdN+z5nxCe3vuznTuVA+MbVq//+3IOQMNsMngSsqn1MWHgKrA=@vger.kernel.org X-Gm-Message-State: AOJu0Ywem0jWEC1esYvWGABdX9BTxPHNMURRdQWZrw79iz4UxUzC9uqn T5yveSN+rnELbyj7dEI/062Zqy7AXPCijHIMuhtpVnbgFQtMXulNNsQC X-Gm-Gg: AR+sD10S/kwhSGQG3xfhxdTXK148i5XVYloRLjYw1sTL0WybOt/tJYDMJz9jhLaOavC 2sdYZHjIbYsBPiUKPtjf7x2kz/FMJa2xfjZIAbPN4LWArQWblEj7YRfeAcog8DBTCdTrw7vewG3 GOGFzJ4cPsF45KsmKeDm4Z6977muSyyvqFnkMOiLTEeqmtdXyrURE5E/4GnmMaAzBFRyoNhjKKr xEHFeziXV8adiIcXN8PLxxGFXI1CCWxpYqXMcQeyhfLWrMHROqdt4W8K22JxTN5T/A6FtcAqldW LKOkopUZSKWe0BpxW4eLhkp40sGr0XfbD6d6HbCydKllmRa2qb98RylrwZMU00xrxR4seM/y5ga zGFZ6R8KC1LfotDEKx6iFRKKmayZJAAyyvy054JPpHrL7Jhrvvre7MwhveoewebWXr8esrz68TA FIpbTb7AXalPrmpZaheBalSuMQgIEJAlTQWWdB7xRQ7UuSSJ0ySDopr2KUceUuJLPOn0xLPHphZ SWxBt9yIaE1UN2WrGXM9AeVo6tsy+8qfZHyfNoAC9+KwCgcL7wRvTFppJphCy7EKZAbkKncqxc= X-Received: by 2002:a05:6a21:4916:b0:3c4:320a:737 with SMTP id adf61e73a8af0-3cbd3bc5576mr17285040637.16.1786328205375; Sun, 09 Aug 2026 19:16:45 -0700 (PDT) Received: from kernel-dev ([49.36.97.234]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-14101b95b20sm30050607c88.15.2026.08.09.19.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Aug 2026 19:16:44 -0700 (PDT) From: Aditya Chari S To: Dan Carpenter Cc: Greg Kroah-Hartman , Johan Hovold , Alex Elder , greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] greybus: usb: fix response buffer size for fixed-length hub requests Date: Tue, 4 Aug 2026 05:21:55 +0530 Message-ID: <20260803235155.356199-1-adi25charis@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Dan, Before I go through your questions point by point, I want to flag something that affects the confidence of the whole patch. My rationale for hardcoding fixed sizes per request type (GetHubDescriptor/GetHubStatus/GetPortStatus) was based on reasoning from rh_call_control() alone, without checking how the actual Project Ara module-side firmware behaves. I went and found the firmware at github.com/projectara/, and the relevant file at github.com/projectara/nuttx/blob/master/nuttx/drivers/greybus/usb.c, gb_usb_hub_control(). It doesn't support the assumption I was making. The module allocates its own response buffer purely from wLength and passes wLength straight through to the hardware call: response = gb_operation_alloc_response(operation, sizeof(*response) + wLength); ... status = device_usb_hcd_hub_control(usbdev, typeReq, wValue, wIndex, (char*) response->buf, wLength); So it's deferential to wLength on both ends. I don't see evidence here that the module would ever send back more data than wLength implied, which was the scenario I described as the "impact" of the original FIXME. Given that, and given this driver has been unreachable at runtime for 11 years per commit a96493560cd1, I'd rather get your read on whether this is worth pursuing further before I go answer the rest of your review and send a v2. Happy to keep digging if you think it's still worthwhile, or fine leaving the FIXME as-is otherwise. Thanks, Aditya