From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alyssa Rosenzweig Subject: Re: [PATCH v2] drm/panfrost: Document base field location constraint in panfrost_gem_object Date: Fri, 29 Nov 2019 09:16:59 -0500 Message-ID: <20191129141659.GA2921@kevin> References: <20191129135614.2439058-1-boris.brezillon@collabora.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0735410521==" Return-path: Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 982876E91A for ; Fri, 29 Nov 2019 14:17:05 +0000 (UTC) In-Reply-To: <20191129135614.2439058-1-boris.brezillon@collabora.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Boris Brezillon Cc: Rob Herring , dri-devel@lists.freedesktop.org, Steven Price List-Id: dri-devel@lists.freedesktop.org --===============0735410521== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Reviewed-by: Alyssa Rosenzweig On Fri, Nov 29, 2019 at 02:56:14PM +0100, Boris Brezillon wrote: > I've spent hours chasing a memory corruption that was caused by > insertion of an extra field field before ->base. Let's document the > fact that base has to be the first field in panfrost_gem_object. >=20 > Signed-off-by: Boris Brezillon > --- > Changes in v2: > * Use the proper prefix in the subject line > --- > drivers/gpu/drm/panfrost/panfrost_gem.h | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.h b/drivers/gpu/drm/pa= nfrost/panfrost_gem.h > index b3517ff9630c..d480261fc177 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_gem.h > +++ b/drivers/gpu/drm/panfrost/panfrost_gem.h > @@ -10,6 +10,10 @@ > struct panfrost_mmu; > =20 > struct panfrost_gem_object { > + /* > + * Must be the first element because we're using some of the > + * drm_gem_shmem helpers. > + */ > struct drm_gem_shmem_object base; > struct sg_table *sgts; > =20 > --=20 > 2.23.0 >=20 --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEQ17gm7CvANAdqvY4/v5QWgr1WA0FAl3hKFQACgkQ/v5QWgr1 WA33TQ//ScFnJYrE8MH6Mm7JrrqMC8fC3bIUREHewlzvKjhkvUMcCxfRx9mLKYmn OU5B9PimW/nzDnYxlsNvs4YeTpKH1oepJ2cghJoPuu7hvGo8Kweg2XXQoCfqv/JF jRxxwvH1Y4ST4rFzRLE0vjXdk8TNhDl9zgvUeTHt4J6DJe7s6zs/MpE56jSCoN+1 DM0aNGyoV70IpUBtgdRwVEInPxaPQ0zWd8nm02XvOY8gogGg5L65O10oTITUxsQa JhbKFpa0os1Eg+nPBn4fwzdP7Uk3fZsGLsYAWrh+/yi8DxpWXW4Z4zsdflGha0nQ 5hV2pGbiwunfrS9GSBUkZLqt09wLM4IW8iIEmncGg5ofHmmfWD6pSQ1tCQksvX2u 0dJnn0DY5o1STHTBpRjD8eslzdKLhWIn2nRbYTpDwBvzW2t3Wo+Nfel9BHUaI5f2 A+KqEdOEp8ydnVMJBRQUWqMaEP+KcYmS+Rrxb0hcYwV1xzFI6cfBmLMXh/8z6a2t xe67lHoJXKToO+prpS22EEl0WI72O1kD05bbtpSs+b1dP2CnOWwgRMEE39fTqIPi qJWFCt2Ni6rbi1cGs8cQDD2I9PTTtH6AdQ7wx0hf/rkm7UwZ+H1JJ+DKpxvA3xMW DP+ubJoY3TMxSl/Rxc9rx7Zl5Jxa/SrO/bqNUNrXF/C+9PsHbNc= =OhDF -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- --===============0735410521== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0735410521==--