Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp839396rdb; Fri, 26 Jan 2024 12:17:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGNi8krXGgwVxUIeLzAEo7NIZ5JOg8OKL7NUu596//H+TjEtbiotYB8CI1alb43dMxrWPo X-Received: by 2002:a05:6808:1a1a:b0:3bd:74ee:db14 with SMTP id bk26-20020a0568081a1a00b003bd74eedb14mr389090oib.86.1706300266674; Fri, 26 Jan 2024 12:17:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706300266; cv=pass; d=google.com; s=arc-20160816; b=RpqX0DfRn1XhWDGedAikBmtRZhe+LYyIjLpUNJYLSVWYF4R/9v5NbG1pkWPW02e4qS frsqb4pEnn5BlFC1qdbpdG5kMZ9Epi/eP2R+ts2e4KiZV3W1in8p6WQKWcsPtHDCBa4u STPYC5m0y4H5lf4PBpbfBMLrwWx0oak4QvoZZ/zlMNUPt34kYAUoryCgX5m3nKZdayh9 ts695jEPfJWwSa/Fj0epB7wxZA58FSo3sDwv5l2qvoHi4BmAVkTdn2dJigG+j3hCym01 0RF8KCA1y5zjQ2sZFm+ZyMA6PkszmQqCVsz7XJ8Zgejpf+4/ER/b5XRRreAjerCgE7jc U8YA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=HAQPps5wjqE0jv8rgN+WS1Gw3/xSMCClPFvhNPdQHGM=; fh=A11Yha3PhE90Ntsz5rdeFnGGVLstQ3QTjjncTPVD/Vo=; b=Id36x69aeoAXub4orSmfs1f8H6vRwuhRhTTK4x6EzHpV4bxoFrCd4o1Lpm3x8WbBwf 4Pje6g/QaZcS+Fe9tmci1SQwYay4FpgkpWgSuie+CnO2hP/R8Kg2THiZh0YgVXWmidNT W4/5uh+Z5wK4VrKZp7RlBNdcqEKk028rGVyw+D/xHfRX2+qGUQ2jgnYAAitOQVqSySIR /5y5aEeabJ11PzweJeaerACB6RgeIeHwmATyhfkjdk6cEI8h1knm+HpxN+HyDcmAoHby lZABE77Hcewz8Y+hKbAJbz3sDG+2Pl3aFdCRSCu3NxwU2qnFBu2+mM39a/dtbg5bFMju SU0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Xb42bPK9; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-40615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h17-20020ac85e11000000b0042a5254274fsi1944983qtx.427.2024.01.26.12.17.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 12:17:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40615-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=@chromium.org header.s=google header.b=Xb42bPK9; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-40615-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 6B3CE1C249E2 for ; Fri, 26 Jan 2024 20:17:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCE9B22EFE; Fri, 26 Jan 2024 20:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Xb42bPK9" Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.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 7D16123743 for ; Fri, 26 Jan 2024 20:17:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706300260; cv=none; b=ocUDJAmFn1AnOuionGTXoLWstLjaCOCOu6u3O8fnMcprZLobp1RofeJuH18fX/LVHCOXiVRy6vqOZ1KzyHkjYOEQC2G4x1w31aHjTjkY/AbTKjHzE6cpO4eYFdDSkhymJmq/2hfYTrGCefZ0DtEm6+I3fV6wpdIhQEznFMu+NnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706300260; c=relaxed/simple; bh=HAQPps5wjqE0jv8rgN+WS1Gw3/xSMCClPFvhNPdQHGM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Fy8dglaYAhHhofSndsIH9xhqa8kHz4N5zPHRgX3c8F5tXxcvnkWGKGSiELZx3Wz30zfTOOxfkh0wmwv7FvNifs2FIpBFN0O8I9MDo3pklLCI68ZQGen0q9yTGXqwSAcF9CcHRMDMtpBrGynOJCBc8b1xCLV9o6ge8vZo127MG3E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Xb42bPK9; arc=none smtp.client-ip=209.85.219.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-68195c0c8d1so3923046d6.3 for ; Fri, 26 Jan 2024 12:17:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706300257; x=1706905057; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HAQPps5wjqE0jv8rgN+WS1Gw3/xSMCClPFvhNPdQHGM=; b=Xb42bPK9vDS0/pnhLKk8rm/spr/1sx0zMw3SkAotGXPUBI2/b54OzKDFlBW0TQqkze +X1g/DkMT3HvzuHRASpRRY6iDq4VmYuoPMQC6k4fnJIXUH+K4p4GaasBll8lkv+knqWP 9qsEgVR9dR7CZ7jb7Nsc0k2u9qpmUB3MiwThM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706300257; x=1706905057; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HAQPps5wjqE0jv8rgN+WS1Gw3/xSMCClPFvhNPdQHGM=; b=QEM+3DhpXCXJ5SQkaA0GILNyA78ob+HQUrtEJ7a/cZwoUrgQMtktIFxJ1dbGpSFhDU wrAxSr+NYOCx24AzUI4t7ezuOmrfeEqWISXpdOYz4859RxjM5148/B3chaNKBBmMVaMo kVBS9jXuO8eiFauxs2oOBNo42HrXkgMBBMfqnduths9ut3bMy0Qyq2SG6gEORRE5CXK9 vxx9QuYoPz3oB6Kw4TJRPhPbxoAyQWzzxMG5L5Nbd2ql6tZmF66gw0ve5myA3aDzZQRL 28EKXb7Ti1pEgrcZDlxdEodpa9GdoYP/p9LNAFMh5UN8fqxzQrdBPvCRRHovp33PAkYG iMFA== X-Gm-Message-State: AOJu0YwtRE3/DcIwaBCtu42hb/qQklOZHSE9EMoqsw3OiwL5HBAno+hW D3L3P3LNKbqN/rkh16Nj4Au0yVBLEB3xD9G186KRH17I5IplQ1KZoz+DACQWn2Oqt2FCuPw3xtr 0YrCMh1uxFxhuARMNiezweor/G/aANrgWsFxc X-Received: by 2002:a05:6214:27e9:b0:685:606e:dc22 with SMTP id jt9-20020a05621427e900b00685606edc22mr459042qvb.45.1706300257561; Fri, 26 Jan 2024 12:17:37 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240126183930.1170845-1-abhishekpandit@chromium.org> <20240126103859.v3.1.Iacf5570a66b82b73ef03daa6557e2fc0db10266a@changeid> In-Reply-To: <20240126103859.v3.1.Iacf5570a66b82b73ef03daa6557e2fc0db10266a@changeid> From: Prashant Malani Date: Fri, 26 Jan 2024 12:17:26 -0800 Message-ID: Subject: Re: [PATCH v3 1/3] usb: typec: ucsi: Limit read size on v1.2 To: Abhishek Pandit-Subedi Cc: Heikki Krogerus , linux-usb@vger.kernel.org, jthies@google.com, Dmitry Baryshkov , Fabrice Gasnier , Greg Kroah-Hartman , Hans de Goede , Neil Armstrong , Prashanth K , Rajaram Regupathy , Saranya Gopal , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Abhishek, On Fri, Jan 26, 2024 at 10:39=E2=80=AFAM Abhishek Pandit-Subedi wrote: > > 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 Please pick up review tags that you've received for previous versions (unless the patch has changed drastically). Reviewed-by: Prashant Malani