Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1144975rdb; Wed, 24 Jan 2024 06:17:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaT27IUda1C2eHfzScknddkc9mcCqMHuFdhLpswGpR8rZqmaR7MTyvKFfEuULcMiM2aWHE X-Received: by 2002:ae9:ea0f:0:b0:783:1c3e:beae with SMTP id f15-20020ae9ea0f000000b007831c3ebeaemr9106013qkg.123.1706105860012; Wed, 24 Jan 2024 06:17:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706105859; cv=pass; d=google.com; s=arc-20160816; b=HU6350qS1UBNBn5tQpIYL+v4fb0B9pjDRvKEeYUMtJbanrBork/QL8rmtEIIWmfKy4 nRIZnJrwYFGPbzU2GJAo3aUxnp1YA0JaGnhxJro9FdV2B2dza5sllw+9IBWvOW9hdFiS hlHARunGR3wt1jevKP+0HjDrB0vDU0eOHmZTNRdaH8RvGUSYMV0reX/RYKBnM2FIKOIC 97CYu1xvF1DIGtZgkEVV+2d3gw7PmqsL79EP5Ggaw4R6SU4LAWB/V2e08B3SKY4vfqP3 Rm5iOyDDQ+9g7UR3SXUSnhCUNlensvzSAUVGiPrspvkZNWBTYhemGrN6GpIpZMkrh+Ae RZYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zbA1JW0SBojYannQlE1dFJNN537wDqy66JCCT0SpCjY=; fh=wnI/k4fDbIBtIJ2M1yTGvr431ZLaLrAO4hDWm3Nkp64=; b=k6Z2JFIQVYfBG5TlEELOwY/2h8xno9Aon6ENZZjynkFcMGuTNWB2sEjuCgpaAX9dwA kV1O5RK6IB8rPUZR3VxEDYpLXhM+/5Qv3fmqwZY7mEeccIQqcEo/JCAsVnnGv+hMGsM4 vh7MrJYfMumBSAp7679EZn104mDGy+uphSAgVuO/4J8hgouorCZBF/QPNaWd9N4ezVRt iu6z0K/MvopW4xeYE6MOt8aHDs/nPYLgv7LNRpBVHMqt9aEq3QJ3XOWFITWuQQ0nbcmQ YKeQqDvI1dc/efOObTGZ5w6KlPRIqpn8ApvBwErNebzhL6nGiUU7JzKEVdeUBk+iO9Se p49A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y1m4Kxua; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-37098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g14-20020a05620a40ce00b00783363de67esi10930026qko.641.2024.01.24.06.17.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 06:17:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y1m4Kxua; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-37098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org 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 C19101C20EB0 for ; Wed, 24 Jan 2024 14:17:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4A7E7A721; Wed, 24 Jan 2024 14:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Y1m4Kxua" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EDB7477F2E; Wed, 24 Jan 2024 14:17:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706105850; cv=none; b=TlJYsNvAPmUZUbuiER8dxbyU1yAiECIdQwb6zlnSCiChsb5HyyguLlq6HH5X+8GVs41x/Hv693c1iL7dtYBrtstIJzuMF+/xDX3Y54xcqpGdrNlOP/8xuEuzBCJsi5A/Qcot0cqU84tjvW+L3/mSVJMUzw5DTDCHqCLTHw0XTGI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706105850; c=relaxed/simple; bh=eVqN57aJT3+vy4UOpfoRo4r0Q0FGTipSEN//MpMMrQo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X6NqY/gk6apc+0Rb84MtAkEpZu1gwsHfM+UANdQ+8IecX30oAQUX7xCOHla+c2duL4nc/ATTdelzVw6+83okbX98ZOMm8V147knUBy5dGxYyey4sjNKWXFfsk8QRgVIEpBB0OwkR8Lt6phbj9sUuIf38ZUqjoTTwc6YtDJYtCR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Y1m4Kxua; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3769C43390; Wed, 24 Jan 2024 14:17:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706105849; bh=eVqN57aJT3+vy4UOpfoRo4r0Q0FGTipSEN//MpMMrQo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y1m4KxuabkVmac4BIwVougZSrd75bRKG+57PJJiGGNT5+XfwolOarUyv6JcGatQSg aTop6llwUaw/K5JMe26AOkfsg/tK2vBRJxQl+Yu8g8t5MehOqr2TJ2reHOXp5bIcSR XQ02F4l1NV/8ZCeK3qp1Nwx3xgLKzC67c0VQAmTY= Date: Wed, 24 Jan 2024 06:17:27 -0800 From: Greg Kroah-Hartman To: Heikki Krogerus Cc: Prashant Malani , Abhishek Pandit-Subedi , linux-usb@vger.kernel.org, jthies@google.com, Abhishek Pandit-Subedi , Bjorn Andersson , Dmitry Baryshkov , Fabrice Gasnier , Hans de Goede , Neil Armstrong , Saranya Gopal , linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/3] usb: typec: ucsi: Limit read size on v1.2 Message-ID: <2024012405-stung-freckles-e196@gregkh> References: <20240123223039.1471557-1-abhishekpandit@google.com> <20240123143026.v1.1.Iacf5570a66b82b73ef03daa6557e2fc0db10266a@changeid> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Jan 24, 2024 at 03:51:58PM +0200, Heikki Krogerus wrote: > On Wed, Jan 24, 2024 at 12:12:26AM -0800, Prashant Malani wrote: > > Hi Abhishek, > > > > On Tue, Jan 23, 2024 at 2:30 PM Abhishek Pandit-Subedi > > wrote: > > > > > > From: Abhishek Pandit-Subedi > > > > > > Between UCSI 1.2 and UCSI 2.0, the size of the MESSAGE_IN region was > > > increased from 16 to 256. In order to avoid overflowing reads for older > > > systems, add a mechanism to use the read UCSI version to truncate read > > > sizes on UCSI v1.2. > > > > > > Signed-off-by: Abhishek Pandit-Subedi > > I have one nit (mentioned in side-band but reproducing here for consistency), > > but will defer to the maintainer on that. > > > > The above notwithstanding, FWIW: > > Reviewed-by: Prashant Malani > > > > > @@ -1556,6 +1569,15 @@ int ucsi_register(struct ucsi *ucsi) > > > if (!ucsi->version) > > > return -ENODEV; > > > > > > + /* > > > + * Version format is JJ.M.N (JJ = Major version, M = Minor version, > > > + * N = sub-minor version). > > > + */ > > > + dev_info(ucsi->dev, "Registered UCSI interface with version %x.%x.%x", > > > + UCSI_BCD_GET_MAJOR(ucsi->version), > > > + UCSI_BCD_GET_MINOR(ucsi->version), > > > + UCSI_BCD_GET_SUBMINOR(ucsi->version)); > > > > nit: I think this doesn't need to be dev_info() and can be just > > dev_dbg(), but will > > defer to the maintainer. > > I think that's okay. > > Reviewewd-by: Heikki Krogerus No, when drivers are working properly they are quiet, this needs to be dev_dbg(). thanks, greg k-h