Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp172906rwe; Fri, 14 Apr 2023 00:34:11 -0700 (PDT) X-Google-Smtp-Source: AKy350bTM77sLSoAPX4SzUl16CfVpaAdcX4adKEFAQgY07U/oZdyWpOTxtZW0PXEcAfGssP+Xij7 X-Received: by 2002:a05:6a20:2907:b0:e6:f7e8:1e4d with SMTP id t7-20020a056a20290700b000e6f7e81e4dmr4543623pzf.33.1681457651199; Fri, 14 Apr 2023 00:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681457651; cv=none; d=google.com; s=arc-20160816; b=nBxS4q0KNH5LxouImZWBEiARUxjjkQA/v10oZ2SRjNbGdZIOhtxuhXAwc6TUPG2I/w +oXvPMoxU012lXchIjav7XX6ZBNfslm4szBCaZwaDue5bX9iZz38GksGQR4aPdw94VIB W28lqTVGxPCVCrmOFgkc9NIw2QZxifokpj3SdQdCmQwHHxpM4abahC78AsPvr6OqDRxm tsu7Nme/cdcVzyMdpofxIVMPEsjlrHuFMVb/tUzHK4xyjX7Tc9mOcJfwCw2yUMFvMEDo 2pEe/KaH05uPXT2dK+3IGFr49Ab/V1Ffchlz2K/O9aqZheuhP198zV0suJqfh1iqapvB BaRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:from:content-language:references:to :subject:user-agent:mime-version:date:message-id:dkim-signature :dkim-signature; bh=0zP51UY+fOf6gAmW+I5A2PvdKkX246+o2tJSjCTWQUQ=; b=GqDXgUjZ/6eXE7WElGQDlVkC7MR8RZC58QForqFdF3j1Q8RrRAcsa4Z6GAOt4y3aZn A4xd+gJSCQhbV5QGfLMR8QNOFRFr8sjQCejky1qjxwGRijGGYIBszouu0xkcGU0gKlw8 77thsHzs2Zo987N3UEKoNZnpRR64BuAdW9HFDuB4Xk0suSLD3h1OefX8RkU8FkEvSS8X OnK0XycU7uf77v2f0tAGfqfb4y4tUmOBY2LxBeN2fQfmlrfzw82Jtp+kecf31RrvXp45 BnbbGJDyAmPegJ38XU07tyTcfKWDMkbWMPq7LG4tRiTeqHq4qoUOKvPSih/kUnSWgnYp CAwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vnBBpxW3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=KRxsUIVI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 200-20020a6306d1000000b005193a2c7b1esi4047699pgg.447.2023.04.14.00.33.59; Fri, 14 Apr 2023 00:34:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vnBBpxW3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=KRxsUIVI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbjDNH3A (ORCPT + 99 others); Fri, 14 Apr 2023 03:29:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229762AbjDNH25 (ORCPT ); Fri, 14 Apr 2023 03:28:57 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEB0711B; Fri, 14 Apr 2023 00:28:56 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9003C21116; Fri, 14 Apr 2023 07:28:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681457335; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0zP51UY+fOf6gAmW+I5A2PvdKkX246+o2tJSjCTWQUQ=; b=vnBBpxW3yDTifAg2bVrerKjQdzhoXi0hh3/WZ4m+sgwdinBlgL/eNPylwt/NimR4BKsTFY oOLNH0IArda+x+T2kRhUL3nTI4NZYj5ImBc/JjZS5Al0fn6UO/lH1peSgSqRCPwwa0Ta+m 7GVa0IZbbuOTipEODDcZg2Llvlk8vI8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681457335; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0zP51UY+fOf6gAmW+I5A2PvdKkX246+o2tJSjCTWQUQ=; b=KRxsUIVIUJMYlCo4JdOJJMV5it0V79jk83M+y+iUpVSVxoARBiDWf1u57NYt/mCMgb84SE HeEaphwbquEQw8Cw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3D34613498; Fri, 14 Apr 2023 07:28:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id aB6dDbcAOWRkTAAAMHmgww (envelope-from ); Fri, 14 Apr 2023 07:28:55 +0000 Message-ID: Date: Fri, 14 Apr 2023 09:28:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access To: Sui Jingfeng <15330273260@189.cn>, Maarten Lankhorst , Maxime Ripard , David Airlie , Li Yi , Helge Deller , Lucas De Marchi , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, loongson-kernel@lists.loongnix.cn References: <20230409132110.494630-1-15330273260@189.cn> <42f16d0d-4e1a-a016-f4cc-af24efa75f1c@189.cn> <531f0bdf-2ae8-0361-183b-57b40df6345f@189.cn> <1bbc7228-c2fe-0af0-c15c-b378bc4d111c@suse.de> Content-Language: en-US From: Thomas Zimmermann In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------SLLMbNX0pV34UUWknj6mKLwO" X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------SLLMbNX0pV34UUWknj6mKLwO Content-Type: multipart/mixed; boundary="------------jNtpzqSLr8Zjut6npS1i8Gn7"; protected-headers="v1" From: Thomas Zimmermann To: Sui Jingfeng <15330273260@189.cn>, Maarten Lankhorst , Maxime Ripard , David Airlie , Li Yi , Helge Deller , Lucas De Marchi , linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, loongson-kernel@lists.loongnix.cn Message-ID: Subject: Re: [PATCH] drm/fbdev-generic: fix potential out-of-bounds access References: <20230409132110.494630-1-15330273260@189.cn> <42f16d0d-4e1a-a016-f4cc-af24efa75f1c@189.cn> <531f0bdf-2ae8-0361-183b-57b40df6345f@189.cn> <1bbc7228-c2fe-0af0-c15c-b378bc4d111c@suse.de> In-Reply-To: --------------jNtpzqSLr8Zjut6npS1i8Gn7 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SGkNCg0KQW0gMTMuMDQuMjMgdW0gMjI6MDEgc2NocmllYiBEYW5pZWwgVmV0dGVyOg0KPiBP biBUaHUsIEFwciAxMywgMjAyMyBhdCAwOToyMDoyM1BNICswMjAwLCBUaG9tYXMgWmltbWVy bWFubiB3cm90ZToNCj4+IEhpDQo+Pg0KPj4gQW0gMTMuMDQuMjMgdW0gMjA6NTYgc2Nocmll YiBEYW5pZWwgVmV0dGVyOg0KPj4gWy4uLl0NCj4+Pg0KPj4+IFRoaXMgc2hvdWxkIHN3aXRj aCB0aGUgZXhpc3RpbmcgY29kZSBvdmVyIHRvIHVzaW5nIGRybV9mcmFtZWJ1ZmZlciBpbnN0 ZWFkDQo+Pj4gb2YgZmJkZXY6DQo+Pj4NCj4+Pg0KPj4+IGRpZmYgLS1naXQgYS9kcml2ZXJz L2dwdS9kcm0vZHJtX2ZiX2hlbHBlci5jIGIvZHJpdmVycy9ncHUvZHJtL2RybV9mYl9oZWxw ZXIuYw0KPj4+IGluZGV4IGVmNGViOGIxMjc2Ni4uOTljYTY5ZGQ0MzJmIDEwMDY0NA0KPj4+ IC0tLSBhL2RyaXZlcnMvZ3B1L2RybS9kcm1fZmJfaGVscGVyLmMNCj4+PiArKysgYi9kcml2 ZXJzL2dwdS9kcm0vZHJtX2ZiX2hlbHBlci5jDQo+Pj4gQEAgLTY0NywyMiArNjQ3LDI2IEBA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yBhbmQgYSBudW1iZXIgb2xkZXIgb2YgZmJkZXYgDQpkcml2ZXJz LiBOb3RoaW5nIGVsc2UgdXNlcyBkZWZlcnJlZCBJL08gYW5kIHRoZSByc3AgZGFtYWdlIGhh bmRsaW5nLiANCkFueXRoaW5nIGVsc2Ugb3BlcmF0ZXMgZGlyZWN0bHkgb24gbWVtb3J5IGJ1 ZmZlcnMuIChpOTE1IGlzIGEgYml0IA0Kc3BlY2lhbCwgYnV0IGRvZXNuJ3QgdXNlIHRoaXMg ZGFtYWdlIGhhbmRsaW5nLikgIFRoZSBmdW5jdGlvbiByZWFsbHkgDQpzaG91bGQgbm90IGJl IGhlcmUuDQoNCkknZCBwdXNoIGJhY2sgb24gYWRkaXRpb25hbCBEUk0gY29kZSB3aXRoIGZi ZGV2IGRlZmVycmVkIEkvTy4gRHJpdmVycycgDQpmYmRldiBzaG91bGQgZWl0aGVyIG9wZXJh dGUgZGlyZWN0bHkgb24gR0VNIGJ1ZmZlcnM7IG9yIHRoZSBkcml2ZXIgDQpzaG91bGQgZW1w bG95IGZiZGV2LWdlbmVyaWMuDQoNCkJlc3QgcmVnYXJkcw0KVGhvbWFzDQoNCj4gDQo+IEJ1 dCBhbHNvICpzaHJ1ZyouDQo+IC1EYW5pZWwNCg0KLS0gDQpUaG9tYXMgWmltbWVybWFubg0K R3JhcGhpY3MgRHJpdmVyIERldmVsb3Blcg0KU1VTRSBTb2Z0d2FyZSBTb2x1dGlvbnMgR2Vy bWFueSBHbWJIDQpNYXhmZWxkc3RyLiA1LCA5MDQwOSBOw7xybmJlcmcsIEdlcm1hbnkNCihI UkIgMzY4MDksIEFHIE7DvHJuYmVyZykNCkdlc2Now6RmdHNmw7xocmVyOiBJdm8gVG90ZXYN Cg== --------------jNtpzqSLr8Zjut6npS1i8Gn7-- --------------SLLMbNX0pV34UUWknj6mKLwO Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEExndm/fpuMUdwYFFolh/E3EQov+AFAmQ5ALYFAwAAAAAACgkQlh/E3EQov+B3 sg//cQx876aOejVGp8xtzsCzYoIXn0YKbCR0nJPlIu1mO9jjPHuWt1nJXoK15BT7IWkX+REK6iIv psX9tGmSjglWQqfpes3gFre7vfc4ZbQlYhjrPTOJ66Nn5kc9YZ0wkodD5cWma4HWTTTSJJJo6RLM xDOqtoem8VQHBm9ds8nWGIrxc8fjixfrZyiFeHKldcbx4w/SfnjZVMtiPz9ASdnwSYuSCcGPiDk9 ZYovB0JV8rcDRFXoa0BfwdyFcbhbOPvEJLb5CKwat3cvOVvfVpnDgQPRbIIwSiwNPkEawpSQn05P PI+3kAdfGsAI0JALgdRmqC/JFxsAGSb5m89dQP4hBsdzQPWt5LCdwGux9zbaNJd3YKnt4nOyPIRl DGBE2f8Fpq6CwHYQFvgnyDmeOWPOEKCrZgdlUgEoIHIIurzjW+P1Vm2JNnnP5sVTZewetEJoNRm4 apAfpe9w+6XLJAH1smKDzo1zCMQm28uGzGV0wwr8GsPjUoaNVeSE4e/aYTwhJ0lTHSIq0CqwKUJX W2axBGgLihPp15UynrPuzYKUYiqR8h4noomEGjnEFxmwWYUeMeay8J66udNXNzc3yXToq3u64S7Z Wyz4m1u43cqwMJt0RePLNYpoWfiDxWZhSrbuu081F6WHSIOerWd2RYoujZSYjbf51NOxYk4pjpvb WyE= =+hWa -----END PGP SIGNATURE----- --------------SLLMbNX0pV34UUWknj6mKLwO--