Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp366784rbe; Thu, 29 Feb 2024 01:43:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVI1nHJkDpuKatwJN/4PoDp5YWAzivWfe7E8fWOaGcrUvpDpXV3hJjW0p3gJ+Ttbxtu+eZ36DclBx9G2oEaSvNytCK2yxA5X1NZLbT02Q== X-Google-Smtp-Source: AGHT+IFTXwR5wFHn7XdQByclAugw0DbodrEwR9CvcKa9t2Z36LfS5RF/MLEls1W9KpagBzgL65jh X-Received: by 2002:a17:906:474c:b0:a44:553e:5a1d with SMTP id j12-20020a170906474c00b00a44553e5a1dmr348226ejs.20.1709199835066; Thu, 29 Feb 2024 01:43:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709199835; cv=pass; d=google.com; s=arc-20160816; b=Yt2aIkVL/e4LaFmQxH6QGT/uUDKp9OJtXTeN/L10R7X21hZ2+SH9aus8LQOqRCYMJX qZR6tSRV3mvAJHomRorlxJFphQckCZqVK1OLq8E69Fks+9teh/0fiisaBxxzE+h1dBBw bld34Vsrl9xpF4cmD5xUnqVcramT1nzYYDozWJHVr/iorjOEG1aPNfj7RWHuXwLJrQMd iiQRaq3UVhtpQSgZHPnSq7UaxE1H/hPTQtZIRkcd62/TGf/pdun+zyqc4Ve44gVuOk2T kA3/Jdv14xstpO6QhA4uJJdr6emIjHF8rgCwtVmsujUfdPhQs3K5siJN/zuuIL5htj8y jPPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1E8fUScuVIb9PNuZOQLJ10I99h2Cl/Dx6o6UuQGuxz0=; fh=2ydE2P/qGvwUzC0bFKyVV1u2uDo68lLX54XU6mX83uY=; b=xN2U9K53v/z74uNReWD7ufiS/ZJf7Qs79Spb3Ikaz7koskHRsuNwv1ZZnKN8JJ34z0 f1TEoa2my+4LxzQTHVLrhD/T1RNyDKZVHGFSfQFiKyL1g5ycGSy3YzkdWFwYLx9/FRcz zTZen69YGeocXo7CUm7cy821VB5KvQSqp5eJZF7F6OSf/kgLXEHU+OMb4OTWhXNIsD+G 7RSVbtoYskz7i2WNPPQPGQGlvSKnk66NXltb4eogQ79lF+mQchlL6tV7jtPt2fLMeFbU fxKQ+HQ6rLb/mUuZnLG7L4YfD32UISk1u8I+e8htdWUK49Js2yDKFVCIJ/IChZ9+22Ch SScA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cr0nGGfQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-86463-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86463-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gr22-20020a170906e2d600b00a44446be99fsi357837ejb.413.2024.02.29.01.43.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 01:43:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86463-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cr0nGGfQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-86463-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86463-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CD1121F26E85 for ; Thu, 29 Feb 2024 09:43:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0399D612C1; Thu, 29 Feb 2024 09:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cr0nGGfQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 21DBD612CE; Thu, 29 Feb 2024 09:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709199791; cv=none; b=VeGg7lwFHJiF4Iof8GM/jgLwSD7kC36+a650IN5xiC7saoYgSy/yN87jlpyvonxcazVvxCWNox3T6m+qAGFjgqYF8VVhK7XKAo5MHVTBbNlaCekHWDvWFE0s3V6Ue8YgzMVX6jj/qCtiHEWlu1MDZ8/a3EyyOk/KrEtfTw4HAXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709199791; c=relaxed/simple; bh=aDbHWCEN87gifEkin69igfn4UnaUalbm7Xpzz7Tjuw4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GidAiNcg8fvKSQwsYP9mGe7GJmLDEqQpXvGC/E53ASWYTy2hYf0IRSCNlF+sbB5QeUl8wlgpyfMGkrfT4ENmaepHJN1nRWA/OyVZrjNeFpe/0nl/S6Pnb3wI/KXzBRbmWkcvpQX03s3z/VZbrz3LyvTGoE/R3XtRIlLdga3c6V4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cr0nGGfQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1605BC43390; Thu, 29 Feb 2024 09:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709199790; bh=aDbHWCEN87gifEkin69igfn4UnaUalbm7Xpzz7Tjuw4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cr0nGGfQcPJzRlpgBOWurWE1FlP0/lVOeyoJ0y+JMWFPkBi7Z8r358ncafvax+LcU Utr4eykovmyPVLbRrMd9NNaM5I2CsGLModtc7FUdwAqEqrde8pi5ztd3SWRrtB7q2n yFcYOJo7yRqY5TEgHSWuwo52+FQvMzf/Px27hOyrwc90xeLmHZ8loRRFRRfZFIgy8H 6nplNOpn0Z+LhIHagrRGsVo3ANvtj8700A0dL9clQp1aeAWYxzr+8tRSUX5W6L9bWb vZzJ+9zg/s/2116gI22aOiKJiQCK8U4Z3pzPLfAI3O2e7nwXPGiAhbLXW8C5yO/cnj iqjhmV+h7jGzw== Date: Thu, 29 Feb 2024 11:42:23 +0200 From: Mike Rapoport To: Yaxiong Tian <13327272236@163.com> Cc: David Hildenbrand , rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com, keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com, akpm@linux-foundation.org, ardb@kernel.org, wangkefeng.wang@huawei.com, catalin.marinas@arm.com, will@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Yaxiong Tian , xiongxin Subject: Re: [PATCH] PM: hibernate: Fix level3 translation fault in swsusp_save() Message-ID: References: <20240226034225.48689-1-13327272236@163.com> <8d70939f-ca14-4167-9647-b8f44ddcbb98@redhat.com> <3399d2af-3d42-4ac1-9b74-8475bec25f7f@163.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3399d2af-3d42-4ac1-9b74-8475bec25f7f@163.com> On Tue, Feb 27, 2024 at 03:51:25PM +0800, Yaxiong Tian wrote: > > 在 2024/2/26 17:14, Mike Rapoport 写道: > > On Mon, Feb 26, 2024 at 09:37:06AM +0100, David Hildenbrand wrote: > > > On 26.02.24 04:42, Yaxiong Tian wrote: > > > > From: Yaxiong Tian > > > > > > > > On ARM64 machines using UEFI, if the linear map is not set (can_set_direct_map() > > > > return false), swsusp_save() will fail due to can't finding the map table > > > > under the nomap memory.such as: > > can_set_direct_map() has nothing to do with presence or absence of the > > linear map. > > > > Do you mean that kernel_page_present() presumes that a page is present when > > can_set_direct_map() returns false even for NOMAP ranges? > Yes, in swsusp_save()->copy_data_pages()->page_is_saveable(), > kernel_page_present() presumes that a page is present when > can_set_direct_map() > returns false even for NOMAP ranges.So NOMAP pages will saved in after,and > then > cause level3 translation fault in this pages. So this should be the description of the problem in the changelog rather than saying "if the linear map is not set (can_set_direct_map() return false)" > > > > QEMU ARM64 using UEFI also has the problem by setting can_set_direct_map() > > > > return false. > > > > Huh? > > Why would you do that? > > > I discovered this problem when upgrading from 5.4 to 6.6 using the 5.4 > configuration. > So I using latest linux-next code,find the problem still exist.To rule out > the effects > of a particular machine,I also use qemu to check it. I believe this can be reproduced if you boot with rodata=off and then a better description would be something like This issue can be reproduced in QEMU when booting with rodata=off -- Sincerely yours, Mike.