From: Andrew Morton <akpm@linux-foundation.org>
To: Christoph Lameter <cl@linux.com>
Cc: kbuild test robot <fengguang.wu@intel.com>,
Linux Memory Management List <linux-mm@kvack.org>,
kbuild-all@01.org
Subject: Re: [next:master 452/458] undefined reference to `__bad_size_call_parameter'
Date: Fri, 7 Mar 2014 13:00:01 -0800 [thread overview]
Message-ID: <20140307130001.25fbbcdc9c6b4a5025a9687f@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.10.1403071106280.21846@nuc>
On Fri, 7 Mar 2014 11:07:45 -0600 (CST) Christoph Lameter <cl@linux.com> wrote:
> On Thu, 6 Mar 2014, Andrew Morton wrote:
>
> > On Thu, 06 Mar 2014 22:48:11 +0800 kbuild test robot
> > <fengguang.wu@intel.com> wrote:
> > This has me stumped - the same code
> >
> > p = __this_cpu_read(current_kprobe);
> >
> > works OK elsewhere in that file. I'm suspecting a miscompile - it's
> > not unknown for gcc to screw up when we use this trick.
> >
> > I can reproduce it with gcc-3.4.5 for sh.
>
> This is again the autoconversion not applying because current_kprobe is
> probably a pointer. __bad_size_call_parameter is failure because reads
> from structures larger than word size are not supported.
>
But there are two instances of
__this_cpu_read(current_kprobe);
in arch/sh/kernel/kprobes.c. One generates the bad_size thing and one
does not.
> p = this_cpu_ptr(¤t_kprobe);
>
> would fix it.
This compiles:
--- a/arch/sh/kernel/kprobes.c~a
+++ a/arch/sh/kernel/kprobes.c
@@ -511,7 +511,7 @@ int __kprobes kprobe_exceptions_notify(s
if (kprobe_handler(args->regs)) {
ret = NOTIFY_STOP;
} else {
- p = __this_cpu_read(current_kprobe);
+ p = *this_cpu_ptr(¤t_kprobe);
if (p->break_handler &&
p->break_handler(p, args->regs))
ret = NOTIFY_STOP;
But still generates a reference to __bad_size_call_parameter.
As does this:
--- a/arch/sh/kernel/kprobes.c~a
+++ a/arch/sh/kernel/kprobes.c
@@ -249,7 +249,7 @@ static int __kprobes kprobe_handler(stru
kcb->kprobe_status = KPROBE_REENTER;
return 1;
} else {
- p = __this_cpu_read(current_kprobe);
+ p = *this_cpu_ptr(¤t_kprobe);
if (p->break_handler && p->break_handler(p, regs)) {
goto ss_probe;
}
@@ -511,7 +511,7 @@ int __kprobes kprobe_exceptions_notify(s
if (kprobe_handler(args->regs)) {
ret = NOTIFY_STOP;
} else {
- p = __this_cpu_read(current_kprobe);
+ p = *this_cpu_ptr(¤t_kprobe);
if (p->break_handler &&
p->break_handler(p, args->regs))
ret = NOTIFY_STOP;
_
--
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>
prev parent reply other threads:[~2014-03-07 21:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 14:48 [next:master 452/458] undefined reference to `__bad_size_call_parameter' kbuild test robot
2014-03-06 21:18 ` Andrew Morton
2014-03-07 17:07 ` Christoph Lameter
2014-03-07 21:00 ` Andrew Morton [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=20140307130001.25fbbcdc9c6b4a5025a9687f@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.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).