<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/ptrace, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-29T09:07:56Z</updated>
<entry>
<title>powerpc/watchpoint: Add hw_len wherever missing</title>
<updated>2020-10-29T09:07:56Z</updated>
<author>
<name>Ravi Bangoria</name>
</author>
<published>2020-09-02T04:29:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=990cf02eb2970ce7fd9fe9670cb0acc0938ba359'/>
<id>urn:sha1:990cf02eb2970ce7fd9fe9670cb0acc0938ba359</id>
<content type='text'>
[ Upstream commit 58da5984d2ea6d95f3f9d9e8dd9f7e1b0dddfb3c ]

There are couple of places where we set len but not hw_len. For
ptrace/perf watchpoints, when CONFIG_HAVE_HW_BREAKPOINT=Y, hw_len
will be calculated and set internally while parsing watchpoint.
But when CONFIG_HAVE_HW_BREAKPOINT=N, we need to manually set
'hw_len'. Similarly for xmon as well, hw_len needs to be set
directly.

Fixes: b57aeab811db ("powerpc/watchpoint: Fix length calculation for unaligned target")
Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200902042945.129369-7-ravi.bangoria@linux.ibm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/watchpoint: Use builtin ALIGN*() macros</title>
<updated>2020-05-18T14:11:05Z</updated>
<author>
<name>Ravi Bangoria</name>
</author>
<published>2020-05-14T11:17:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e68ef121c1f4c38edf87a3354661ceb99d522729'/>
<id>urn:sha1:e68ef121c1f4c38edf87a3354661ceb99d522729</id>
<content type='text'>
Currently we calculate hw aligned start and end addresses manually.
Replace them with builtin ALIGN_DOWN() and ALIGN() macros.

So far end_addr was inclusive but this patch makes it exclusive (by
avoiding -1) for better readability.

Suggested-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Michael Neuling &lt;mikey@neuling.org&gt;
Link: https://lore.kernel.org/r/20200514111741.97993-13-ravi.bangoria@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/watchpoint: Use loop for thread_struct-&gt;ptrace_bps</title>
<updated>2020-05-18T14:11:05Z</updated>
<author>
<name>Ravi Bangoria</name>
</author>
<published>2020-05-14T11:17:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b424efa119d5ea06b15ff240dddc3b4b9f9cdfb'/>
<id>urn:sha1:6b424efa119d5ea06b15ff240dddc3b4b9f9cdfb</id>
<content type='text'>
ptrace_bps is already an array of size HBP_NUM_MAX. But we use
hardcoded index 0 while fetching/updating it. Convert such code
to loop over array.

ptrace interface to use multiple watchpoint remains same. eg:
two PPC_PTRACE_SETHWDEBUG calls will create two watchpoint if
underneath hw supports it.

Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Michael Neuling &lt;mikey@neuling.org&gt;
Link: https://lore.kernel.org/r/20200514111741.97993-11-ravi.bangoria@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/watchpoint: Convert thread_struct-&gt;hw_brk to an array</title>
<updated>2020-05-18T14:11:05Z</updated>
<author>
<name>Ravi Bangoria</name>
</author>
<published>2020-05-14T11:17:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=303e6a9ddcdc168e92253c78cdb4bbe1e10d78b3'/>
<id>urn:sha1:303e6a9ddcdc168e92253c78cdb4bbe1e10d78b3</id>
<content type='text'>
So far powerpc hw supported only one watchpoint. But Power10 is
introducing 2nd DAWR. Convert thread_struct-&gt;hw_brk into an array.

Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Michael Neuling &lt;mikey@neuling.org&gt;
Link: https://lore.kernel.org/r/20200514111741.97993-10-ravi.bangoria@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/watchpoint/ptrace: Return actual num of available watchpoints</title>
<updated>2020-05-18T14:11:04Z</updated>
<author>
<name>Ravi Bangoria</name>
</author>
<published>2020-05-14T11:17:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45093b382e0ac25c206b4dcd210c6be1f5e56e60'/>
<id>urn:sha1:45093b382e0ac25c206b4dcd210c6be1f5e56e60</id>
<content type='text'>
User can ask for num of available watchpoints(dbginfo.num_data_bps)
using ptrace(PPC_PTRACE_GETHWDBGINFO). Return actual number of
available watchpoints on the machine rather than hardcoded 1.

Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Reviewed-by: Michael Neuling &lt;mikey@neuling.org&gt;
Link: https://lore.kernel.org/r/20200514111741.97993-5-ravi.bangoria@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc: Use set_trap() and avoid open-coding trap masking</title>
<updated>2020-05-15T01:58:54Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2020-05-07T12:13:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db30144b5c9cfb09c6b8b2fa7a9c351c94aa3433'/>
<id>urn:sha1:db30144b5c9cfb09c6b8b2fa7a9c351c94aa3433</id>
<content type='text'>
The pt_regs.trap field keeps 4 low bits for some metadata about the
trap or how it was handled, which is masked off in order to test the
architectural trap number.

Add a set_trap() accessor to set this, equivalent to TRAP() for
returning it. This is actually not quite the equivalent of TRAP()
because it always clears the low bits, which may be harmless if
it can only be updated via ptrace syscall, but it seems dangerous.

In fact settting TRAP from ptrace doesn't seem like a great idea
so maybe it's better deleted.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Make it a static inline rather than a shouty macro]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200507121332.2233629-2-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>powerpc/64: make buildable without CONFIG_COMPAT</title>
<updated>2020-04-02T13:10:00Z</updated>
<author>
<name>Michal Suchanek</name>
</author>
<published>2020-03-20T10:20:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a7601b6ffddec11d7cc0bc3264daf0159f5e1a6'/>
<id>urn:sha1:0a7601b6ffddec11d7cc0bc3264daf0159f5e1a6</id>
<content type='text'>
There are numerous references to 32bit functions in generic and 64bit
code so ifdef them out.

Signed-off-by: Michal Suchanek &lt;msuchanek@suse.de&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/e5619617020ef3a1f54f0c076e7d74cb9ec9f3bf.1584699455.git.msuchanek@suse.de
</content>
</entry>
<entry>
<title>powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c</title>
<updated>2020-04-01T03:30:49Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2020-02-28T00:14:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ccbed90b8207851fa759e81cc9ab083f9b6496c1'/>
<id>urn:sha1:ccbed90b8207851fa759e81cc9ab083f9b6496c1</id>
<content type='text'>
ptrace_triggered() is declared in asm/hw_breakpoint.h and
only needed when CONFIG_HW_BREAKPOINT is set, so move it
into hw_breakpoint.c

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/8402c516023da1371953a65af7df2008758ea0c4.1582848567.git.christophe.leroy@c-s.fr
</content>
</entry>
<entry>
<title>powerpc/ptrace: create ppc_gethwdinfo()</title>
<updated>2020-04-01T03:30:49Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2020-02-28T00:14:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da529d4739abbb7681b1804c5b9bf615a5796f43'/>
<id>urn:sha1:da529d4739abbb7681b1804c5b9bf615a5796f43</id>
<content type='text'>
Create ippc_gethwdinfo() to handle PPC_PTRACE_GETHWDBGINFO and
reduce ifdef mess

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/82fefcc1ec75b96cece792878217a5d85ecda0c2.1582848567.git.christophe.leroy@c-s.fr
</content>
</entry>
<entry>
<title>powerpc/ptrace: create ptrace_get_debugreg()</title>
<updated>2020-04-01T03:30:49Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2020-02-28T00:14:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e08227d25a26901d13c6b597e60dffba40e2659d'/>
<id>urn:sha1:e08227d25a26901d13c6b597e60dffba40e2659d</id>
<content type='text'>
Create ptrace_get_debugreg() to handle PTRACE_GET_DEBUGREG and
reduce ifdef mess

Signed-off-by: Christophe Leroy &lt;christophe.leroy@c-s.fr&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/c1482c41a39cc216f4073a51070d8680f52d5054.1582848567.git.christophe.leroy@c-s.fr
</content>
</entry>
</feed>
