Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp303252lqp; Thu, 4 Apr 2024 13:45:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWenDLQ18b9AuSTB/TAZZ0t6J5mRxHPyX8HSBPqj98yzg6bgfqlZhh3RZlwriFZ1TG+n7PvigRCe/CkEK05WevBH3Dw2h+LvnLqAa5khQ== X-Google-Smtp-Source: AGHT+IGqGlqeuchBpXn42tNjLsF3shyZzL64YlPz6j5BX/4Wr2K2s5g326z8rI0wyeEWVBOOVRFC X-Received: by 2002:a05:6122:4f06:b0:4cd:20ea:35aa with SMTP id gh6-20020a0561224f0600b004cd20ea35aamr3614939vkb.8.1712263535031; Thu, 04 Apr 2024 13:45:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712263535; cv=pass; d=google.com; s=arc-20160816; b=WnAy192DZgHNVNlL5njZywAZM8pNHLZttIv2N3qXBV20rc8UPQMgxz/B0CjeVfBMH1 5gkeOeDORSYwQDzZ3gRzgOg2mNRy2tvH5V6eIu+sgghGtTMlsJhvViuRT/v9qsSBCqhH YJmgyzHwG4l03rnBL9XppmdsU/gU9zIMh6JEq0HgUONfKumBddFaIdEI3yTkrYvIFNFX LhSbPLReUe4UBaggLbDi/ARszBF2PX0VPuRQCGwVCtsqEr53srJU0k6OfA5jxs5mgrm7 VNGLHnjTTgqM1hCpCOszmSX0K6VQDe6MYU8oPPmkk2rz9iH7+7SwG6J9nFv3ojA5t6cA B0hw== 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=KF8FNJKbIf/Wqy3NgLHLUIDfVpXMUebZHQXlpWQnHwE=; fh=BUZAL9pF1tpFUABa12n5VTlcRyzDuXLcHEoitlxoPJE=; b=JK6GE7BMwgJBLI4Mh4zx7X4+3WUf+k+GHEO+tdGLV25JCjf/dnZ+sjitGwMWUnLAvM 8nx71F1/70/tMgE8QHmSAEqcEdnEGapc2y5Vm6m1WsEVgaqnLsFfsNSDvGAQGLCVsj56 H2nipk1YtXm/JdwIkA8zf6LnItPsg0eu3pqt2O5Qo+u/VJWCbU6yZXOSKus/sLSocaM0 /HMR8w10HSSH7Mf/7kmi+IidQ5i0iJSHd+S7UiPvgZQudtJxMrdf+DF8weIXGtjrypoP zmbjejFz/PcUh2w6mct6Tx/nHRRmzZjVRx7D0Zxk+Fhc6qbQplve30Dvr9eKNLPALQC/ zYzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=OGHQ9Otk; 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-132110-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132110-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 dn9-20020a056214094900b006993a4735d5si161640qvb.187.2024.04.04.13.45.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 13:45:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132110-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=OGHQ9Otk; 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-132110-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132110-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 BC9B31C22CBA for ; Thu, 4 Apr 2024 20:45:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C57BB13A25C; Thu, 4 Apr 2024 20:45:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="OGHQ9Otk" Received: from mail-vk1-f182.google.com (mail-vk1-f182.google.com [209.85.221.182]) (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 88EAC13AD33 for ; Thu, 4 Apr 2024 20:45:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712263508; cv=none; b=k08RrOmzsBsKW/UcY6FVcOY6exGGW7ix9KJ5B89yVHKWH5TmCDCMxrEbpHR0IQn3SkVIxzNR8OvVU0vGVyEe4DPyRPHjHkvD8NBf25y3OCjYMccAP6s18YJC8kufhfGtZ6FHy2b8e6baEgwZW+VINQSiDAYcXvdM4Ym4hN8UJyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712263508; c=relaxed/simple; bh=4UO1VMYWun6t0P6nH+mG+xdFydZVyE+pOaRYVYx4yog=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=PRMsZlP42Et94xpdCAfFPHRd76oKxtKGjv77uLoDcUmU6bYKo9sbw5Km8K7rJdbzgxxShrz0a6S38FqKB3ZnX+0e9HB4E1BP1pQXed2CmX0klS1+AkFBGn9PDxxhZsFxmZBt6j/sSN3nB0jOP3kizcf3TY+zPsVzj5nXrHHwsRY= 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=OGHQ9Otk; arc=none smtp.client-ip=209.85.221.182 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-vk1-f182.google.com with SMTP id 71dfb90a1353d-4daa91c0344so269728e0c.3 for ; Thu, 04 Apr 2024 13:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712263505; x=1712868305; 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=KF8FNJKbIf/Wqy3NgLHLUIDfVpXMUebZHQXlpWQnHwE=; b=OGHQ9Otk51j3QkwxtNFs3R5EmKGoHTZB6h4lLf0rwEowgUeyMnIIhevJ5+qcroer9t FQQWNmLgX1L+7qAqFa5L5aHmcDr2uIc4nUYPOYj7prGRk+fdrC5awWKBSQUfFtlaS0G/ MkmFjoqOOTOnslZKxXdxi6SnBKrGOto2s8lTw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712263505; x=1712868305; 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=KF8FNJKbIf/Wqy3NgLHLUIDfVpXMUebZHQXlpWQnHwE=; b=RA0PpeA6CE0I0CeNQQ/8kpJ4xxJZN1TGrFAnbN1M0FRhEM+K8nQfaam+Rlo2nYZkfw SIf2NkPUxzw2yrsbZIRsd1ACmFa4TQs6BA3ZVEBJ/gX5DUQiC7sKR0BteV8Vx0cB0Y+A 1F3TMxWYSuIi50hfVUiO8IaPu2dD8FDhFRljHckG0Vidifed1sLFR9j60LgBoSJVIQ46 44jJvLA8L2q2GN2OhwEmo0zEW1xQ4741MNHSY8M3cExKrI+P3OCY1IsLL4dj3mEd0U8p tuQNhNwPIEMtH4znrqu5xTQ6KYxTQyfwilwenJ9C/WkYpwbC2qZoYEbRy5/mV6Yl300m 5yDg== X-Forwarded-Encrypted: i=1; AJvYcCWpL/Zf8kO1DRJgXl9EZeZtv0sgrNJjhEIE63lyW8lEkMnVtt0TLC/ip6WlV6Ao0XwbUYJrV/G1ctxpsTUarvfBzkmOL1pSeqeU3kOn X-Gm-Message-State: AOJu0Yzdt0EcLXTKYbZilo5o+D4BcFLorAkHIuZ+v0wwkLSxZTCipB68 OpTYijW5kqbtNEfoH3HuSDwDY69o4lt10BMJLOWj/RQ+q0nkx8Op/HewyvsoSCrNr3UIjlI2tTN JDFnO4WQ4Y+CMkGupltei/KDljWFAxnvux5Ie X-Received: by 2002:a1f:f2c6:0:b0:4d3:3adc:b639 with SMTP id q189-20020a1ff2c6000000b004d33adcb639mr3392151vkh.6.1712263505418; Thu, 04 Apr 2024 13:45:05 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240403-public-ucsi-h-v3-0-f848e18c8ed2@chromium.org> <20240403-public-ucsi-h-v3-2-f848e18c8ed2@chromium.org> <3ezjocthsigo3t746slmgzffnmpxw7wwf3s535basiaf2qy6io@7ocxva6ndsbt> <2024040449-average-foyer-defa@gregkh> In-Reply-To: <2024040449-average-foyer-defa@gregkh> From: Pavan Holla Date: Thu, 4 Apr 2024 13:44:29 -0700 Message-ID: Subject: Re: [PATCH v3 2/2] usb: typec: ucsi: Implement ChromeOS UCSI driver To: Greg Kroah-Hartman Cc: Dmitry Baryshkov , Heikki Krogerus , Benson Leung , Tzung-Bi Shih , Guenter Roeck , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Abhishek Pandit-Subedi , chrome-platform@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 4, 2024 at 6:07=E2=80=AFAM Greg Kroah-Hartman wrote: > > On Wed, Apr 03, 2024 at 09:58:33PM +0300, Dmitry Baryshkov wrote: > > I think it's better be written as > > > > if (WARN_ON_ONCE(val_len > MAX_EC_DATA_SIZE)) > > return -EINVAL; > > So if you trigger this, you just rebooted all boxes that have > panic-on-warn enabled (hint, the HUGE majority in quantity of Linux > systems out there.) > > So don't do that, just handle it like this. > > BUT, if this can be triggered by userspace, do NOT use dev_err() as that > will just allow userspace to flood the kernel log. > > Pavan, who calls this? If userspace, this needs to be fixed. If it's > only a kernel driver, it's fine as-is. This code is only called by a kernel driver. Thanks, Pavan