Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp961542lqh; Fri, 29 Mar 2024 02:39:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSufDiMZRnADjywaUkPMzVQ0X99WNPEzTwX5mAKu9Wpri0LGxjHHoCmMaueNOr0aCq5zrd2ItJUKYoYHJj/37JWqfKFWGumroZGLLFXA== X-Google-Smtp-Source: AGHT+IFLjpv7c5+27Ov7AZoEpuIgJYgDdDte3rbyrZ24KQFSE3BKlIqRoDwd+iHElJ/gqgLWVszH X-Received: by 2002:a05:6a00:139c:b0:6ea:86f2:24fb with SMTP id t28-20020a056a00139c00b006ea86f224fbmr1915100pfg.25.1711705184033; Fri, 29 Mar 2024 02:39:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711705184; cv=pass; d=google.com; s=arc-20160816; b=wgWSunHEDS3DpO9YDULi/jq3bzABamWBac9eb2cmxGN1S4zkaF1eL9Ly6/g7Ii0WqY Smaoj+2eewzU5hU28/RFYtIF+hjM6lD+1eJ42c+XUE0YJ1qL9V+MpFwXPPNfNFi8gkNr k1xGYu6+AdHYyP4hogU25DJ1NgSaf1ZQuswUQV1PfJ9vH+OY7EanoOZuZQF//uIMp1DO vBL4H4SlHtoeQIZrn/s3f8AbHivC5nIJ4YdDGx83A/nDccTZVdhfNgmT3k1iM2/n5J+z ZIV03JN+KRJMC2avEx4XX2V/rcNEugqDUn89ciJy8AP4RslYVNoQhb5Gxc6C0uJE42D+ 2v1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VXs6ey/qe21gDy6bI4pq/VFiG5S22hjAbje/fiiCjb0=; fh=NbYBLZC+ubBqlBOPyYqVhjqtbWdabH61uL0ORUdMTGw=; b=mrYNjWZXrSnql1bVSTfcU/KARjUuN/KRpFYBIoyALFlX7c5f9RnoF5vHfY0IO8az+b J+Bw3YQ82yPtogkCSzNzIek39Uhw0fQXIwgmz5MB1QGnuQq0U6EH6Y3gd+02Zq7XO38q gfsy3BQ9OKReyv0uIdugDVhk0/h33KVKvAJ0LQZsS0Cyh6dv4jVmy+iYtYOZMlJch7B3 XclHczUN9V1NHGm+7Wvfiffdad1RUkwBg9bmOh+xSxeWb0FTetlFcXQOo5E9XXlalV59 ktR9M3AS5/qgEC8OK7qc/QyVrif9oYO6LQQ6b//dP7ZfOdXKsHYY8BRprH6R6a33F0Qb VaJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gHj38MRq; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-124357-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124357-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id by18-20020a056a02059200b005e43cb39729si3624935pgb.870.2024.03.29.02.39.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 02:39:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-124357-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gHj38MRq; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-124357-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-124357-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 973D2B212FD for ; Fri, 29 Mar 2024 09:39:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D84045BFE; Fri, 29 Mar 2024 09:39:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gHj38MRq" 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 1E16922093; Fri, 29 Mar 2024 09:39: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=1711705170; cv=none; b=CrybszGNuGB8nbSMBDVQ5RCMj0SDBRWiiXe89AnPYuvMY2ife+jSpkjcMFT9J5Xo09Lw0x6MrM2ByoBs1qWrey6Fb2HyvFt0lqy4HtKbY3SAMF7uMESl7iL78w+3EPNnNa+PpO/KBfr3OAtzvAFiZcn20Aa58jxqo4WcvdT1KYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711705170; c=relaxed/simple; bh=Mm4Dxsw/XnK0vryR0/b2qb6rSQjEXbXIgtBX3y9Pv8w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FmQAW5QYmXT3DG9vBFytNXlqrr04muUr2W930oGuk9cKVKxQ/VMYAQHtthAYI8VT8efK6NZJN4rN0HJ7uDKF7vp0HXuquP2iCE4qJtyHNwseDMnBMioJeN/TUG5xHuWfnIpjCFPcU6g4LerL0aUWFpPEhiy60ppQDSdUy3xA1gc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gHj38MRq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37E6CC433F1; Fri, 29 Mar 2024 09:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711705169; bh=Mm4Dxsw/XnK0vryR0/b2qb6rSQjEXbXIgtBX3y9Pv8w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gHj38MRqOFrlrs/UQEVC1HqBIFcQZRYGOVE+Pn8dnmkAHeNzuUIN05iVFRqaxqsEs l9gKszHqzlim1EGWBE8MQM5PIEOK4Fc7ha12O5Iz3ltYTbWAE6gc/8DB2j+1oRGE+Z k//RKUPiaAix+xzEN7+mN1+4Z6j9xK4sWhXLYg8I= Date: Fri, 29 Mar 2024 10:39:21 +0100 From: Greg Kroah-Hartman To: Gong Ruiqi Cc: Jiri Slaby , Hugo Villeneuve , Jon Ringle , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Wang Weiyang , stable@vger.kernel.org Subject: Re: [PATCH stable 5.10] serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions for FIFO Message-ID: <2024032926-wielder-recreate-be4a@gregkh> References: <20240318025259.1412353-1-gongruiqi1@huawei.com> <07a3c30d-5a81-4b99-8090-38753b650432@huawei.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <07a3c30d-5a81-4b99-8090-38753b650432@huawei.com> On Mon, Mar 18, 2024 at 11:14:13AM +0800, Gong Ruiqi wrote: > Oops. + Cc stable@vger.kernel.org > > On 2024/03/18 10:52, GONG, Ruiqi wrote: > > From: Hugo Villeneuve > > > > commit dbf4ab821804df071c8b566d9813083125e6d97b upstream. > > > > The SC16IS7XX IC supports a burst mode to access the FIFOs where the > > initial register address is sent ($00), followed by all the FIFO data > > without having to resend the register address each time. In this mode, the > > IC doesn't increment the register address for each R/W byte. > > > > The regmap_raw_read() and regmap_raw_write() are functions which can > > perform IO over multiple registers. They are currently used to read/write > > from/to the FIFO, and although they operate correctly in this burst mode on > > the SPI bus, they would corrupt the regmap cache if it was not disabled > > manually. The reason is that when the R/W size is more than 1 byte, these > > functions assume that the register address is incremented and handle the > > cache accordingly. > > > > Convert FIFO R/W functions to use the regmap _noinc_ versions in order to > > remove the manual cache control which was a workaround when using the > > _raw_ versions. FIFO registers are properly declared as volatile so > > cache will not be used/updated for FIFO accesses. > > > > Fixes: dfeae619d781 ("serial: sc16is7xx") > > Cc: > > Signed-off-by: Hugo Villeneuve > > Link: https://lore.kernel.org/r/20231211171353.2901416-6-hugo@hugovil.com > > Signed-off-by: Greg Kroah-Hartman > > Cc: Hugo Villeneuve > > Signed-off-by: GONG, Ruiqi > > --- > > > > The mainline commit dbf4ab821804 ("serial: sc16is7xx: convert from _raw_ > > to _noinc_ regmap functions for FIFO") by Hugo has been assigned to be > > CVE-2023-52488, but for stable branches lower than 6.1 there's no > > official backport. > > > > I made up this backport patch for 5.10, and its correctness has been > > confirmed in previous communication with Hugo. Let's publicize it and > > merge it into upstream. I can not take this only in 5.10, it needs to also go into 5.15.y first, right? Please resend a 5.15.y and this 5.10.y version when you have both of them (the 5.10.y version wasn't sent to stable@k.o so it's hard to track down), and we will be glad to take them both. thanks, greg k-h