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 2E1B9CAC599 for ; Tue, 16 Sep 2025 13:19:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B75F010E08B; Tue, 16 Sep 2025 13:19:50 +0000 (UTC) X-Greylist: delayed 556 seconds by postgrey-1.36 at gabe; Tue, 16 Sep 2025 13:19:48 UTC Received: from 13.mo561.mail-out.ovh.net (13.mo561.mail-out.ovh.net [188.165.33.202]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1D6F10E08B for ; Tue, 16 Sep 2025 13:19:48 +0000 (UTC) Received: from director6.ghost.mail-out.ovh.net (unknown [10.109.249.107]) by mo561.mail-out.ovh.net (Postfix) with ESMTP id 4cR2MB2tcWz6TbL for ; Tue, 16 Sep 2025 13:10:30 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-t8q8x (unknown [10.108.42.124]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id BF887812EE; Tue, 16 Sep 2025 13:10:28 +0000 (UTC) Received: from etezian.org ([37.59.142.105]) by ghost-submission-5b5ff79f4f-t8q8x with ESMTPSA id NoBdB8RhyWhGFQAANDFDZw (envelope-from ); Tue, 16 Sep 2025 13:10:28 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-105G00630f26057-5988-43ac-a5ce-a2f17a65ee7d, 15C4845B0CE7FC90BB5A3BE606FC2E1917F11B68) smtp.auth=andi@etezian.org X-OVh-ClientIp: 178.39.90.92 From: Andi Shyti To: intel-gfx Cc: Andi Shyti , Taotao Chen Subject: [CI 1/2] drm/i915: set O_LARGEFILE in __create_shmem() Date: Tue, 16 Sep 2025 15:09:55 +0200 Message-ID: <20250916130956.3913547-2-andi.shyti@kernel.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250916130956.3913547-1-andi.shyti@kernel.org> References: <20250916130956.3913547-1-andi.shyti@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 7045037194932193869 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdegtdeihecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetnhguihcuufhhhihtihcuoegrnhguihdrshhhhihtiheskhgvrhhnvghlrdhorhhgqeenucggtffrrghtthgvrhhnpeejleekkedugfeuuddvhffhgeekgeeivddtieefveejvedtgfdvhfeukedtgfeufeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduvdejrddtrddtrddupddujeekrdefledrledtrdelvddpfeejrdehledrudegvddruddtheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomheprghnughisegvthgviihirghnrdhorhhgpdhnsggprhgtphhtthhopedupdhrtghpthhtohepihhnthgvlhdqghhfgieslhhishhtshdrfhhrvggvuggvshhkthhophdrohhrghdpoffvtefjohhsthepmhhoheeiudgmpdhmohguvgepshhmthhpohhuth 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" From: Taotao Chen Without O_LARGEFILE, file->f_op->write_iter calls generic_write_check_limits(), which enforces a 2GB (MAX_NON_LFS) limit, causing -EFBIG on large writes. In shmem_pwrite(), this error is later masked as -EIO due to the error handling order, leading to igt failures like gen9_exec_parse(bb-large). Set O_LARGEFILE in __create_shmem() to prevent -EFBIG on large writes. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202508081029.343192ec-lkp@intel.com Fixes: 048832a3f400 ("drm/i915: Refactor shmem_pwrite() to use kiocb and write_iter") Signed-off-by: Taotao Chen Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20250822030651.28099-1-chentaotao@didiglobal.com Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c index e3d188455f67..b9dae15c1d16 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c @@ -514,6 +514,13 @@ static int __create_shmem(struct drm_i915_private *i915, if (IS_ERR(filp)) return PTR_ERR(filp); + /* + * Prevent -EFBIG by allowing large writes beyond MAX_NON_LFS on shmem + * objects by setting O_LARGEFILE. + */ + if (force_o_largefile()) + filp->f_flags |= O_LARGEFILE; + obj->filp = filp; return 0; } -- 2.50.1