Re: [PATCH v4 18/26] arm64: vdso32: Replace TASK_SIZE_32 check in vgettimeofday
From: Vincenzo Frascino <vincenzo.frascino@arm.com>
Date: 2020-03-20 13:04:51
Also in:
linux-arch, linux-mips, lkml
Hi Catalin, On 3/19/20 6:10 PM, Catalin Marinas wrote:
Hi Vincenzo, On Thu, Mar 19, 2020 at 12:38:42PM +0000, Vincenzo Frascino wrote:quoted
On 3/18/20 6:36 PM, Catalin Marinas wrote:quoted
On Wed, Mar 18, 2020 at 04:14:26PM +0000, Vincenzo Frascino wrote:quoted
On 3/17/20 5:48 PM, Catalin Marinas wrote:quoted
So clock_gettime() on arm32 always falls back to the syscall?This seems not what you asked, and I think I answered accordingly. Anyway, in the case of arm32 the error code path is handled via syscall fallback. Look at the code below as an example (I am using getres because I know this email will be already too long, and I do not want to add pointless code, but the concept is the same for gettime and the others): static __maybe_unused int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res) { int ret = __cvdso_clock_getres_common(clock, res); if (unlikely(ret)) return clock_getres_fallback(clock, res); return 0; } When the return code of the "vdso" internal function returns an error the system call is triggered.But when __cvdso_clock_getres_common() does *not* return an error, it means that it handled the clock_getres() call without a fallback to the syscall. I assume this is possible on arm32. When the clock_getres() is handled directly (not as a syscall), why doesn't arm32 need the same (res >= TASK_SIZE) check?Ok, I see what you mean.I'm not sure.
Thank you for the long chat this morning. As we agreed I am going to repost the patches removing the checks discussed in this thread and we will address the syscall ABI difference subsequently with a different series. -- Regards, Vincenzo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel