Re: [Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-12-12 Thread Deepa Dinamani
> > { > > local device=${1:-$TEST_DEV} > > - local sysfsdir=/proc/sys/fs/fs-timestamp-check-on > > - > > - if [ ! -e $sysfsdir ]; then > > - _notrun "no kernel support for y2038 sysfs switch" > > - fi > > > > Deepa, > > This change, which is already merged r

Re: [Y2038] [PATCH 02/24] compat: scsi: sg: fix v3 compat read/write interface

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 5:25 PM Christoph Hellwig wrote: > On Wed, Dec 11, 2019 at 09:42:36PM +0100, Arnd Bergmann wrote: > > --- a/drivers/scsi/sg.c > > +++ b/drivers/scsi/sg.c > > @@ -198,6 +198,7 @@ static void sg_device_destroy(struct kref *kref); > > > > #define SZ_SG_HEADER sizeof(struct s

Re: [Y2038] [PATCH 21/24] compat_ioctl: block: move blkdev_compat_ioctl() into ioctl.c

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 5:30 PM Christoph Hellwig wrote: > > > +#ifdef CONFIG_COMPAT > > +static int compat_put_ushort(unsigned long arg, unsigned short val) > > +{ > > + return put_user(val, (unsigned short __user *)compat_ptr(arg)); > > +} > > + > > +static int compat_put_int(unsigned long a

Re: [Y2038] [PATCH 20/24] compat_ioctl: move HDIO ioctl handling into drivers/ide

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 5:29 PM Christoph Hellwig wrote: > > > +static int put_user_long(long val, unsigned long arg) > > +{ > > +#ifdef CONFIG_COMPAT > > + if (in_compat_syscall()) > > + return put_user(val, (compat_long_t __user *)compat_ptr(arg)); > > +#endif > > + return pu

Re: [Y2038] [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-12 Thread Jens Axboe
On 12/12/19 9:27 AM, Christoph Hellwig wrote: > On Thu, Dec 12, 2019 at 01:28:08AM +0100, Paolo Bonzini wrote: >> I think it's because the only ioctl for virtio-blk is SG_IO. It makes >> sense to lump it in with scsi, but I wouldn't mind getting rid of >> CONFIG_VIRTIO_BLK_SCSI altogether. > > CO

Re: [Y2038] [PATCH 21/24] compat_ioctl: block: move blkdev_compat_ioctl() into ioctl.c

2019-12-12 Thread Christoph Hellwig
> +#ifdef CONFIG_COMPAT > +static int compat_put_ushort(unsigned long arg, unsigned short val) > +{ > + return put_user(val, (unsigned short __user *)compat_ptr(arg)); > +} > + > +static int compat_put_int(unsigned long arg, int val) > +{ > + return put_user(val, (compat_int_t __user *)comp

Re: [Y2038] [PATCH 20/24] compat_ioctl: move HDIO ioctl handling into drivers/ide

2019-12-12 Thread Christoph Hellwig
> +static int put_user_long(long val, unsigned long arg) > +{ > +#ifdef CONFIG_COMPAT > + if (in_compat_syscall()) > + return put_user(val, (compat_long_t __user *)compat_ptr(arg)); > +#endif > + return put_user(val, (long __user *)arg); > +} We had this #ifdef CONFIG_COMPAT

Re: [Y2038] [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-12 Thread Christoph Hellwig
On Thu, Dec 12, 2019 at 01:28:08AM +0100, Paolo Bonzini wrote: > I think it's because the only ioctl for virtio-blk is SG_IO. It makes > sense to lump it in with scsi, but I wouldn't mind getting rid of > CONFIG_VIRTIO_BLK_SCSI altogether. CONFIG_VIRTIO_BLK_SCSI has been broken for about two year

Re: [Y2038] [PATCH 02/24] compat: scsi: sg: fix v3 compat read/write interface

2019-12-12 Thread Christoph Hellwig
On Wed, Dec 11, 2019 at 09:42:36PM +0100, Arnd Bergmann wrote: > In the v5.4 merge window, a cleanup patch from Al Viro conflicted > with my rework of the compat handling for sg.c read(). Linus Torvalds > did a correct merge but pointed out that the resulting code is still > unsatisfactory. > > I

Re: [Y2038] [PATCH v5 6/8] media: v4l2-core: fix v4l2_buffer handling for time64 ABI

2019-12-12 Thread Hans Verkuil
On 11/26/19 5:18 PM, Arnd Bergmann wrote: > The v4l2_buffer structure contains a 'struct timeval' member that is > defined by the user space C library, creating an ABI incompatibility > when that gets updated to a 64-bit time_t. > > As in v4l2_event, handle this with a special case in video_put_us

Re: [Y2038] [PATCH v7 6/9] ALSA: Avoid using timespec for struct snd_timer_tread

2019-12-12 Thread Ben Hutchings
On Thu, 2019-12-12 at 10:57 +0100, Arnd Bergmann wrote: > On Thu, Dec 12, 2019 at 1:14 AM Ben Hutchings > wrote: > > On Wed, 2019-12-11 at 22:20 +0100, Arnd Bergmann wrote: > > [...] > > > +static int snd_timer_user_tread(void __user *argp, struct snd_timer_user > > > *tu, > > > +

Re: [Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-12-12 Thread Amir Goldstein
On Fri, Jul 19, 2019 at 7:21 AM Deepa Dinamani wrote: > > The mount behavior will not be altered because of the unsupported > timestamps on the filesystems. > > Adjust the test accordingly. > > An updated series to be posted after the merge window is hosted at >

Re: [Y2038] [PATCH 24/24] Documentation: document ioctl interfaces better

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 9:16 AM Geert Uytterhoeven wrote: > On Wed, Dec 11, 2019 at 9:53 PM Arnd Bergmann wrote: > > +``include/uapi/asm-generic/ioctl.h`` provides four macros for defining > > +ioctl commands that follow modern conventions: ``_IOC``, ``_IOR``, > > +``_IOW``, and ``_IORW``. These

Re: [Y2038] [PATCH 24/24] Documentation: document ioctl interfaces better

2019-12-12 Thread Arnd Bergmann
On Wed, Dec 11, 2019 at 10:05 PM Jonathan Corbet wrote: > > On Wed, 11 Dec 2019 21:42:58 +0100 > Arnd Bergmann wrote: > > > Documentation/process/botching-up-ioctls.rst was orignally > > written as a blog post for DRM driver writers, so it it misses > > some points while going into a lot of detai

Re: [Y2038] [PATCH 01/24] compat: ARM64: always include asm-generic/compat.h

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 11:17 AM Will Deacon wrote: > > On Wed, Dec 11, 2019 at 09:42:35PM +0100, Arnd Bergmann wrote: > > In order to use compat_* type defininitions in device drivers > > outside of CONFIG_COMPAT, move the inclusion of asm-generic/compat.h > > ahead of the #ifdef. > > > > All oth

Re: [Y2038] [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-12 Thread Michael S. Tsirkin
On Thu, Dec 12, 2019 at 01:28:08AM +0100, Paolo Bonzini wrote: > On 12/12/19 00:05, Michael S. Tsirkin wrote: > >> @@ -405,6 +405,9 @@ static int virtblk_getgeo(struct block_device *bd, > >> struct hd_geometry *geo) > >> > >> static const struct block_device_operations virtblk_fops = { > >>

Re: [Y2038] [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-12 Thread Michael S. Tsirkin
On Wed, Dec 11, 2019 at 09:42:49PM +0100, Arnd Bergmann wrote: > Each driver calling scsi_ioctl() gets an equivalent compat_ioctl() > handler that implements the same commands by calling scsi_compat_ioctl(). > > The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible > at this point

Re: [Y2038] [PATCH 01/24] compat: ARM64: always include asm-generic/compat.h

2019-12-12 Thread Will Deacon
On Wed, Dec 11, 2019 at 09:42:35PM +0100, Arnd Bergmann wrote: > In order to use compat_* type defininitions in device drivers > outside of CONFIG_COMPAT, move the inclusion of asm-generic/compat.h > ahead of the #ifdef. > > All other architectures already do this. > > Signed-off-by: Arnd Bergman

Re: [Y2038] [PATCH v7 6/9] ALSA: Avoid using timespec for struct snd_timer_tread

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 1:14 AM Ben Hutchings wrote: > > On Wed, 2019-12-11 at 22:20 +0100, Arnd Bergmann wrote: > [...] > > +static int snd_timer_user_tread(void __user *argp, struct snd_timer_user > > *tu, > > + unsigned int cmd, bool compat) > > +{ > > + int __u

Re: [Y2038] [PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers

2019-12-12 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 1:28 AM Paolo Bonzini wrote: > On 12/12/19 00:05, Michael S. Tsirkin wrote: > >> @@ -405,6 +405,9 @@ static int virtblk_getgeo(struct block_device *bd, > >> struct hd_geometry *geo) > >> > >> static const struct block_device_operations virtblk_fops = { > >> .ioctl =

Re: [Y2038] [PATCH 24/24] Documentation: document ioctl interfaces better

2019-12-12 Thread Geert Uytterhoeven
Hi Arnd, On Wed, Dec 11, 2019 at 9:53 PM Arnd Bergmann wrote: > Documentation/process/botching-up-ioctls.rst was orignally > written as a blog post for DRM driver writers, so it it misses > some points while going into a lot of detail on others. > > Try to provide a replacement that addresses typ