All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Joe Perches <joe@perches.com>
Subject: Re: [PATCH] habanalabs: use %px instead of %p in error print
Date: Thu, 7 Mar 2019 07:54:01 -0800	[thread overview]
Message-ID: <CAGXu5jL-uLPvoiGQ_mxv4pihC0uUPRDR01s0O8LNs8ASyaYxkw@mail.gmail.com> (raw)
In-Reply-To: <CAFCwf10bKhXsmmoQG4FP9FT6jq2dJYrMZOzk424HGbwLCp9MjA@mail.gmail.com>

On Wed, Mar 6, 2019 at 9:42 PM Oded Gabbay <oded.gabbay@gmail.com> wrote:
>
> On Thu, Mar 7, 2019 at 5:46 AM Kees Cook <keescook@chromium.org> wrote:
> >
> > On Sat, Mar 2, 2019 at 1:43 AM Oded Gabbay <oded.gabbay@gmail.com> wrote:
> > >
> > > When parsing the address of an internal command buffer, the driver prints
> > > an error if the buffer's address is not in the range of the device's DRAM
> > > or SRAM memory address space.
> > >
> > > Use %px to print the real address that the user gave the driver and not a
> > > hashed value, so the user will get a clue regarding the origin of his
> > > error.
> > >
> > > Note that if the print occurs, the pointer that is printed is a
> > > user's virtual address and not some kind of physical address.
> >
> > Err, which virtual address space is this? If this is mapped into the
> > kernel's virtual address space, this should not be %px...
> No, it's not mapped to kernel in any way.
> It's supposed to be an address in the device's address space.
> As this is an error message, it's either a wrong address in the
> device's address space, or it's a user-space virtual address.

Okay, thanks! :)

-- 
Kees Cook

      reply	other threads:[~2019-03-07 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  9:43 [PATCH] habanalabs: use %px instead of %p in error print Oded Gabbay
2019-03-07  3:46 ` Kees Cook
2019-03-07  5:42   ` Oded Gabbay
2019-03-07 15:54     ` Kees Cook [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=CAGXu5jL-uLPvoiGQ_mxv4pihC0uUPRDR01s0O8LNs8ASyaYxkw@mail.gmail.com \
    --to=keescook@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oded.gabbay@gmail.com \
    /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 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.