From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 068D2C36002 for ; Mon, 24 Mar 2025 12:56:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FFE610E2FE; Mon, 24 Mar 2025 12:56:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="RZPwQE7h"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id B07D410E300; Mon, 24 Mar 2025 12:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742821004; x=1774357004; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=Yw8mKDKj4A5P3nno8n0/AvNsmNsgLb9K768q7zqzFrw=; b=RZPwQE7hhW8d9ZXfYqEJenbqekR+Elw0Y8/nByB1PEg3lrjPhPNTJmTU xerx9pz/B5rsAp2Yt3wNZ2XelSf537qIbQj1W5hAXfu7BpccPVXh+/fxy ZmksXXlr4pYnRSketbpfvjaXIlgZ81h8UZzT152BwqH4AZKvLxwMSrZfu Zm+OEd5T+8Qx4T9n37KFl4M9i3sGvUXBjOZIwjlv9B3m6OagRLbRmfiKj Shy9K6IH0u0zxNYVPEiB7SKxWMIdJwaRApFjTqV/0FFKQJKxOt1PKFiGY jB6Q3HSF8ZhoVMW7MW3YrRiC7bcADXRrjc2XHACB1+wl4sxjUPZsiy+oh A==; X-CSE-ConnectionGUID: HEKigRmiQzGJBC3MNHyglA== X-CSE-MsgGUID: 4yq/WqSHRXeGBkran+xZhA== X-IronPort-AV: E=McAfee;i="6700,10204,11383"; a="47897238" X-IronPort-AV: E=Sophos;i="6.14,272,1736841600"; d="scan'208";a="47897238" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2025 05:56:42 -0700 X-CSE-ConnectionGUID: MEoT5RkMRFiEdaKjS/hAkg== X-CSE-MsgGUID: PIRSDpiYSi2Ywp9dx8LvHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,272,1736841600"; d="scan'208";a="128732811" Received: from kniemiec-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.246.30]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2025 05:56:38 -0700 From: Jani Nikula To: Nicolas Chauvet Cc: Zhenyu Wang , Zhi Wang , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, stable@vger.kernel.org, Kees Cook Subject: Re: [PATCH 2/3] [RFC] drm/i915/gvt: Fix opregion_header->signature size In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20250324083755.12489-1-kwizart@gmail.com> <20250324083755.12489-3-kwizart@gmail.com> <87pli6bwxi.fsf@intel.com> <87h63ibwma.fsf@intel.com> Date: Mon, 24 Mar 2025 14:56:35 +0200 Message-ID: <87msdaa8os.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 24 Mar 2025, Nicolas Chauvet wrote: > Le lun. 24 mars 2025 =C3=A0 10:34, Jani Nikula > a =C3=A9crit : >> >> On Mon, 24 Mar 2025, Jani Nikula wrote: >> > On Mon, 24 Mar 2025, Nicolas Chauvet wrote: >> >> Enlarge the signature field to accept the string termination. >> >> >> >> Cc: stable@vger.kernel.org >> >> Fixes: 93615d59912 ("Revert drm/i915/gvt: Fix out-of-bounds buffer wr= ite into opregion->signature[]") >> >> Signed-off-by: Nicolas Chauvet >> > >> > Nope, can't do that. The packed struct is used for parsing data in >> > memory. >> >> Okay, so I mixed this up with display/intel_opregion.c. So it's not used >> for parsing here... but it's used for generating the data in memory, and >> we can't change the layout or contents. >> >> Regardless, we can't do either patch 2 or patch 3. > > Thanks for review. > So does it means the only "Fix" is to drop Werror, at least for intel/gvt= code ? Of course not. The fix is to address the warning. There's another thread about this, see my suggestion there [1]. BR, Jani. [1] https://lore.kernel.org/r/87r02ma8s3.fsf@intel.com > I have CONFIG_DRM_I915_WERROR not set but CONFIG_DRM_WERROR=3Dy, (same as= Fedora) > Unsure why the current Fedora kernel is unaffected by this build failure. --=20 Jani Nikula, Intel