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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 9 Aug 2008 22:26:43 -0400
From:	Theodore Tso <tytso@....edu>
To:	Li Zefan <lizf@...fujitsu.com>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/3] ext4: add EXT4_IOC_GETCRTIME ioctl

On Wed, Aug 06, 2008 at 05:09:07PM +0800, Li Zefan wrote:
> +	case EXT4_IOC_GETCRTIME:
> +		return put_user(ei->i_crtime, (struct timespec __user *)arg);
> +

I'm worried about writing a struct timespec directly to user space,
because the kernel's idea of what is struct timespec might not be the
same as the userspace's understanding of struct timespec ---
specifically, because of the question of the width of time_t might be
different in the kernel and in userspace on different architectures.

I think we would be better off explicitly defining a structure, or
just returning the seconds and nanoseconds in explicit primitive
types.

Regards,

	     	 	       		 - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ