<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3111</bug_id>
          
          <creation_ts>2012-09-13 19:36:48 +0000</creation_ts>
          <short_desc>mpc8315 kernel fails to link due to uprobe changse</short_desc>
          <delta_ts>2012-10-10 13:40:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>1.3</version>
          <rep_platform>mpc8315e-rdb</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Patch submitted to linux-yocto mailing list</status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>1.3 M5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saul Wold">sgw</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>alexandrux.palalau</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>25212</commentid>
    <comment_count>0</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-09-13 19:36:48 +0000</bug_when>
    <thetext>http://autobuilder.yoctoproject.org:8010/builders/nightly-ppc/builds/598/steps/shell_52/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25213</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-09-13 19:37:23 +0000</bug_when>
    <thetext>| arch/powerpc/kernel/built-in.o: In function `do_notify_resume&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/arch/powerpc/kernel/signal.c:193: undefined reference to `uprobe_notify_resume&apos;
| arch/powerpc/kernel/built-in.o: In function `arch_uprobe_exception_notify&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/arch/powerpc/kernel/uprobes.c:129: undefined reference to `uprobe_pre_sstep_notifier&apos;
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/arch/powerpc/kernel/uprobes.c:133: undefined reference to `uprobe_post_sstep_notifier&apos;
| kernel/built-in.o: In function `mmput&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/fork.c:580: undefined reference to `uprobe_clear_state&apos;
| kernel/built-in.o: In function `mm_release&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/fork.c:759: undefined reference to `uprobe_free_utask&apos;
| kernel/built-in.o: In function `dup_mm&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/fork.c:815: undefined reference to `uprobe_reset_state&apos;
| kernel/built-in.o: In function `dup_mmap&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/fork.c:430: undefined reference to `uprobe_mmap&apos;
| kernel/built-in.o: In function `copy_process&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/fork.c:1358: undefined reference to `uprobe_copy_process&apos;
| kernel/built-in.o: In function `get_signal_to_deliver&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/signal.c:2206: undefined reference to `uprobe_deny_signal&apos;
| kernel/built-in.o: In function `probe_event_enable&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/trace/trace_uprobe.c:550: undefined reference to `uprobe_register&apos;
| kernel/built-in.o: In function `probe_event_disable&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/kernel/trace/trace_uprobe.c:568: undefined reference to `uprobe_unregister&apos;
| mm/built-in.o: In function `unmap_single_vma&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/memory.c:1311: undefined reference to `uprobe_munmap&apos;
| mm/built-in.o: In function `vma_adjust&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:629: undefined reference to `uprobe_mmap&apos;
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:637: undefined reference to `uprobe_munmap&apos;
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:658: undefined reference to `uprobe_mmap&apos;
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:552: undefined reference to `uprobe_munmap&apos;
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:555: undefined reference to `uprobe_munmap&apos;
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:632: undefined reference to `uprobe_mmap&apos;
| mm/built-in.o: In function `mmap_region&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:1393: undefined reference to `uprobe_mmap&apos;
| mm/built-in.o: In function `insert_vm_struct&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:2379: undefined reference to `uprobe_mmap&apos;
| mm/built-in.o: In function `copy_vma&apos;:
| /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/build/tmp/work/mpc8315e_rdb-poky-linux/linux-yocto-3.4.10+git8+e0374ce012e7e6fc8e5bb8b957addb0478950898_4+363a6f7e0c95aabec779a7ea3474662d191b935c-r4.1/linux/mm/mmap.c:2452: undefined reference to `uprobe_mmap&apos;
| make[2]: *** [.tmp_vmlinux1] Error 1
| make[1]: *** [sub-make] Error 2
| make: *** [all] Error 2
| ERROR: oe_runmake failed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25214</commentid>
    <comment_count>2</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-13 19:38:07 +0000</bug_when>
    <thetext>This would be related to TomZ&apos;s uprobes/kprobes updates .. I&apos;d suggest
that he have a look :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25215</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-13 19:41:40 +0000</bug_when>
    <thetext>It&apos;s just a matter of disabling the functionality for this board, or #ifdefing the patches. I can look into nuking them for the board.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25216</commentid>
    <comment_count>4</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-09-13 19:43:06 +0000</bug_when>
    <thetext>My patches simply added the missing config options and turned them on.  Looks like something was missing from the original patchset, which should work for powerpc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25217</commentid>
    <comment_count>5</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-13 19:45:33 +0000</bug_when>
    <thetext>right. qemuppc definitely builds. Something is missing in the series for that arch/subarch. I&apos;ll start a build and disable it for that board, while we look into it more. A similar build issue was reported on another non-yocto board.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25218</commentid>
    <comment_count>6</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-09-13 20:06:20 +0000</bug_when>
    <thetext>warning: (UPROBE_EVENT) selects UPROBES which has unmet direct dependencies (UPROBE_EVENT &amp;&amp;\
 PERF_EVENTS)

The UPROBE_EVENT config options appear in .config:

CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_UPROBES=y
CONFIG_UPROBE_EVENT=y

but PERF_EVENTS is missing for this board:

# CONFIG_PERF_EVENTS is not set</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25219</commentid>
    <comment_count>7</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-09-13 20:18:22 +0000</bug_when>
    <thetext>So UPROBES depends on PERF_EVENTS, so one option would be to add PERF_EVENTS to the uprobes feature, but that seems backwards.  Wondering why mpc8315 doesn&apos;t have PERF_EVENTS turned on already like everything else.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25220</commentid>
    <comment_count>8</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-13 20:22:01 +0000</bug_when>
    <thetext>Hmm. It should. I&apos;ve reproduced the build failure now, will try to tweak that. It&apos;s much better to fix this build vs hiding it, so you are on the right track.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25222</commentid>
    <comment_count>9</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-13 20:43:48 +0000</bug_when>
    <thetext>Confirmed. It does just look like a missing config option for the board to get it up and building. But there&apos;s a missing dependency in the kernel, since if perf events is off, everything really should be off as well.

I&apos;ll do a fix for the board config, but I&apos;m going to take a few minutes to look into the
dependency as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25223</commentid>
    <comment_count>10</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-13 20:57:36 +0000</bug_when>
    <thetext>I&apos;ve patched the Kconfig line to select what it needs, this now builds out of the
box. 

I pushed the new kernel, but will send the pull request in a bit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25227</commentid>
    <comment_count>11</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-09-13 22:48:23 +0000</bug_when>
    <thetext>So, looking a bit more into it, x86 always selects CONFIG_PERF_EVENTS, and CONFIG_PERF_EVENTS is also selected automatically if CONFIG_PROFILING is selected.  CONFIG_PROFILING is selected by features/profiling/profiling.scc, which most of the BSPs do, but of course not mpc8315, so we see this error.  Other BSPs may be at 3.0, in which case we also won&apos;t see the error since they don&apos;t have UPROBES.

So, since UPROBES is after all dependent on PERF_EVENTS, PERF_EVENTS should be turned on by the UPROBES feature, which should fix this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25228</commentid>
    <comment_count>12</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-13 22:50:17 +0000</bug_when>
    <thetext>ok. thanks for the confirmation, the mpc *should* be including that
profiling fragment, but the select Kconfig fix is good as well.

The following worked for me:

http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.4/commit/?h=standard/base&amp;id=59c3ff750831338d05ab67d5efd7fc101c451aff</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25231</commentid>
    <comment_count>13</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-09-13 23:05:21 +0000</bug_when>
    <thetext>Yeah, that should work, and probably makes more sense than the way things are now - i.e. selecting PERF_EVENTS if UPROBE_EVENTS is selected makes more sense to me than having UPROBES depend on PERF_EVENTS, which frankly to me is nonintuitive.

I&apos;ll submit my patch to uprobes.cfg just to reflect the current situation and make sure they can&apos;t get out of sync.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25233</commentid>
    <comment_count>14</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2012-09-14 00:49:43 +0000</bug_when>
    <thetext>Just a couple other things noticed while examining the current BSPS - all the qemu machines include profiling.scc but the meta-yocto-bsp BSPs other than atom-pc by virtue of inheriting common-pc don&apos;t and therefore don&apos;t get PERF_EVENTS and OPROFILE.  Also, the powertop feature seems circular - profiling.cfg includes stuff for powertop, while powertop includes profiling.scc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25250</commentid>
    <comment_count>15</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-09-14 12:29:40 +0000</bug_when>
    <thetext>commit ffc3b5ded372bdebcb610b7aac91ff56cabeddce in poky master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26484</commentid>
    <comment_count>16</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2012-10-10 13:40:25 +0000</bug_when>
    <thetext>Verified under master branch. 
Latest commit ID: 2c3e8280e67721d42d4be48a8e2c1e9ce9bb89fd</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>