Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1673695 > unrolled thread
| Started by | James Morse <james.morse@arm.com> |
|---|---|
| First post | 2017-06-23 19:10 +0200 |
| Last post | 2017-06-27 12:20 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 18/20] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 James Morse <james.morse@arm.com> - 2017-06-23 19:10 +0200
Re: [PATCH 18/20] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 James Morse <james.morse@arm.com> - 2017-06-27 12:20 +0200
| From | James Morse <james.morse@arm.com> |
|---|---|
| Date | 2017-06-23 19:10 +0200 |
| Subject | Re: [PATCH 18/20] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 |
| Message-ID | <tVAfM-4XT-27@gated-at.bofh.it> |
Hi Yury,
On 04/06/17 13:00, Yury Norov wrote:
> ILP32 has context-related structures different from both aarch32 and
> aarch64/lp64. In this patch compat_arch_ptrace() renamed to
> compat_a32_ptrace(), and compat_arch_ptrace() only makes choice between
> compat_a32_ptrace() and new compat_ilp32_ptrace() handler.
>
> compat_ilp32_ptrace() calls generic compat_ptrace_request() for all
> requests except PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, which need
> special handling.
Can you elaborate on this special handling?
How come we don't need to wrap PTRACE_{G,S}ETSIGMASK for aarch32 compat?
From kernel/signal32.c that uses compat_sigset_t too.
It looks like aarch64, ilp32 and aarch32 all use the same size sigset_t,
so doesn't compat_ptrace_request() already do everything we need?
...
Is this fixing an endian problem? If so, can we document it as such. Do we
already have the same bug for aarch32 compat?
Thanks,
James
[toc] | [next] | [standalone]
| From | James Morse <james.morse@arm.com> |
|---|---|
| Date | 2017-06-27 12:20 +0200 |
| Message-ID | <tWVLe-7w2-57@gated-at.bofh.it> |
| In reply to | #1673695 |
Hi Yury, Zhou,
On 23/06/17 23:28, Yury Norov wrote:
> On Fri, Jun 23, 2017 at 06:03:37PM +0100, James Morse wrote:
>> Hi Yury,
>>
>> On 04/06/17 13:00, Yury Norov wrote:
>>> ILP32 has context-related structures different from both aarch32 and
>>> aarch64/lp64. In this patch compat_arch_ptrace() renamed to
>>> compat_a32_ptrace(), and compat_arch_ptrace() only makes choice between
>>> compat_a32_ptrace() and new compat_ilp32_ptrace() handler.
>>>
>>> compat_ilp32_ptrace() calls generic compat_ptrace_request() for all
>>> requests except PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, which need
>>> special handling.
>>
>> Can you elaborate on this special handling?
>>
>> How come we don't need to wrap PTRACE_{G,S}ETSIGMASK for aarch32 compat?
>> >From kernel/signal32.c that uses compat_sigset_t too.
>>
>> It looks like aarch64, ilp32 and aarch32 all use the same size sigset_t,
>> so doesn't compat_ptrace_request() already do everything we need?
>>
>> ...
>>
>> Is this fixing an endian problem? If so, can we document it as such. Do we
>> already have the same bug for aarch32 compat?
>
> Originally, the problem was found by Zhou Chengming: https://lkml.org/lkml/2016/6/27/18
> But I think you right, this is the fix for endian.
>
> It lookd like aarch32 is buggy, but IIUC to confirm it, the BE arm64
> machine is needed. I use qemu and AFAIR it has no BE support.
>
> Zhou, can you test it on your machine and if the bug will be reproduced,
> send the patch for aarch32?
I've reproduced this on big endian compat-aarch32: yes its broken. I will respin
Zhou's patch as a fix.
Thanks,
James
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web