<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/hw_breakpoint.c, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-09-09T23:59:13Z</updated>
<entry>
<title>powerpc: Dynamically calculate the dabrx based on kernel/user/hypervisor</title>
<updated>2012-09-09T23:59:13Z</updated>
<author>
<name>Michael Neuling</name>
</author>
<published>2012-09-06T21:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd14457304c9d232267a3a76a2a43f1f791e545d'/>
<id>urn:sha1:cd14457304c9d232267a3a76a2a43f1f791e545d</id>
<content type='text'>
Currently we mark the DABRX to interrupt on all matches
(hypervisor/kernel/user and then filter in software.  We can be a lot
smarter now that we can set the DABRX dynamically.

This sets the DABRX based on the flags passed by the user.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Rework set_dabr so it can take a DABRX value as well</title>
<updated>2012-09-09T23:59:10Z</updated>
<author>
<name>Michael Neuling</name>
</author>
<published>2012-09-06T21:24:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4474ef055c5d8cb8eaf002d69e49af71e3aa3a88'/>
<id>urn:sha1:4474ef055c5d8cb8eaf002d69e49af71e3aa3a88</id>
<content type='text'>
Rework set_dabr to take a DABRX value as well.

Both the pseries and PS3 hypervisors do some checks on the DABRX
values that are passed in the hcall.  This patch stops bogus values
from being passed to hypervisor.  Also, in the case where we are
clearing the breakpoint, where DABR and DABRX are zero, we modify the
DABRX value to make it valid so that the hcall won't fail.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Use consistent name info for arch_hw_breakpoint</title>
<updated>2012-09-07T01:44:39Z</updated>
<author>
<name>Michael Neuling</name>
</author>
<published>2012-09-05T19:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3f4693eeeae45e9253031633adb0c7fde13a5026'/>
<id>urn:sha1:3f4693eeeae45e9253031633adb0c7fde13a5026</id>
<content type='text'>
Change bp_info to info to be consistent with the rest of this file.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Fix null pointer deref in perf hardware breakpoints</title>
<updated>2012-08-24T10:26:04Z</updated>
<author>
<name>Michael Neuling</name>
</author>
<published>2012-08-22T20:30:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d9c00c67b4768105e8ae3d213484095c744eea8'/>
<id>urn:sha1:6d9c00c67b4768105e8ae3d213484095c744eea8</id>
<content type='text'>
Currently if you are doing a global perf recording with hardware
breakpoints (ie perf record -e mem:0xdeadbeef -a), you can oops with:

  Faulting instruction address: 0xc000000000738890
  cpu 0xc: Vector: 300 (Data Access) at [c0000003f76af8d0]
      pc: c000000000738890: .hw_breakpoint_handler+0xa0/0x1e0
      lr: c000000000738830: .hw_breakpoint_handler+0x40/0x1e0
      sp: c0000003f76afb50
     msr: 8000000000001032
     dar: 6f0
   dsisr: 42000000
    current = 0xc0000003f765ac00
    paca    = 0xc00000000f262a00   softe: 0        irq_happened: 0x01
    pid   = 6810, comm = loop-read
  enter ? for help
  [c0000003f76afbe0] c00000000073cd04 .notifier_call_chain.isra.0+0x84/0xe0
  [c0000003f76afc80] c00000000073cdbc .notify_die+0x3c/0x60
  [c0000003f76afd20] c0000000000139f0 .do_dabr+0x40/0xf0
  [c0000003f76afe30] c000000000005a9c handle_dabr_fault+0x14/0x48
  --- Exception: 300 (Data Access) at 0000000010000480
  SP (ff8679e0) is in userspace

This is because we don't check to see if the break point is associated
with task before we deference the task_struct pointer.

This changes the update to use current.

Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/hw_breakpoints: Fix incorrect pointer access</title>
<updated>2012-07-11T04:20:20Z</updated>
<author>
<name>Naveen N. Rao</name>
</author>
<published>2012-07-06T01:30:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ac84aa2b3b9b791eac45174d1966d5fdf3bbba1c'/>
<id>urn:sha1:ac84aa2b3b9b791eac45174d1966d5fdf3bbba1c</id>
<content type='text'>
If arch_validate_hwbkpt_settings() fails, bp-&gt;ctx won't be valid and the
kernel panics. Add a check to fix this.

Reported-by: Edjunior Barbosa Machado &lt;emachado@linux.vnet.ibm.com&gt;
Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc: remove non-required uses of include &lt;linux/module.h&gt;</title>
<updated>2011-10-31T23:30:44Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2011-07-22T18:24:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ead53f22dc646d91a1b6201b9f44dd47d7d88c34'/>
<id>urn:sha1:ead53f22dc646d91a1b6201b9f44dd47d7d88c34</id>
<content type='text'>
None of the files touched here are modules, and they are not
exporting any symbols either -- so there is no need to be including
the module.h.  Builds of all the files remains successful.

Even kernel/module.c does not need to include it, since it includes
linux/moduleloader.h instead.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>powerpc, hw_breakpoint: Tell generic code we have no instruction breakpoints</title>
<updated>2010-06-30T03:54:58Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2010-06-29T02:50:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d09ec7387184eba9e3030496f0451204090ff610'/>
<id>urn:sha1:d09ec7387184eba9e3030496f0451204090ff610</id>
<content type='text'>
At present, hw_breakpoint_slots() returns 1 regardless of what
type of breakpoint is specified in the type argument.  Since we
don't define CONFIG_HAVE_MIXED_BREAKPOINTS_REGS, there are
separate values for TYPE_INST and TYPE_DATA, and hw_breakpoint_slots()
returns 1 for both, effectively advertising instruction breakpoint
support which doesn't exist.

This fixes it by making hw_breakpoint_slots return 1 for TYPE_DATA
and 0 for TYPE_INST.  This moves hw_breakpoint_slots() from the
powerpc hw_breakpoint.h to hw_breakpoint.c because the definitions
of TYPE_INST and TYPE_DATA aren't available in &lt;asm/hw_breakpoint.h&gt;.
They are defined in &lt;linux/hw_breakpoint.h&gt; but we can't include
that header in &lt;asm/hw_breakpoint.h&gt;, and nor can we rely on
&lt;linux/hw_breakpoint.h&gt; being included before &lt;asm/hw_breakpoint.h&gt;.
Since hw_breakpoint_slots() is only called at boot time, there is
no performance impact from making it a real function rather than
a static inline.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>powerpc, hw_breakpoint: Cooperate better with other single-steppers</title>
<updated>2010-06-23T05:46:55Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2010-06-23T05:46:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76b0f1337690d223811c852ad3a5078eb89276c5'/>
<id>urn:sha1:76b0f1337690d223811c852ad3a5078eb89276c5</id>
<content type='text'>
The code we had to clear the MSR_SE bit was not doing anything because
the caller (ultimately single_step_exception() in traps.c) had already
cleared.  Instead of trying to leave MSR_SE set if the TIF_SINGLESTEP
flag is set (which indicates that the process is being single-stepped
by ptrace), we instead return NOTIFY_DONE in that case, which means
the caller will generate a SIGTRAP for the process.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>powerpc, hw_breakpoint: Fix off-by-one in checking access address</title>
<updated>2010-06-23T05:42:43Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2010-06-23T05:42:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=574cb24899d35e71be1d8fb1add2c3306804e4bf'/>
<id>urn:sha1:574cb24899d35e71be1d8fb1add2c3306804e4bf</id>
<content type='text'>
The code would accept an access to an address one byte past the end
of the requested range as legitimate, due to having a "&lt;=" rather than
a "&lt;".  This fixes that and cleans up the code a bit.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
<entry>
<title>powerpc, hw_breakpoint: Discard extraneous interrupt due to accesses outside symbol length</title>
<updated>2010-06-22T09:40:51Z</updated>
<author>
<name>K.Prasad</name>
</author>
<published>2010-06-15T06:06:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3e94084adb5610987283367574ebc771e8206e1'/>
<id>urn:sha1:e3e94084adb5610987283367574ebc771e8206e1</id>
<content type='text'>
Many a times, the requested breakpoint length can be less than the
fixed breakpoint length i.e. 8 bytes supported by PowerPC 64-bit
server (Book III S) processors.  This could lead to extraneous
interrupts resulting in false breakpoint notifications.  This
detects and discards such interrupts for non-ptrace requests.
We don't change ptrace behaviour to avoid breaking compatability.

[Suggestion from Paul Mackerras &lt;paulus@samba.org&gt; to add a new flag in
'struct arch_hw_breakpoint' to identify extraneous interrupts]

Signed-off-by: K.Prasad &lt;prasad@linux.vnet.ibm.com&gt;
Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
</entry>
</feed>
