mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Jann Horn <jannh@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	kernel list <linux-kernel@vger.kernel.org>,
	Kees Cook <keescook@chromium.org>,
	bp@suse.de
Subject: Re: [PATCH] x86/dumpstack: fix address space casting in show_opcodes()
Date: Fri, 31 Aug 2018 16:38:02 +0200	[thread overview]
Message-ID: <20180831143801.dn5dgpob7xb2kqaq@ltop.local> (raw)
In-Reply-To: <CAG48ez1aw=fSfDEp14=d+GxSu=3hLYP70Sd_s1Xux4MPiNM2VA@mail.gmail.com>

On Fri, Aug 31, 2018 at 03:26:24PM +0200, Jann Horn wrote:
> 
> By the way, here are all 60 probe_kernel_read() callers:

... 

> 41 of these (or something like that, I counted by hand) have some sort
> of cast in the call expression.
> probe_kernel_read() is kinda special in that expected types for the
> second argument are both kernel pointers and unsigned longs. It might
> make sense to have a wrapper macro around probe_kernel_read() that
> accepts anything as long as it's as wide as a pointer...

Well, if __user pointers should not be accepted, then it's much
better, typewisely, to leave it as const void * (and cast the
ulong args to some plain generic pointer, like void* or u8*).

-- Luc Van Oostenryck

      reply	other threads:[~2018-08-31 14:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30 19:47 Jann Horn
2018-08-31  8:04 ` Borislav Petkov
2018-08-31  8:27 ` Luc Van Oostenryck
2018-08-31 13:26   ` Jann Horn
2018-08-31 14:38     ` Luc Van Oostenryck [this message]

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=20180831143801.dn5dgpob7xb2kqaq@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=bp@suse.de \
    --cc=jannh@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®