Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932495AbbFEJ7e (ORCPT ); Fri, 5 Jun 2015 05:59:34 -0400 Received: from www.linutronix.de ([62.245.132.108]:34797 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932119AbbFEJ7d (ORCPT ); Fri, 5 Jun 2015 05:59:33 -0400 Date: Fri, 5 Jun 2015 11:59:35 +0200 (CEST) From: Thomas Gleixner To: Arnd Bergmann cc: y2038@lists.linaro.org, Baolin Wang , linux-kernel@vger.kernel.org Subject: Re: [Y2038] [PATCH v4 06/25] time/posix-timers:Introduce {get, put}_timespec and {get, put}_itimerspec In-Reply-To: <13035006.xRdC2jB7D9@wuerfel> Message-ID: References: <1433159708-4780-1-git-send-email-baolin.wang@linaro.org> <13035006.xRdC2jB7D9@wuerfel> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1067 Lines: 35 On Thu, 4 Jun 2015, Arnd Bergmann wrote: > int get_timespec64(struct timespec64 *ts, const struct timespec __user *uts) > { > struct timespec64 tmp; > int ret; > > if (sizeof(tmp) == sizeof(*ts)) > return copy_from_user(&tmp, uts, sizeof(*ts)) ? -EFAULT : 0; > > ret = copy_from_user(&tmp, uts, sizeof(*ts)); > if (ret) > return -EFAULT; > > ts->tv_sec = tmp.tv_sec; > ts->tv_nsec = tmp.tv_nsec; > > return 0; > } > > This works fine, but I'd have to change it to copy from a __user > __kernel_timespec instead of timespec in my system call series, and > in order to do that, we must ensure that I can change over all callers > at the same time, so with the function prototype above, we should not > start using get_timespec64 for anything outside of posix-timers.c. That's fine I think. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/