Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (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 EC5DB340D9A for ; Fri, 20 Feb 2026 12:05:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771589131; cv=none; b=bFqK44TADsSNS1DVBhAv2f+ZjDWFcK1ZUuEQxS/15n3qRiQfUZ+qyjDkg98gqyd+ZD38MoAwzDSfEiEPE/8yj3brDW2oAKgui8fEJAHu5KkxE4gZcEwDR6kuQQo1XQl7YTxH3C7rnNHbRFPXKWkgR7Mr7meUQ1KDhKwsQAA7+D4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771589131; c=relaxed/simple; bh=56wlGYkFRarFxjk57E/nbdjosfCFq5yM+8Rn9L7GM08=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y12uoS1CbtPC5mu5+d1G0QsYEn+RnEBO8BLfYUfEdjzunO7l4pIfl0eKzJqfLIUVqi8q8l+jo8YpPL2UGuUiNyTeoBRGMXx4jjoWcHQpTgTZvuUtSIapM1eJ/iOgh4TQr4SyANyPIDNtYCTzpDFqiBGMCCBOK+IiuA9uAEyFNHg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=XLagl7dS; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="XLagl7dS" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MKaDerf9XlYpAMt8vQkh18k7d7Z2ReBAbvlpGAvQAe4=; b=XLagl7dSznl7dE0GL57x04KwhS MApiccFf3PHv8r1WwDcoxFiIjR7hAXYf0+bwDIRT+DSxtGAj+JMxLrqVCS79OBgFJHH3YjomLby3T SxRSmBXuQ1b1csW3W0u5VDpmlOQkSI3CXW/j79pTbtpjPPVx0/c5yF/mVCrh9xt+HQAj/fDvJJzub 9yaspnAPQODWur8DiaOTgr4NqGtMqzUM0N7DGBtPWerac6zH0RmmdhUItY2N9PM7pRwLZZ+1O42Q7 2F3AE0Q/1nWK29/Z/kMqfes9W8aAFYW8Gx3YgUYHMowCe05cAH0PR/ce0/NCsTRbAqVnJ8akGDfz+ mSW3K5qg==; Received: from [90.240.106.137] (helo=localhost) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1vtPGC-002uyb-1U; Fri, 20 Feb 2026 13:05:28 +0100 From: Tvrtko Ursulin To: criu@lists.linux.dev Cc: David Francis , Tvrtko Ursulin Subject: [RFC 04/26] plugins/amdgpu: Fix drm pages size header Date: Fri, 20 Feb 2026 12:04:52 +0000 Message-ID: <20260220120514.4540-5-tvrtko.ursulin@igalia.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260220120514.4540-1-tvrtko.ursulin@igalia.com> References: <20260220120514.4540-1-tvrtko.ursulin@igalia.com> Precedence: bulk X-Mailing-List: criu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Size needs to be initialized before opening the file for write, otherwise garbage is written into the file. Signed-off-by: Tvrtko Ursulin --- plugins/amdgpu/amdgpu_plugin_drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/amdgpu/amdgpu_plugin_drm.c b/plugins/amdgpu/amdgpu_plugin_drm.c index e2fe4bd8a823..1ec133de262d 100644 --- a/plugins/amdgpu/amdgpu_plugin_drm.c +++ b/plugins/amdgpu/amdgpu_plugin_drm.c @@ -378,6 +378,7 @@ int amdgpu_plugin_drm_dump_file(int fd, int id, struct stat *drm) drmPrimeHandleToFD(device_fd, boinfo->handle, 0, &dmabuf_fd); snprintf(img_path, sizeof(img_path), IMG_DRM_PAGES_FILE, rd->id, rd->drm_render_minor, i); + image_size = handle_entry.size; bo_contents_fp = open_img_file(img_path, true, &image_size); posix_memalign(&buffer, sysconf(_SC_PAGE_SIZE), handle_entry.size); -- 2.52.0