Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2204539ybt; Sun, 28 Jun 2020 11:21:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoG1m1XPuUWHLmAUg8Ogt0oxfSzsJPKVzFw8EjJ3/8fOWhVM6FWvtWRfIDbWo2KQ0DMOWL X-Received: by 2002:a50:9306:: with SMTP id m6mr13951046eda.216.1593368475674; Sun, 28 Jun 2020 11:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593368475; cv=none; d=google.com; s=arc-20160816; b=FascVx7fYCsnDho+SqimDu6e2r9nq7+oQXjOzGOPHQCj/HK8U5cBV+ijOoiZSyngfb l5GoFBn8kAtonY2EjS/fjQafygbJsyLz14zguuLxM9M4+Z1vEP+zSxgzE/Mw/bVh7wkK B1JhKofIzK94tM0Q+5uJ5ly0+kmMfoV6H4Vyms6Dp2aWIqbb4d6uDnMoGVcqI7ZPSWuV yVaZ/QS91nFgkydTuPfSFAfS6qEZl9FmLYugrHjGr+Rrzisr39vvUaKXZAyE6UxwHm4i WFgrWadRCUDKuMrjWp7Vh3qUiqCPbCy0ejKo6xYNkorydUmAtBj0e79Zy2i84c/HrIVR gsfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=mJdeqRRfp4KUg3wBWVdscHAdRGPEb96rgQgGzA1k/d4=; b=UGsA/AL1I3bI2KLyosYBXo50YvN+AE/v0+6qGHC3CsbtLxl2yfHyIlBEjzIl6FGR9t n6e85qyhsXdh+ZzYesA4oHo0Lz9qwnOOoROWRZb8Fxm1vbsVGZ5CEGWoGjA5Lhg2ngBF SjjAuMPtLSB3U3PnDPQ7pQkPSEG8678zFj9I2XqiiBjahCYVqQojaIdf2HTFJWEu50Vm f93thEN0NEEaAFznHtBQTe8LIsTauyIPjBkGpeJmyI6wdANOYa6nK8iYMo2Brhuvd0Ha ZJUdull558wVSUcHseQ93D5bRWfqUTLawzblws/JKWZO5n8Fp9Ebjv/hd0R++AHXfZDP VrSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si20305108eje.123.2020.06.28.11.20.52; Sun, 28 Jun 2020 11:21:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbgF1SUW (ORCPT + 99 others); Sun, 28 Jun 2020 14:20:22 -0400 Received: from sauhun.de ([88.99.104.3]:34542 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726060AbgF1SUV (ORCPT ); Sun, 28 Jun 2020 14:20:21 -0400 Received: from localhost (p54b335b3.dip0.t-ipconnect.de [84.179.53.179]) by pokefinder.org (Postfix) with ESMTPSA id 543AA2C0095; Sun, 28 Jun 2020 20:20:19 +0200 (CEST) Date: Sun, 28 Jun 2020 20:20:15 +0200 From: Wolfram Sang To: =?utf-8?B?TcOlbnMgUnVsbGfDpXJk?= Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] i2c: core: check returned size of emulated smbus block read Message-ID: <20200628182015.GA1274@ninjato> References: <20200613104109.2989-1-mans@mansr.com> <20200626082208.GA4559@kunai> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > I saw it with the mv64xxx (Allwinner) and omap (Beaglebone) drivers. > From a quick look, it seems like quite a few others have the same > problem. Okay, well, to be fair, both drivers don't advertise I2C_SMBUS_BLOCK_DATA. The client driver should check for that. Anyhow, it makes sense to have your additional check in the core as fallback safety. --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl7431sACgkQFA3kzBSg KbZ8lhAAsFt5LNhF1SI2Icc//SnkzxmhFirxO/4jucUpvTQqt+jMRK5oCskj7Cdp p2SKK6JqCA5zNSWVy/rNV/GDyIPy90qjuaxn0jgWii8O+HQj1FI07aOIGoLvix1r aZaKala71kODJQR/0mp8qnw4gSHfyCilvZWfCtDVR6TLHWVyN24EIES1KsZgtXe6 CVFIbcaKUgz9pTDzy6teTX81/FJWAcW8ifhYKiFOKgz0WR/tJThZ6wEwXbEQoPGR fBGyczzw8Q5cKCBy38+i2bTOotWwN1wfMkpJktNb/yG/uj65eOPv/qlh3pgEe+Hc RLWCtgHaNN1QcI0jnUTaiI+poDvWGA3I4SAjVVDO5uoQKTO2S11SE6F1FDVXQaXS DD22nOWTPpSb4NA/asaxk4ZM7v9k0Ugayp3IWBHqb+BF9xKKhhfoXzWH3MO3fTBn +7WBZmynlmI8S5F1+7jtd+1FBPW5/BDhWq+JeVKVpyIFJ+hWIS9wTDWJjSR1DhVv m8QWu1HJAiYWrMzQyDEUg/Y1CNdwlyQH7/o4cyN4rTJ0r4/K8KTeD7vYxcSvaHcY gUrXesYmtMyrnxu5ch3cdOFqSmM3sD8++1/czqo4DGYzp+UbAuHX24FdQZ7dwuT1 eqIryR6y5iUmh0RDBc/i2cvoO63uRrNnuU5+yTqYrz74IVPfSp4= =oRHU -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5--