From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E118D3CE481 for ; Tue, 16 Jun 2026 06:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781590807; cv=none; b=k+D51mTh4hx3Je9VQIRtZVLq02K6EJcSdfLmZlIMayB7ZQHdUNwSES7rVAXWysRLh7xWJgWv4yE/rzcq84l6NttMGXg23TNTF+7u1Aa5xdEMncEa5xEZ2j75U8SbFaNiZtVyClTt48d+e6mBmOWyzYo5jITXPPTPY5hRJkEOXLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781590807; c=relaxed/simple; bh=3jWXCb9nzGDdlpwcm5XDm1DLzz1gt8vgo8qdy7QykMw=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=cwRHJ4qsYHFiDRENgum8Pz9OFRRKVwX18mOKXJxH+RyLB+J6+j/UVWIpzv9IvKC7VT2CCjPy4XhCiFGuCb9yTvkOhAZ0IGIFWBdRpQbe3RFR56HRTIRx2i8gT38tx5eAicFFWElhoEm76fF9n9kj5+QGegYeQCYBkL3GVSBFxMY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=UTWjDhsO; arc=none smtp.client-ip=209.85.128.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="UTWjDhsO" Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-7dc6fbf3e86so52612117b3.3 for ; Mon, 15 Jun 2026 23:20:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1781590805; x=1782195605; darn=vger.kernel.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=gnltuqW5l5nPcDELedENMkU+jfNg+GYItheRAD/A5zg=; b=UTWjDhsOBQTF+NBsBKB5yqIF7/Y/ZROFtS2EQN1cyhmF1WwBn5EBokhMBoBo6w22je jwjTTtYGNQwHAB+hL/sk5mNAg5FvHKJMobqVsBKgw11uRDy6CawaPF4kRgdLRee9SDBU vGICrg2yJA4iX3N/3RCg2Ztk493e5tkAO2NjvzhHy7O5hxAfjH4HIisHj6j/LAwzeMrS Gk1HlN3PknSEGyytZcWTdYtB1XqCwk9CZdBNFHdL0S5+AU9DXCuOFe1zuS7S//vVDgUT 51Ir1AYfUNkLfo9Xq4/3xH0pBEcoClpNGzl7MaZaC9xUbFGt8L2PQVvfqHfJNY9BtJKh QAyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781590805; x=1782195605; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gnltuqW5l5nPcDELedENMkU+jfNg+GYItheRAD/A5zg=; b=MmarIhIQGyKcWaC0KmPlWC+JNNeBs8bSQtSrIpkXrF3oEZPXgRKJJtANbUaFQfvTbU bBkM3JfelWG/WsnKPNC5lV9/hK/fS3c5Nk9eb7XwXwkm+ymt8sAsAktt2gC3juDljf67 uCd2iaHoZVDDz9Va2qoQHVEdT3b5prYdhZDU85xBYZrb6QkZ4RvLNTMGM6ouXvnkOcMA XG6bs392kqtzKnupN0S2m8TDTQG4oY8heCy2LBf1XvUu0sO1CYX42gZ3WtqM6Ku99LAf Gx13e8oUf8K1aKezAPfYzzlxKaRC5942NmhMMVoDAfGc+Yn8sV3onFP2l6fZGcG0qlTf JSAg== X-Forwarded-Encrypted: i=1; AFNElJ8v74ezcFGwSRV95y8s1+UNktWo8YT/91CoXmS7YR1pL+24UmJSAsqAzOhq3Wjawnt5hM6QJPLXNS8OU9M=@vger.kernel.org X-Gm-Message-State: AOJu0YztEajoZAdATDvfzDH7CsC5g99mts3gdcZKs+gHUW8Z6pHH8XXR KEixCsSXVfhCwdOZDVgb2FtBuv8HPjnZ74IRfF/uFVv9hdHapt5tdiU4sKOz7sPn6g== X-Gm-Gg: Acq92OGL2A/fHl3nwg96/N12vqlD+XxlgO+5IqzlCaL7Gq61TlTNP0sINwlrBRiwim1 3+gjuR421wjQWjMOh6E8tlnVDQGUOQlo3fbaZcMF0moUZanYI+e9axu5KL1pM8v/BeRj7BMAHVP gwaF3vzQ7unVIlwHlgozsj9On4S/S40TEV9U8jchJFW+OiYnMQxBddjRauKeeSUX6Zb4IDDR6+a Ej/BYC2SQDB06oI8mDyX2lvZ+dq8PGdlgLln+7ypDhoaEbfBh2BpjgXF51PmJqcM47e0i3pieJ8 2030QEc8cyyPleyePRkNR1kcyIetEyNLriJHQxIRHUC17Z+D7cUyOqhPUT6+mb9tu0ADDQ5Uiwc KPtgx00ysWkJRcXIcgq12Jo5HdQmEqs8eUJgVxLZcMQWjw/Pv71PBIxN9QgZq4p/pHjGxmLrFhA yA8iZ0chp/i5CwBEy9Ep8UcLgJGg4H9UcusPzX71606myaEs+gN7pEvUM2aSjigQ9QU2Fh6QzjN aMGIVO4+vI= X-Received: by 2002:a05:690e:13c6:b0:661:75a5:3ad with SMTP id 956f58d0204a3-66277f19a03mr15544305d50.3.1781590803692; Mon, 15 Jun 2026 23:20:03 -0700 (PDT) Received: from darker.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-66274e2c884sm6362800d50.17.2026.06.15.23.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 23:20:03 -0700 (PDT) Date: Mon, 15 Jun 2026 23:19:49 -0700 (PDT) From: Hugh Dickins To: "David Hildenbrand (Arm)" cc: Hugh Dickins , Anshuman Khandual , linux-mm@kvack.org, Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , Petr Mladek , Steven Rostedt , Jonathan Corbet , Andrew Morton , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Lorenzo Stoakes Subject: Re: [RFC V2 3/3] mm: Replace pgtable entry prints with new format In-Reply-To: Message-ID: <3afa822d-3cc9-1068-9a10-94a5f2e4d29a@google.com> References: <20260610043545.3725735-1-anshuman.khandual@arm.com> <20260610043545.3725735-4-anshuman.khandual@arm.com> <4a416383-62f5-1716-8e04-a2ee1f89a864@google.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=US-ASCII On Mon, 15 Jun 2026, David Hildenbrand (Arm) wrote: > On 6/12/26 23:26, Hugh Dickins wrote: > > On Fri, 12 Jun 2026, David Hildenbrand (Arm) wrote: > > ... > >> > >> After some off-list discussion, I wonder if we can make our life easier. > >> > >> I think, even with your patch, there is still the case: > >> > >> pr_alert("BUG: Bad page map in process %s %s:%08llx", current->comm, > >> pgtable_level_to_str(level), entry); > >> > >> Where we cast all entries to an "unsigned long" in the callers. We'd have to rework all > >> that for 128bit entries either way (passing them in some struct instead). > >> > >> I really just extended what we used to do here in print_bad_pte() before commit ec63a44011d. > >> > >> Maybe we should just drop the "print the involved page table entries" thing? > >> > >> I mean, we do have the actual page, and we do have the address in the address space, which > >> we all print. > >> > >> Not sure if the actual page table entries are that relevant? > > > > The page table entry is BUGgily Bad: we want to see what it looks like > > (sometimes, a sequence of bad page map entries may even show up as ASCII). > > But is printing raw page table entries really what we want? I guess to detect > "random corruption" it might help sometimes. Yes, that's what it's for. What we really want is to understand what went wrong: that's too much to ask of a printk, but it can give us a good clue. > > And do we really need information about the full page table walk, or is the last > level good enough? Page table entry and pmd entry are good enough: higher levels got added at some stage, but they are unlikely to be useful here. Hugh