lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1506021743240.20347@nanos>
Date:	Tue, 2 Jun 2015 21:20:02 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Baolin Wang <baolin.wang@...aro.org>
cc:	arnd@...db.de, john.stultz@...aro.org, heenasirwani@...il.com,
	pang.xunlei@...aro.org, linux-kernel@...r.kernel.org,
	y2038@...ts.linaro.org
Subject: Re: [PATCH v4 05/25] time:Introduce the do_sys_settimeofday64()
 function with timespec64 type

On Mon, 1 Jun 2015, Baolin Wang wrote:

Subject line sucks.

> Introduce the do_sys_settimeofday64() function with timespec64 type to make
> it is ready for 2038 issue when setting the time of day.
> 
> And move the do_sys_settimeofday() function to the timekeeping.h file, that it
> is convenient to delete it later.

See other mails.
 
>  extern void do_gettimeofday(struct timeval *tv);
>  extern int do_settimeofday64(const struct timespec64 *ts);
> -extern int do_sys_settimeofday(const struct timespec *tv,
> -			       const struct timezone *tz);
> +extern int do_sys_settimeofday64(const struct timespec64 *tv,
> +				 const struct timezone *tz);
> +static inline int do_sys_settimeofday(const struct timespec *tv,
> +				      const struct timezone *tz)
> +{
> +	struct timespec64 ts64;
> +
> +	ts64 = timespec_to_timespec64(*tv);
> +	return do_sys_settimeofday64(&ts64, tz);


If you write it:

	struct timespec64 ts64 = timespec_to_timespec64(*tv);

	return do_sys_settimeofday64(&ts64, tz);
       
You spare a line per inline function. Applies to the other patches as well.

>  
> -int do_sys_settimeofday(const struct timespec *tv, const struct timezone *tz)
> +int do_sys_settimeofday64(const struct timespec64 *tv, const struct timezone *tz)
>  {
>  	static int firsttime = 1;
>  	int error = 0;
>  
> -	if (tv && !timespec_valid(tv))
> +	if (tv && !timespec64_valid(tv))
>  		return -EINVAL;
>  
> -	error = security_settime(tv, tz);
> +	error = security_settime64(tv, tz);

No such function. Fails to build.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ