Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1498998imm; Tue, 22 May 2018 05:10:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZos4yuVSX9Gc8hBu60P8zirmsOpeb/Lhmbtfk8fDmddkmM/yu01XHTMxuuXE4E8HmpZ3oG6 X-Received: by 2002:a63:375d:: with SMTP id g29-v6mr8678638pgn.413.1526991039966; Tue, 22 May 2018 05:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526991039; cv=none; d=google.com; s=arc-20160816; b=WRzYlIUmAXzDoLcQdGN1OQmuyHdrkLV+wRzlN2XbnOhTRLYk6ermhrMLNlfrVzr1Zr 6NyGaMgjMJ6BtQ5NV9thLxQViQB9Oudarbb7bgXPiXfJiEMuGY0BjiG6EBmSxoLUFLH/ 7zicMqX9JeGmbbDjkO1hR/lTNom+slpSPTBl4e4QPQr67J8uOIAdWx2WOewXV+ohtY4f Aba+f3lGJDyPKbOfaoMlvvqf0uR9Quy+USiuVjkO9iUgkCdvS/jw+raeLxpIx5ncXgq5 SjUZaJkoCYaaJMQ64k30blWakYXiS/KxyGzmq1Kayt0UvavLzkbeMqhK5g8a1rqb6Xo6 uKOA== 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:arc-authentication-results; bh=8qfG//aTy5zS0lObZ3W3RCzTsMJgJbiqpbh2nMpXjcA=; b=vOB01+Rhbm7Gvgkyz+QFnc8jD50Jq8Grqa6IULzzTyJqfiaMEGlZBR+ghYxsPORrkS yJoQYmtRcNAFtVeytRtRASHOxL8hEQKkEQ6fKUePzrDXx7tIzzBLVGNwP3AJ9ij6duCL Owi14MZIvEZ++TVIbJwlSR7jb12TA5BM0u/BM93Q3345zwZfC4RwThheQMuFREerazkV Se+aUObtD2gEM/1PYCV80hEBbY8puywqnOf33OEuiDQYhtfrWDNctVJqeqVV5ZSLLPHY iju/inE5oPdPqk+jc/+on/li7psvDAAT2GUBjyKeywUmc2BYjG15VrJz4to0udrB+2VZ ugiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si16798585pfi.212.2018.05.22.05.10.25; Tue, 22 May 2018 05:10:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753081AbeEVMIw (ORCPT + 99 others); Tue, 22 May 2018 08:08:52 -0400 Received: from sauhun.de ([88.99.104.3]:58588 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752978AbeEVMIn (ORCPT ); Tue, 22 May 2018 08:08:43 -0400 Received: from localhost (p54B334DC.dip0.t-ipconnect.de [84.179.52.220]) by pokefinder.org (Postfix) with ESMTPSA id 8ECCA3640AB; Tue, 22 May 2018 14:08:41 +0200 (CEST) Date: Tue, 22 May 2018 14:08:41 +0200 From: Wolfram Sang To: George Cherian Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, jglauber@cavium.com, kamlakant.patel@cavium.com, mchehab+samsung@kernel.org, davem@davemloft.net, gregkh@linuxfoundation.org, akpm@linux-foundation.org, linus.walleij@linaro.org, rdunlap@infradead.org, Jayachandran C Subject: Re: [PATCH 3/4] i2c: xlp9xx: Make sure the transfer size is not more than I2C_SMBUS_BLOCK_SIZE Message-ID: <20180522120841.xtyw7g7s6rgcncbk@ninjato> References: <1526454019-32714-1-git-send-email-george.cherian@cavium.com> <1526454019-32714-4-git-send-email-george.cherian@cavium.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uddql2xo6t67nggg" Content-Disposition: inline In-Reply-To: <1526454019-32714-4-git-send-email-george.cherian@cavium.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --uddql2xo6t67nggg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 16, 2018 at 12:00:18AM -0700, George Cherian wrote: > For SMBus transactions the max permissible transfer size is > I2C_SMBUS_BLOCK_SIZE. It is possible that some clients might > not follow it strictly occasionally. > This would lead to stack corruption if the driver copies more than > I2C_SMBUS_BLOCK_SIZE bytes. Add a check to avoid such conditions. >=20 > Signed-off-by: Jayachandran C > Signed-off-by: George Cherian Applied to for-next, thanks! --uddql2xo6t67nggg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlsECEkACgkQFA3kzBSg KbYq9A/7B4HTTO6hBkJ6oXeL7VadcJD24v2z0ldMhOnkxA7gXigqPawheb1bwa6q xmfj8faoeRkn2EdQcAMIiS5AgbZTle2ZZdu3JCnze2ntfGUQye6dJ88rd7jc2tM5 HLWk7vqwZeYGQcoVVRsg0MPORkbueVnAPjKGuclRtJ4ZrwMacO7/hKPhhZIH9ETY RArWcYYH2iInxdocH+FRqBPresKnF0Gf6V5L7xmbIxq+RKNAjX7M27Q+SC0wO5yN AJZYDDsJEdJsculSymCg3CQL7KHoeUry21xdtzQMw2egMfOsFoKjDZIV143AY3PH S0jpQIjlT8xsTGo5M1rkUR2D1P0WpRl0C9sO+LOYWcaCP08QR6LCuUUAWCPqO92r UXk4lQ0EY8uhaiucVFXWfTzVy63+z+tEYkf3grAKtta83TT/51ndWSU0z440Zyt1 RxJf6LtW/sgQcFXgXmx8db1g5nlZ92aGOrh2UuGkIjMLBqO9a0FM6/yoPTmHjmnv WC7DIvHm1iYpBpyLALJPmPR8dqLXUpE8vSh6SLC7jUzi+L/wjtP9wKwfIpdm+T/W /KlXW9dXf2WFcG1TO6Wq1ZBDReN+OdyD/mCu4ZZcIFV/fjM30VD0JlFau90kDLaQ kzRqwer2+9i90SuQQ64cWtkonLNPxfVXXbjRPptQRG7XyEsB/68= =0rM2 -----END PGP SIGNATURE----- --uddql2xo6t67nggg--