Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1536229 > unrolled thread
| Started by | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| First post | 2016-12-05 17:40 +0100 |
| Last post | 2016-12-08 14:20 +0100 |
| Articles | 4 — 2 participants |
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 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 Catalin Marinas <catalin.marinas@arm.com> - 2016-12-05 17:40 +0100
Re: [PATCH 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 Catalin Marinas <catalin.marinas@arm.com> - 2016-12-07 18:00 +0100
Re: [PATCH 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 Arnd Bergmann <arnd@arndb.de> - 2016-12-07 21:50 +0100
Re: [PATCH 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 Catalin Marinas <catalin.marinas@arm.com> - 2016-12-08 14:20 +0100
| From | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| Date | 2016-12-05 17:40 +0100 |
| Subject | Re: [PATCH 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 |
| Message-ID | <sL4t4-6UN-41@gated-at.bofh.it> |
On Fri, Oct 21, 2016 at 11:33:15PM +0300, Yury Norov wrote: > New aarch32 ptrace syscall handler is introduced to avoid run-time > detection of the task type. What's wrong with the run-time detection? If it's just to avoid a negligible overhead, I would rather keep the code simpler by avoiding duplicating the generic compat_sys_ptrace(). -- Catalin
[toc] | [next] | [standalone]
| From | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| Date | 2016-12-07 18:00 +0100 |
| Message-ID | <sLNJx-2Ce-77@gated-at.bofh.it> |
| In reply to | #1536229 |
On Tue, Dec 06, 2016 at 11:55:08AM +0530, Yury Norov wrote: > On Mon, Dec 05, 2016 at 04:34:23PM +0000, Catalin Marinas wrote: > > On Fri, Oct 21, 2016 at 11:33:15PM +0300, Yury Norov wrote: > > > New aarch32 ptrace syscall handler is introduced to avoid run-time > > > detection of the task type. > > > > What's wrong with the run-time detection? If it's just to avoid a > > negligible overhead, I would rather keep the code simpler by avoiding > > duplicating the generic compat_sys_ptrace(). > > Nothing wrong. This is how Arnd asked me to do. You already asked this > question: http://lkml.iu.edu/hypermail/linux/kernel/1604.3/00930.html Hmm, I completely forgot about this ;). There is still an advantage to doing run-time checking if we avoid touching core code (less acks to gather and less code duplication). Let's see what Arnd says but the initial patch looked simpler. -- Catalin
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-12-07 21:50 +0100 |
| Subject | Re: [PATCH 16/18] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 |
| Message-ID | <sLRk6-4Vw-19@gated-at.bofh.it> |
| In reply to | #1537921 |
On Wednesday, December 7, 2016 4:59:13 PM CET Catalin Marinas wrote: > On Tue, Dec 06, 2016 at 11:55:08AM +0530, Yury Norov wrote: > > On Mon, Dec 05, 2016 at 04:34:23PM +0000, Catalin Marinas wrote: > > > On Fri, Oct 21, 2016 at 11:33:15PM +0300, Yury Norov wrote: > > > > New aarch32 ptrace syscall handler is introduced to avoid run-time > > > > detection of the task type. > > > > > > What's wrong with the run-time detection? If it's just to avoid a > > > negligible overhead, I would rather keep the code simpler by avoiding > > > duplicating the generic compat_sys_ptrace(). > > > > Nothing wrong. This is how Arnd asked me to do. You already asked this > > question: http://lkml.iu.edu/hypermail/linux/kernel/1604.3/00930.html > > Hmm, I completely forgot about this ;). There is still an advantage to > doing run-time checking if we avoid touching core code (less acks to > gather and less code duplication). > > Let's see what Arnd says but the initial patch looked simpler. I don't currently have either version of the patch in my inbox (the archive is on a different machine), but in general I'd still think it's best to avoid the runtime check for aarch64-ilp32 altogether. I'd have to look at the overall kernel source to see if it's worth avoiding one or two instances though, or if there are an overwhelming number of other checks that we can't avoid at all. Regarding ptrace, I notice that arch/tile doesn't even use the compat entry point for its ilp32 user space on 64-bit kernels, it just calls the regular 64-bit one. Would that help here? Arnd
[toc] | [prev] | [next] | [standalone]
| From | Catalin Marinas <catalin.marinas@arm.com> |
|---|---|
| Date | 2016-12-08 14:20 +0100 |
| Message-ID | <sM6M9-6AP-1@gated-at.bofh.it> |
| In reply to | #1538072 |
On Wed, Dec 07, 2016 at 09:40:13PM +0100, Arnd Bergmann wrote: > On Wednesday, December 7, 2016 4:59:13 PM CET Catalin Marinas wrote: > > On Tue, Dec 06, 2016 at 11:55:08AM +0530, Yury Norov wrote: > > > On Mon, Dec 05, 2016 at 04:34:23PM +0000, Catalin Marinas wrote: > > > > On Fri, Oct 21, 2016 at 11:33:15PM +0300, Yury Norov wrote: > > > > > New aarch32 ptrace syscall handler is introduced to avoid run-time > > > > > detection of the task type. > > > > > > > > What's wrong with the run-time detection? If it's just to avoid a > > > > negligible overhead, I would rather keep the code simpler by avoiding > > > > duplicating the generic compat_sys_ptrace(). > > > > > > Nothing wrong. This is how Arnd asked me to do. You already asked this > > > question: http://lkml.iu.edu/hypermail/linux/kernel/1604.3/00930.html > > > > Hmm, I completely forgot about this ;). There is still an advantage to > > doing run-time checking if we avoid touching core code (less acks to > > gather and less code duplication). > > > > Let's see what Arnd says but the initial patch looked simpler. > > I don't currently have either version of the patch in my inbox > (the archive is on a different machine), but in general I'd still > think it's best to avoid the runtime check for aarch64-ilp32 > altogether. I'd have to look at the overall kernel source to > see if it's worth avoiding one or two instances though, or > if there are an overwhelming number of other checks that we > can't avoid at all. Just in case you haven't found them already, current version: https://marc.info/?l=linux-arm-kernel&m=147708276818318&w=2 Original version: https://patchwork.kernel.org/patch/7980521/ The old one looks more readable and given that ptrace is not really a fast path, I'm not two worried about run-time checks > Regarding ptrace, I notice that arch/tile doesn't even use > the compat entry point for its ilp32 user space on 64-bit > kernels, it just calls the regular 64-bit one. Would that > help here? I don't know whether it would work, we have incompatible siginfo_t on AArch64/ILP32. -- Catalin
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web