From: Christopher Lameter <cl@linux.com> To: Linus Torvalds <torvalds@linux-foundation.org> Cc: Geert Uytterhoeven <geert+renesas@glider.be>, Pekka Enberg <penberg@kernel.org>, David Rientjes <rientjes@google.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Andrew Morton <akpm@linux-foundation.org>, "Tobin C . Harding" <me@tobin.cc>, linux-mm <linux-mm@kvack.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] mm/slab: Do not hash pointers when debugging slab Date: Mon, 11 Dec 2017 06:00:40 -0600 (CST) [thread overview] Message-ID: <alpine.DEB.2.20.1712110558560.19414@nuc-kabylake> (raw) In-Reply-To: <CA+55aFzE0Z98KRT4rk3f3R0BcMqGMrHWHsaB9Aq02etwWm_hjg@mail.gmail.com> On Sun, 10 Dec 2017, Linus Torvalds wrote: > On Thu, Dec 7, 2017 at 2:17 AM, Geert Uytterhoeven > <geert+renesas@glider.be> wrote: > > > > if (cachep->flags & SLAB_STORE_USER) { > > - pr_err("Last user: [<%p>](%pSR)\n", > > + pr_err("Last user: [<%px>](%pSR)\n", > > *dbg_userword(cachep, objp), > > *dbg_userword(cachep, objp)); > > Is there actually any point to the %px at all? > > Why not remove it? the _real_ information is printed out by %pSR, and > that's both sufficient and useful in ways %px isn't. This pointer refers to code so we can remove it. > > > - pr_err("Slab corruption (%s): %s start=%p, len=%d\n", > > + pr_err("Slab corruption (%s): %s start=%px, len=%d\n", > > print_tainted(), cachep->name, > > realobj, size); > > and here, is the pointer actually interesting, or should we just give > the offset to the allocation? > > But if the pointer is interesting, then ack. The pointer here is to an slab object which could be important if one wants to find the pointer value in a hexdump of another object (f.e. listhead) or other pointer information that is being inspected in a debugging session.
WARNING: multiple messages have this Message-ID (diff)
From: Christopher Lameter <cl@linux.com> To: Linus Torvalds <torvalds@linux-foundation.org> Cc: Geert Uytterhoeven <geert+renesas@glider.be>, Pekka Enberg <penberg@kernel.org>, David Rientjes <rientjes@google.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Andrew Morton <akpm@linux-foundation.org>, "Tobin C . Harding" <me@tobin.cc>, linux-mm <linux-mm@kvack.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] mm/slab: Do not hash pointers when debugging slab Date: Mon, 11 Dec 2017 06:00:40 -0600 (CST) [thread overview] Message-ID: <alpine.DEB.2.20.1712110558560.19414@nuc-kabylake> (raw) In-Reply-To: <CA+55aFzE0Z98KRT4rk3f3R0BcMqGMrHWHsaB9Aq02etwWm_hjg@mail.gmail.com> On Sun, 10 Dec 2017, Linus Torvalds wrote: > On Thu, Dec 7, 2017 at 2:17 AM, Geert Uytterhoeven > <geert+renesas@glider.be> wrote: > > > > if (cachep->flags & SLAB_STORE_USER) { > > - pr_err("Last user: [<%p>](%pSR)\n", > > + pr_err("Last user: [<%px>](%pSR)\n", > > *dbg_userword(cachep, objp), > > *dbg_userword(cachep, objp)); > > Is there actually any point to the %px at all? > > Why not remove it? the _real_ information is printed out by %pSR, and > that's both sufficient and useful in ways %px isn't. This pointer refers to code so we can remove it. > > > - pr_err("Slab corruption (%s): %s start=%p, len=%d\n", > > + pr_err("Slab corruption (%s): %s start=%px, len=%d\n", > > print_tainted(), cachep->name, > > realobj, size); > > and here, is the pointer actually interesting, or should we just give > the offset to the allocation? > > But if the pointer is interesting, then ack. The pointer here is to an slab object which could be important if one wants to find the pointer value in a hexdump of another object (f.e. listhead) or other pointer information that is being inspected in a debugging session. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-12-11 12:00 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-12-07 10:17 [PATCH] mm/slab: Do not hash pointers when debugging slab Geert Uytterhoeven 2017-12-07 11:13 ` Christopher Lameter 2017-12-07 11:13 ` Christopher Lameter 2017-12-07 18:43 ` Kees Cook 2017-12-07 18:43 ` Kees Cook 2017-12-07 20:15 ` Christopher Lameter 2017-12-07 20:15 ` Christopher Lameter 2017-12-10 20:45 ` Linus Torvalds 2017-12-10 20:45 ` Linus Torvalds 2017-12-11 8:08 ` Geert Uytterhoeven 2017-12-11 8:08 ` Geert Uytterhoeven 2017-12-11 12:00 ` Christopher Lameter [this message] 2017-12-11 12:00 ` Christopher Lameter
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=alpine.DEB.2.20.1712110558560.19414@nuc-kabylake \ --to=cl@linux.com \ --cc=akpm@linux-foundation.org \ --cc=geert+renesas@glider.be \ --cc=iamjoonsoo.kim@lge.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=me@tobin.cc \ --cc=penberg@kernel.org \ --cc=rientjes@google.com \ --cc=torvalds@linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.