linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Matthew Wilcox (Oracle)'" <willy@infradead.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	Christoph Lameter <cl@linux.com>,
	"Pekka Enberg" <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	"Joonsoo Kim" <iamjoonsoo.kim@lge.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	"Uladzislau Rezki" <urezki@gmail.com>,
	Nicholas Piggin <npiggin@gmail.com>
Subject: RE: [PATCH v2 0/4] vmalloc: Improve vmalloc(4MB) performance
Date: Thu, 25 Mar 2021 15:59:56 +0000	[thread overview]
Message-ID: <38da93959bc948c992fc7fc1efd4d25c@AcuMS.aculab.com> (raw)
In-Reply-To: <20210324150518.2734402-1-willy@infradead.org>

From: Matthew Wilcox
> Sent: 24 March 2021 15:05
> 
> I may have gone a little too far with the first patch.  It turns out we
> have a lot of code using the vmalloc caller functionality, and I decided
> to convert it all to unsigned long instead of leaving some paths as void *
> and casting later.

What is the 'address of the caller' needed for?
If it gets printed anywhere it ought to be a pointer type
throughout so that it will get hashed and not leak the
real address.

Even then it is probably better to use a typed pointer
(eg to an undefined structure) than 'void *'.
That might also pick up more incorrect uses.

Of course things like _RET_IP_ would need changing to return
the same pointer type.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2021-03-25 16:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 15:05 [PATCH v2 0/4] vmalloc: Improve vmalloc(4MB) performance Matthew Wilcox (Oracle)
2021-03-24 15:05 ` [PATCH v2 1/4] mm/vmalloc: Change the 'caller' type to unsigned long Matthew Wilcox (Oracle)
2021-03-24 15:05 ` [PATCH v2 2/4] mm/util: Add kvmalloc_node_caller Matthew Wilcox (Oracle)
2021-03-24 19:04   ` David Rientjes
2021-03-24 15:05 ` [PATCH v2 3/4] mm/vmalloc: Use kvmalloc to allocate the table of pages Matthew Wilcox (Oracle)
2021-03-24 19:04   ` David Rientjes
2021-03-24 15:05 ` [PATCH v2 4/4] MAINTAINERS: Add Vlad Rezki as vmalloc maintainer Matthew Wilcox (Oracle)
2021-03-24 18:52   ` David Rientjes
2021-03-24 19:14     ` Matthew Wilcox
2021-03-25 15:59 ` David Laight [this message]
2021-03-25 16:31   ` [PATCH v2 0/4] vmalloc: Improve vmalloc(4MB) performance Matthew Wilcox

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=38da93959bc948c992fc7fc1efd4d25c@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.com \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=urezki@gmail.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).