On Thu, 14 Nov 2019, Arnd Bergmann wrote:
On Wed, Nov 13, 2019 at 11:28 PM Thomas Gleixner tglx@linutronix.de wrote:
On Fri, 8 Nov 2019, Arnd Bergmann wrote:
@@ -197,19 +207,13 @@ static void set_cpu_itimer(struct task_struct *tsk, unsigned int clock_id, #define timeval_valid(t) \ (((t)->tv_sec >= 0) && (((unsigned long) (t)->tv_usec) < USEC_PER_SEC))
Hrm, why do we have yet another incarnation of timeval_valid()?
No idea, you have to ask the author of commit 7d99b7d634d8 ("[PATCH] Validate and sanitze itimer timeval from userspace") ;-)
I don't know that guy. :)
Can we please have only one (the inline version)?
I'm removing the inline version in a later patch along with most of the rest of include/linux/time32.h.
Having the macro version is convenient for this patch, since I'm using it on two different structures (itimerval/__kernel_old_timeval and old_itimerval32/old_timeval32), neither of which is the type used in the inline function.
Fair enough.
Thanks,
tglx