From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Helge Deller <deller@gmx.de>
Cc: Coly Li <i@coly.li>,
linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Petr Mladek <pmladek@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org
Subject: Re: [PATCH 06/14] md/bcache: Use %pS printk format for direct addresses
Date: Thu, 7 Sep 2017 17:05:19 +0900 [thread overview]
Message-ID: <20170907080519.GB533@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <30e9400c-b95d-5720-f9a0-6086f08ecd4a@gmx.de>
On (09/07/17 09:42), Helge Deller wrote:
> >> - seq_printf(f, "%p: %pF -> %pf p %p r %i ",
> >> + seq_printf(f, "%p: %pS -> %pf p %p r %i ",
> >> cl, (void *) cl->ip, cl->fn, cl->parent,
> >> r & CLOSURE_REMAINING_MASK);
> >>
> >> @@ -187,7 +187,7 @@ static int debug_seq_show(struct seq_file *f, void *data)
> >> r & CLOSURE_SLEEPING ? "Sl" : "");
> >>
> >> if (r & CLOSURE_WAITING)
> >> - seq_printf(f, " W %pF\n",
> >> + seq_printf(f, " W %pS\n",
> >> (void *) cl->waiting_on);
> >>
> >> seq_printf(f, "\n");
> >>
> >
> > It is unclear to me, that if %pF is used, on ia64/ppc64/parisc64 a
> > function descriptor conversion happens, what negative effect exactly
> > takes place ?
>
> On ia64/ppc64/parisc64 the kernel will crash here in the worst case, because
> vsprintf() will try to read a pointer from that address and resolve it.
probe_kernel_address() handles the page fault and returns -EFAULT if
you give it bad pointer. module_address_lookup() and get_symbol_pos()
seems to be smart enough not to crash on bad pointer as well. what am
I missing? could you please explain where we will crash?
-ss
prev parent reply other threads:[~2017-09-07 8:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1504729681-3504-1-git-send-email-deller@gmx.de>
2017-09-06 20:27 ` [PATCH 06/14] md/bcache: Use %pS printk format for direct addresses Helge Deller
2017-09-07 4:50 ` Coly Li
2017-09-07 7:42 ` Helge Deller
2017-09-07 7:49 ` Coly Li
2017-09-07 8:05 ` Sergey Senozhatsky [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=20170907080519.GB533@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=deller@gmx.de \
--cc=i@coly.li \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=sergey.senozhatsky@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 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).