All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.9 103/223] take floppy compat ioctls to sodding floppy.c
Date: Fri,  2 Aug 2019 11:35:28 +0200	[thread overview]
Message-ID: <20190802092245.891419443@linuxfoundation.org> (raw)
In-Reply-To: <20190802092238.692035242@linuxfoundation.org>

[ Upstream commit 229b53c9bf4e1132a4aa6feb9632a7a1f1d08c5c ]

all other drivers recognizing those ioctls are very much *not*
biarch.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 block/compat_ioctl.c   |  340 -------------------------------------------------
 drivers/block/floppy.c |  328 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 328 insertions(+), 340 deletions(-)

--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -4,7 +4,6 @@
 #include <linux/cdrom.h>
 #include <linux/compat.h>
 #include <linux/elevator.h>
-#include <linux/fd.h>
 #include <linux/hdreg.h>
 #include <linux/slab.h>
 #include <linux/syscalls.h>
@@ -209,318 +208,6 @@ static int compat_blkpg_ioctl(struct blo
 #define BLKBSZSET_32		_IOW(0x12, 113, int)
 #define BLKGETSIZE64_32		_IOR(0x12, 114, int)
 
-struct compat_floppy_drive_params {
-	char		cmos;
-	compat_ulong_t	max_dtr;
-	compat_ulong_t	hlt;
-	compat_ulong_t	hut;
-	compat_ulong_t	srt;
-	compat_ulong_t	spinup;
-	compat_ulong_t	spindown;
-	unsigned char	spindown_offset;
-	unsigned char	select_delay;
-	unsigned char	rps;
-	unsigned char	tracks;
-	compat_ulong_t	timeout;
-	unsigned char	interleave_sect;
-	struct floppy_max_errors max_errors;
-	char		flags;
-	char		read_track;
-	short		autodetect[8];
-	compat_int_t	checkfreq;
-	compat_int_t	native_format;
-};
-
-struct compat_floppy_drive_struct {
-	signed char	flags;
-	compat_ulong_t	spinup_date;
-	compat_ulong_t	select_date;
-	compat_ulong_t	first_read_date;
-	short		probed_format;
-	short		track;
-	short		maxblock;
-	short		maxtrack;
-	compat_int_t	generation;
-	compat_int_t	keep_data;
-	compat_int_t	fd_ref;
-	compat_int_t	fd_device;
-	compat_int_t	last_checked;
-	compat_caddr_t dmabuf;
-	compat_int_t	bufblocks;
-};
-
-struct compat_floppy_fdc_state {
-	compat_int_t	spec1;
-	compat_int_t	spec2;
-	compat_int_t	dtr;
-	unsigned char	version;
-	unsigned char	dor;
-	compat_ulong_t	address;
-	unsigned int	rawcmd:2;
-	unsigned int	reset:1;
-	unsigned int	need_configure:1;
-	unsigned int	perp_mode:2;
-	unsigned int	has_fifo:1;
-	unsigned int	driver_version;
-	unsigned char	track[4];
-};
-
-struct compat_floppy_write_errors {
-	unsigned int	write_errors;
-	compat_ulong_t	first_error_sector;
-	compat_int_t	first_error_generation;
-	compat_ulong_t	last_error_sector;
-	compat_int_t	last_error_generation;
-	compat_uint_t	badness;
-};
-
-#define FDSETPRM32 _IOW(2, 0x42, struct compat_floppy_struct)
-#define FDDEFPRM32 _IOW(2, 0x43, struct compat_floppy_struct)
-#define FDSETDRVPRM32 _IOW(2, 0x90, struct compat_floppy_drive_params)
-#define FDGETDRVPRM32 _IOR(2, 0x11, struct compat_floppy_drive_params)
-#define FDGETDRVSTAT32 _IOR(2, 0x12, struct compat_floppy_drive_struct)
-#define FDPOLLDRVSTAT32 _IOR(2, 0x13, struct compat_floppy_drive_struct)
-#define FDGETFDCSTAT32 _IOR(2, 0x15, struct compat_floppy_fdc_state)
-#define FDWERRORGET32  _IOR(2, 0x17, struct compat_floppy_write_errors)
-
-static struct {
-	unsigned int	cmd32;
-	unsigned int	cmd;
-} fd_ioctl_trans_table[] = {
-	{ FDSETPRM32, FDSETPRM },
-	{ FDDEFPRM32, FDDEFPRM },
-	{ FDGETPRM32, FDGETPRM },
-	{ FDSETDRVPRM32, FDSETDRVPRM },
-	{ FDGETDRVPRM32, FDGETDRVPRM },
-	{ FDGETDRVSTAT32, FDGETDRVSTAT },
-	{ FDPOLLDRVSTAT32, FDPOLLDRVSTAT },
-	{ FDGETFDCSTAT32, FDGETFDCSTAT },
-	{ FDWERRORGET32, FDWERRORGET }
-};
-
-#define NR_FD_IOCTL_TRANS ARRAY_SIZE(fd_ioctl_trans_table)
-
-static int compat_fd_ioctl(struct block_device *bdev, fmode_t mode,
-		unsigned int cmd, unsigned long arg)
-{
-	mm_segment_t old_fs = get_fs();
-	void *karg = NULL;
-	unsigned int kcmd = 0;
-	int i, err;
-
-	for (i = 0; i < NR_FD_IOCTL_TRANS; i++)
-		if (cmd == fd_ioctl_trans_table[i].cmd32) {
-			kcmd = fd_ioctl_trans_table[i].cmd;
-			break;
-		}
-	if (!kcmd)
-		return -EINVAL;
-
-	switch (cmd) {
-	case FDSETPRM32:
-	case FDDEFPRM32:
-	case FDGETPRM32:
-	{
-		compat_uptr_t name;
-		struct compat_floppy_struct __user *uf;
-		struct floppy_struct *f;
-
-		uf = compat_ptr(arg);
-		f = karg = kmalloc(sizeof(struct floppy_struct), GFP_KERNEL);
-		if (!karg)
-			return -ENOMEM;
-		if (cmd == FDGETPRM32)
-			break;
-		err = __get_user(f->size, &uf->size);
-		err |= __get_user(f->sect, &uf->sect);
-		err |= __get_user(f->head, &uf->head);
-		err |= __get_user(f->track, &uf->track);
-		err |= __get_user(f->stretch, &uf->stretch);
-		err |= __get_user(f->gap, &uf->gap);
-		err |= __get_user(f->rate, &uf->rate);
-		err |= __get_user(f->spec1, &uf->spec1);
-		err |= __get_user(f->fmt_gap, &uf->fmt_gap);
-		err |= __get_user(name, &uf->name);
-		f->name = compat_ptr(name);
-		if (err) {
-			err = -EFAULT;
-			goto out;
-		}
-		break;
-	}
-	case FDSETDRVPRM32:
-	case FDGETDRVPRM32:
-	{
-		struct compat_floppy_drive_params __user *uf;
-		struct floppy_drive_params *f;
-
-		uf = compat_ptr(arg);
-		f = karg = kmalloc(sizeof(struct floppy_drive_params), GFP_KERNEL);
-		if (!karg)
-			return -ENOMEM;
-		if (cmd == FDGETDRVPRM32)
-			break;
-		err = __get_user(f->cmos, &uf->cmos);
-		err |= __get_user(f->max_dtr, &uf->max_dtr);
-		err |= __get_user(f->hlt, &uf->hlt);
-		err |= __get_user(f->hut, &uf->hut);
-		err |= __get_user(f->srt, &uf->srt);
-		err |= __get_user(f->spinup, &uf->spinup);
-		err |= __get_user(f->spindown, &uf->spindown);
-		err |= __get_user(f->spindown_offset, &uf->spindown_offset);
-		err |= __get_user(f->select_delay, &uf->select_delay);
-		err |= __get_user(f->rps, &uf->rps);
-		err |= __get_user(f->tracks, &uf->tracks);
-		err |= __get_user(f->timeout, &uf->timeout);
-		err |= __get_user(f->interleave_sect, &uf->interleave_sect);
-		err |= __copy_from_user(&f->max_errors, &uf->max_errors, sizeof(f->max_errors));
-		err |= __get_user(f->flags, &uf->flags);
-		err |= __get_user(f->read_track, &uf->read_track);
-		err |= __copy_from_user(f->autodetect, uf->autodetect, sizeof(f->autodetect));
-		err |= __get_user(f->checkfreq, &uf->checkfreq);
-		err |= __get_user(f->native_format, &uf->native_format);
-		if (err) {
-			err = -EFAULT;
-			goto out;
-		}
-		break;
-	}
-	case FDGETDRVSTAT32:
-	case FDPOLLDRVSTAT32:
-		karg = kmalloc(sizeof(struct floppy_drive_struct), GFP_KERNEL);
-		if (!karg)
-			return -ENOMEM;
-		break;
-	case FDGETFDCSTAT32:
-		karg = kmalloc(sizeof(struct floppy_fdc_state), GFP_KERNEL);
-		if (!karg)
-			return -ENOMEM;
-		break;
-	case FDWERRORGET32:
-		karg = kmalloc(sizeof(struct floppy_write_errors), GFP_KERNEL);
-		if (!karg)
-			return -ENOMEM;
-		break;
-	default:
-		return -EINVAL;
-	}
-	set_fs(KERNEL_DS);
-	err = __blkdev_driver_ioctl(bdev, mode, kcmd, (unsigned long)karg);
-	set_fs(old_fs);
-	if (err)
-		goto out;
-	switch (cmd) {
-	case FDGETPRM32:
-	{
-		struct floppy_struct *f = karg;
-		struct compat_floppy_struct __user *uf = compat_ptr(arg);
-
-		err = __put_user(f->size, &uf->size);
-		err |= __put_user(f->sect, &uf->sect);
-		err |= __put_user(f->head, &uf->head);
-		err |= __put_user(f->track, &uf->track);
-		err |= __put_user(f->stretch, &uf->stretch);
-		err |= __put_user(f->gap, &uf->gap);
-		err |= __put_user(f->rate, &uf->rate);
-		err |= __put_user(f->spec1, &uf->spec1);
-		err |= __put_user(f->fmt_gap, &uf->fmt_gap);
-		err |= __put_user((u64)f->name, (compat_caddr_t __user *)&uf->name);
-		break;
-	}
-	case FDGETDRVPRM32:
-	{
-		struct compat_floppy_drive_params __user *uf;
-		struct floppy_drive_params *f = karg;
-
-		uf = compat_ptr(arg);
-		err = __put_user(f->cmos, &uf->cmos);
-		err |= __put_user(f->max_dtr, &uf->max_dtr);
-		err |= __put_user(f->hlt, &uf->hlt);
-		err |= __put_user(f->hut, &uf->hut);
-		err |= __put_user(f->srt, &uf->srt);
-		err |= __put_user(f->spinup, &uf->spinup);
-		err |= __put_user(f->spindown, &uf->spindown);
-		err |= __put_user(f->spindown_offset, &uf->spindown_offset);
-		err |= __put_user(f->select_delay, &uf->select_delay);
-		err |= __put_user(f->rps, &uf->rps);
-		err |= __put_user(f->tracks, &uf->tracks);
-		err |= __put_user(f->timeout, &uf->timeout);
-		err |= __put_user(f->interleave_sect, &uf->interleave_sect);
-		err |= __copy_to_user(&uf->max_errors, &f->max_errors, sizeof(f->max_errors));
-		err |= __put_user(f->flags, &uf->flags);
-		err |= __put_user(f->read_track, &uf->read_track);
-		err |= __copy_to_user(uf->autodetect, f->autodetect, sizeof(f->autodetect));
-		err |= __put_user(f->checkfreq, &uf->checkfreq);
-		err |= __put_user(f->native_format, &uf->native_format);
-		break;
-	}
-	case FDGETDRVSTAT32:
-	case FDPOLLDRVSTAT32:
-	{
-		struct compat_floppy_drive_struct __user *uf;
-		struct floppy_drive_struct *f = karg;
-
-		uf = compat_ptr(arg);
-		err = __put_user(f->flags, &uf->flags);
-		err |= __put_user(f->spinup_date, &uf->spinup_date);
-		err |= __put_user(f->select_date, &uf->select_date);
-		err |= __put_user(f->first_read_date, &uf->first_read_date);
-		err |= __put_user(f->probed_format, &uf->probed_format);
-		err |= __put_user(f->track, &uf->track);
-		err |= __put_user(f->maxblock, &uf->maxblock);
-		err |= __put_user(f->maxtrack, &uf->maxtrack);
-		err |= __put_user(f->generation, &uf->generation);
-		err |= __put_user(f->keep_data, &uf->keep_data);
-		err |= __put_user(f->fd_ref, &uf->fd_ref);
-		err |= __put_user(f->fd_device, &uf->fd_device);
-		err |= __put_user(f->last_checked, &uf->last_checked);
-		err |= __put_user((u64)f->dmabuf, &uf->dmabuf);
-		err |= __put_user((u64)f->bufblocks, &uf->bufblocks);
-		break;
-	}
-	case FDGETFDCSTAT32:
-	{
-		struct compat_floppy_fdc_state __user *uf;
-		struct floppy_fdc_state *f = karg;
-
-		uf = compat_ptr(arg);
-		err = __put_user(f->spec1, &uf->spec1);
-		err |= __put_user(f->spec2, &uf->spec2);
-		err |= __put_user(f->dtr, &uf->dtr);
-		err |= __put_user(f->version, &uf->version);
-		err |= __put_user(f->dor, &uf->dor);
-		err |= __put_user(f->address, &uf->address);
-		err |= __copy_to_user((char __user *)&uf->address + sizeof(uf->address),
-				   (char *)&f->address + sizeof(f->address), sizeof(int));
-		err |= __put_user(f->driver_version, &uf->driver_version);
-		err |= __copy_to_user(uf->track, f->track, sizeof(f->track));
-		break;
-	}
-	case FDWERRORGET32:
-	{
-		struct compat_floppy_write_errors __user *uf;
-		struct floppy_write_errors *f = karg;
-
-		uf = compat_ptr(arg);
-		err = __put_user(f->write_errors, &uf->write_errors);
-		err |= __put_user(f->first_error_sector, &uf->first_error_sector);
-		err |= __put_user(f->first_error_generation, &uf->first_error_generation);
-		err |= __put_user(f->last_error_sector, &uf->last_error_sector);
-		err |= __put_user(f->last_error_generation, &uf->last_error_generation);
-		err |= __put_user(f->badness, &uf->badness);
-		break;
-	}
-	default:
-		break;
-	}
-	if (err)
-		err = -EFAULT;
-
-out:
-	kfree(karg);
-	return err;
-}
-
 static int compat_blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode,
 			unsigned cmd, unsigned long arg)
 {
@@ -537,16 +224,6 @@ static int compat_blkdev_driver_ioctl(st
 	case HDIO_GET_ADDRESS:
 	case HDIO_GET_BUSSTATE:
 		return compat_hdio_ioctl(bdev, mode, cmd, arg);
-	case FDSETPRM32:
-	case FDDEFPRM32:
-	case FDGETPRM32:
-	case FDSETDRVPRM32:
-	case FDGETDRVPRM32:
-	case FDGETDRVSTAT32:
-	case FDPOLLDRVSTAT32:
-	case FDGETFDCSTAT32:
-	case FDWERRORGET32:
-		return compat_fd_ioctl(bdev, mode, cmd, arg);
 	case CDROMREADAUDIO:
 		return compat_cdrom_read_audio(bdev, mode, cmd, arg);
 	case CDROM_SEND_PACKET:
@@ -566,23 +243,6 @@ static int compat_blkdev_driver_ioctl(st
 	case HDIO_DRIVE_CMD:
 	/* 0x330 is reserved -- it used to be HDIO_GETGEO_BIG */
 	case 0x330:
-	/* 0x02 -- Floppy ioctls */
-	case FDMSGON:
-	case FDMSGOFF:
-	case FDSETEMSGTRESH:
-	case FDFLUSH:
-	case FDWERRORCLR:
-	case FDSETMAXERRS:
-	case FDGETMAXERRS:
-	case FDGETDRVTYP:
-	case FDEJECT:
-	case FDCLRPRM:
-	case FDFMTBEG:
-	case FDFMTEND:
-	case FDRESET:
-	case FDTWADDLE:
-	case FDFMTTRK:
-	case FDRAWCMD:
 	/* CDROM stuff */
 	case CDROMPAUSE:
 	case CDROMRESUME:
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -192,6 +192,7 @@ static int print_unex = 1;
 #include <linux/io.h>
 #include <linux/uaccess.h>
 #include <linux/async.h>
+#include <linux/compat.h>
 
 /*
  * PS/2 floppies have much slower step rates than regular floppies.
@@ -3569,6 +3570,330 @@ static int fd_ioctl(struct block_device
 	return ret;
 }
 
+#ifdef CONFIG_COMPAT
+
+struct compat_floppy_drive_params {
+	char		cmos;
+	compat_ulong_t	max_dtr;
+	compat_ulong_t	hlt;
+	compat_ulong_t	hut;
+	compat_ulong_t	srt;
+	compat_ulong_t	spinup;
+	compat_ulong_t	spindown;
+	unsigned char	spindown_offset;
+	unsigned char	select_delay;
+	unsigned char	rps;
+	unsigned char	tracks;
+	compat_ulong_t	timeout;
+	unsigned char	interleave_sect;
+	struct floppy_max_errors max_errors;
+	char		flags;
+	char		read_track;
+	short		autodetect[8];
+	compat_int_t	checkfreq;
+	compat_int_t	native_format;
+};
+
+struct compat_floppy_drive_struct {
+	signed char	flags;
+	compat_ulong_t	spinup_date;
+	compat_ulong_t	select_date;
+	compat_ulong_t	first_read_date;
+	short		probed_format;
+	short		track;
+	short		maxblock;
+	short		maxtrack;
+	compat_int_t	generation;
+	compat_int_t	keep_data;
+	compat_int_t	fd_ref;
+	compat_int_t	fd_device;
+	compat_int_t	last_checked;
+	compat_caddr_t dmabuf;
+	compat_int_t	bufblocks;
+};
+
+struct compat_floppy_fdc_state {
+	compat_int_t	spec1;
+	compat_int_t	spec2;
+	compat_int_t	dtr;
+	unsigned char	version;
+	unsigned char	dor;
+	compat_ulong_t	address;
+	unsigned int	rawcmd:2;
+	unsigned int	reset:1;
+	unsigned int	need_configure:1;
+	unsigned int	perp_mode:2;
+	unsigned int	has_fifo:1;
+	unsigned int	driver_version;
+	unsigned char	track[4];
+};
+
+struct compat_floppy_write_errors {
+	unsigned int	write_errors;
+	compat_ulong_t	first_error_sector;
+	compat_int_t	first_error_generation;
+	compat_ulong_t	last_error_sector;
+	compat_int_t	last_error_generation;
+	compat_uint_t	badness;
+};
+
+#define FDSETPRM32 _IOW(2, 0x42, struct compat_floppy_struct)
+#define FDDEFPRM32 _IOW(2, 0x43, struct compat_floppy_struct)
+#define FDSETDRVPRM32 _IOW(2, 0x90, struct compat_floppy_drive_params)
+#define FDGETDRVPRM32 _IOR(2, 0x11, struct compat_floppy_drive_params)
+#define FDGETDRVSTAT32 _IOR(2, 0x12, struct compat_floppy_drive_struct)
+#define FDPOLLDRVSTAT32 _IOR(2, 0x13, struct compat_floppy_drive_struct)
+#define FDGETFDCSTAT32 _IOR(2, 0x15, struct compat_floppy_fdc_state)
+#define FDWERRORGET32  _IOR(2, 0x17, struct compat_floppy_write_errors)
+
+static int compat_set_geometry(struct block_device *bdev, fmode_t mode, unsigned int cmd,
+		    struct compat_floppy_struct __user *arg)
+{
+	struct floppy_struct v;
+	int drive, type;
+	int err;
+
+	BUILD_BUG_ON(offsetof(struct floppy_struct, name) !=
+		     offsetof(struct compat_floppy_struct, name));
+
+	if (!(mode & (FMODE_WRITE | FMODE_WRITE_IOCTL)))
+		return -EPERM;
+
+	memset(&v, 0, sizeof(struct floppy_struct));
+	if (copy_from_user(&v, arg, offsetof(struct floppy_struct, name)))
+		return -EFAULT;
+
+	mutex_lock(&floppy_mutex);
+	drive = (long)bdev->bd_disk->private_data;
+	type = ITYPE(UDRS->fd_device);
+	err = set_geometry(cmd == FDSETPRM32 ? FDSETPRM : FDDEFPRM,
+			&v, drive, type, bdev);
+	mutex_unlock(&floppy_mutex);
+	return err;
+}
+
+static int compat_get_prm(int drive,
+			  struct compat_floppy_struct __user *arg)
+{
+	struct compat_floppy_struct v;
+	struct floppy_struct *p;
+	int err;
+
+	memset(&v, 0, sizeof(v));
+	mutex_lock(&floppy_mutex);
+	err = get_floppy_geometry(drive, ITYPE(UDRS->fd_device), &p);
+	if (err) {
+		mutex_unlock(&floppy_mutex);
+		return err;
+	}
+	memcpy(&v, p, offsetof(struct floppy_struct, name));
+	mutex_unlock(&floppy_mutex);
+	if (copy_to_user(arg, &v, sizeof(struct compat_floppy_struct)))
+		return -EFAULT;
+	return 0;
+}
+
+static int compat_setdrvprm(int drive,
+			    struct compat_floppy_drive_params __user *arg)
+{
+	struct compat_floppy_drive_params v;
+
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+	if (copy_from_user(&v, arg, sizeof(struct compat_floppy_drive_params)))
+		return -EFAULT;
+	mutex_lock(&floppy_mutex);
+	UDP->cmos = v.cmos;
+	UDP->max_dtr = v.max_dtr;
+	UDP->hlt = v.hlt;
+	UDP->hut = v.hut;
+	UDP->srt = v.srt;
+	UDP->spinup = v.spinup;
+	UDP->spindown = v.spindown;
+	UDP->spindown_offset = v.spindown_offset;
+	UDP->select_delay = v.select_delay;
+	UDP->rps = v.rps;
+	UDP->tracks = v.tracks;
+	UDP->timeout = v.timeout;
+	UDP->interleave_sect = v.interleave_sect;
+	UDP->max_errors = v.max_errors;
+	UDP->flags = v.flags;
+	UDP->read_track = v.read_track;
+	memcpy(UDP->autodetect, v.autodetect, sizeof(v.autodetect));
+	UDP->checkfreq = v.checkfreq;
+	UDP->native_format = v.native_format;
+	mutex_unlock(&floppy_mutex);
+	return 0;
+}
+
+static int compat_getdrvprm(int drive,
+			    struct compat_floppy_drive_params __user *arg)
+{
+	struct compat_floppy_drive_params v;
+
+	memset(&v, 0, sizeof(struct compat_floppy_drive_params));
+	mutex_lock(&floppy_mutex);
+	v.cmos = UDP->cmos;
+	v.max_dtr = UDP->max_dtr;
+	v.hlt = UDP->hlt;
+	v.hut = UDP->hut;
+	v.srt = UDP->srt;
+	v.spinup = UDP->spinup;
+	v.spindown = UDP->spindown;
+	v.spindown_offset = UDP->spindown_offset;
+	v.select_delay = UDP->select_delay;
+	v.rps = UDP->rps;
+	v.tracks = UDP->tracks;
+	v.timeout = UDP->timeout;
+	v.interleave_sect = UDP->interleave_sect;
+	v.max_errors = UDP->max_errors;
+	v.flags = UDP->flags;
+	v.read_track = UDP->read_track;
+	memcpy(v.autodetect, UDP->autodetect, sizeof(v.autodetect));
+	v.checkfreq = UDP->checkfreq;
+	v.native_format = UDP->native_format;
+	mutex_unlock(&floppy_mutex);
+
+	if (copy_from_user(arg, &v, sizeof(struct compat_floppy_drive_params)))
+		return -EFAULT;
+	return 0;
+}
+
+static int compat_getdrvstat(int drive, bool poll,
+			    struct compat_floppy_drive_struct __user *arg)
+{
+	struct compat_floppy_drive_struct v;
+
+	memset(&v, 0, sizeof(struct compat_floppy_drive_struct));
+	mutex_lock(&floppy_mutex);
+
+	if (poll) {
+		if (lock_fdc(drive))
+			goto Eintr;
+		if (poll_drive(true, FD_RAW_NEED_DISK) == -EINTR)
+			goto Eintr;
+		process_fd_request();
+	}
+	v.spinup_date = UDRS->spinup_date;
+	v.select_date = UDRS->select_date;
+	v.first_read_date = UDRS->first_read_date;
+	v.probed_format = UDRS->probed_format;
+	v.track = UDRS->track;
+	v.maxblock = UDRS->maxblock;
+	v.maxtrack = UDRS->maxtrack;
+	v.generation = UDRS->generation;
+	v.keep_data = UDRS->keep_data;
+	v.fd_ref = UDRS->fd_ref;
+	v.fd_device = UDRS->fd_device;
+	v.last_checked = UDRS->last_checked;
+	v.dmabuf = (uintptr_t)UDRS->dmabuf;
+	v.bufblocks = UDRS->bufblocks;
+	mutex_unlock(&floppy_mutex);
+
+	if (copy_from_user(arg, &v, sizeof(struct compat_floppy_drive_struct)))
+		return -EFAULT;
+	return 0;
+Eintr:
+	mutex_unlock(&floppy_mutex);
+	return -EINTR;
+}
+
+static int compat_getfdcstat(int drive,
+			    struct compat_floppy_fdc_state __user *arg)
+{
+	struct compat_floppy_fdc_state v32;
+	struct floppy_fdc_state v;
+
+	mutex_lock(&floppy_mutex);
+	v = *UFDCS;
+	mutex_unlock(&floppy_mutex);
+
+	memset(&v32, 0, sizeof(struct compat_floppy_fdc_state));
+	v32.spec1 = v.spec1;
+	v32.spec2 = v.spec2;
+	v32.dtr = v.dtr;
+	v32.version = v.version;
+	v32.dor = v.dor;
+	v32.address = v.address;
+	v32.rawcmd = v.rawcmd;
+	v32.reset = v.reset;
+	v32.need_configure = v.need_configure;
+	v32.perp_mode = v.perp_mode;
+	v32.has_fifo = v.has_fifo;
+	v32.driver_version = v.driver_version;
+	memcpy(v32.track, v.track, 4);
+	if (copy_to_user(arg, &v32, sizeof(struct compat_floppy_fdc_state)))
+		return -EFAULT;
+	return 0;
+}
+
+static int compat_werrorget(int drive,
+			    struct compat_floppy_write_errors __user *arg)
+{
+	struct compat_floppy_write_errors v32;
+	struct floppy_write_errors v;
+
+	memset(&v32, 0, sizeof(struct compat_floppy_write_errors));
+	mutex_lock(&floppy_mutex);
+	v = *UDRWE;
+	mutex_unlock(&floppy_mutex);
+	v32.write_errors = v.write_errors;
+	v32.first_error_sector = v.first_error_sector;
+	v32.first_error_generation = v.first_error_generation;
+	v32.last_error_sector = v.last_error_sector;
+	v32.last_error_generation = v.last_error_generation;
+	v32.badness = v.badness;
+	if (copy_to_user(arg, &v32, sizeof(struct compat_floppy_write_errors)))
+		return -EFAULT;
+	return 0;
+}
+
+static int fd_compat_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
+		    unsigned long param)
+{
+	int drive = (long)bdev->bd_disk->private_data;
+	switch (cmd) {
+	case FDMSGON:
+	case FDMSGOFF:
+	case FDSETEMSGTRESH:
+	case FDFLUSH:
+	case FDWERRORCLR:
+	case FDEJECT:
+	case FDCLRPRM:
+	case FDFMTBEG:
+	case FDRESET:
+	case FDTWADDLE:
+		return fd_ioctl(bdev, mode, cmd, param);
+	case FDSETMAXERRS:
+	case FDGETMAXERRS:
+	case FDGETDRVTYP:
+	case FDFMTEND:
+	case FDFMTTRK:
+	case FDRAWCMD:
+		return fd_ioctl(bdev, mode, cmd,
+				(unsigned long)compat_ptr(param));
+	case FDSETPRM32:
+	case FDDEFPRM32:
+		return compat_set_geometry(bdev, mode, cmd, compat_ptr(param));
+	case FDGETPRM32:
+		return compat_get_prm(drive, compat_ptr(param));
+	case FDSETDRVPRM32:
+		return compat_setdrvprm(drive, compat_ptr(param));
+	case FDGETDRVPRM32:
+		return compat_getdrvprm(drive, compat_ptr(param));
+	case FDPOLLDRVSTAT32:
+		return compat_getdrvstat(drive, true, compat_ptr(param));
+	case FDGETDRVSTAT32:
+		return compat_getdrvstat(drive, false, compat_ptr(param));
+	case FDGETFDCSTAT32:
+		return compat_getfdcstat(drive, compat_ptr(param));
+	case FDWERRORGET32:
+		return compat_werrorget(drive, compat_ptr(param));
+	}
+	return -EINVAL;
+}
+#endif
+
 static void __init config_types(void)
 {
 	bool has_drive = false;
@@ -3891,6 +4216,9 @@ static const struct block_device_operati
 	.getgeo			= fd_getgeo,
 	.check_events		= floppy_check_events,
 	.revalidate_disk	= floppy_revalidate,
+#ifdef CONFIG_COMPAT
+	.compat_ioctl		= fd_compat_ioctl,
+#endif
 };
 
 /*



  parent reply	other threads:[~2019-08-02  9:50 UTC|newest]

Thread overview: 233+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02  9:33 [PATCH 4.9 000/223] 4.9.187-stable review Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 001/223] MIPS: ath79: fix ar933x uart parity mode Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 002/223] MIPS: fix build on non-linux hosts Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 003/223] arm64/efi: Mark __efistub_stext_offset as an absolute symbol explicitly Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 004/223] dmaengine: imx-sdma: fix use-after-free on probe error path Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 005/223] ath10k: Do not send probe response template for mesh Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 006/223] ath9k: Check for errors when reading SREV register Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 007/223] ath6kl: add some bounds checking Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 008/223] ath: DFS JP domain W56 fixed pulse type 3 RADAR detection Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 009/223] batman-adv: fix for leaked TVLV handler Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 010/223] media: dvb: usb: fix use after free in dvb_usb_device_exit Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 011/223] crypto: talitos - fix skcipher failure due to wrong output IV Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 012/223] media: marvell-ccic: fix DMA s/g desc number calculation Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 013/223] media: vpss: fix a potential NULL pointer dereference Greg Kroah-Hartman
2019-08-02  9:33 ` [PATCH 4.9 014/223] media: media_device_enum_links32: clean a reserved field Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 015/223] net: stmmac: dwmac1000: Clear unused address entries Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 016/223] net: stmmac: dwmac4/5: " Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 017/223] signal/pid_namespace: Fix reboot_pid_ns to use send_sig not force_sig Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 018/223] af_key: fix leaks in key_pol_get_resp and dump_sp Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 019/223] xfrm: Fix xfrm sel prefix length validation Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 020/223] media: mc-device.c: dont memset __user pointer contents Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 021/223] media: staging: media: davinci_vpfe: - Fix for memory leak if decoder initialization fails Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 022/223] net: phy: Check against net_device being NULL Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 023/223] crypto: talitos - properly handle split ICV Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 024/223] crypto: talitos - Align SEC1 accesses to 32 bits boundaries Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 025/223] tua6100: Avoid build warnings Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 026/223] locking/lockdep: Fix merging of hlocks with non-zero references Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 027/223] media: wl128x: Fix some error handling in fm_v4l2_init_video_device() Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 028/223] cpupower : frequency-set -r option misses the last cpu in related cpu list Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 029/223] net: fec: Do not use netdev messages too early Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 030/223] net: axienet: Fix race condition causing TX hang Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 031/223] s390/qdio: handle PENDING state for QEBSM devices Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 032/223] perf cs-etm: Properly set the value of old and head in snapshot mode Greg Kroah-Hartman
2019-08-02  9:34   ` Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 033/223] perf test 6: Fix missing kvm module load for s390 Greg Kroah-Hartman
2019-08-28  0:12   ` Ben Hutchings
2019-08-28  3:02     ` Sasha Levin
2019-08-02  9:34 ` [PATCH 4.9 034/223] gpio: omap: fix lack of irqstatus_raw0 for OMAP4 Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 035/223] gpio: omap: ensure irq is enabled before wakeup Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 036/223] regmap: fix bulk writes on paged registers Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 037/223] bpf: silence warning messages in core Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 038/223] rcu: Force inlining of rcu_read_lock() Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 039/223] blkcg, writeback: dead memcgs shouldnt contribute to writeback ownership arbitration Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 040/223] xfrm: fix sa selector validation Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 041/223] perf evsel: Make perf_evsel__name() accept a NULL argument Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 042/223] vhost_net: disable zerocopy by default Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 043/223] ipoib: correcly show a VF hardware address Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 044/223] EDAC/sysfs: Fix memory leak when creating a csrow object Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 045/223] ipsec: select crypto ciphers for xfrm_algo Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 046/223] media: i2c: fix warning same module names Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 047/223] ntp: Limit TAI-UTC offset Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 048/223] timer_list: Guard procfs specific code Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 049/223] acpi/arm64: ignore 5.1 FADTs that are reported as 5.0 Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 050/223] media: coda: fix mpeg2 sequence number handling Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 051/223] media: coda: increment sequence offset for the last returned frame Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 052/223] mt7601u: do not schedule rx_tasklet when the device has been disconnected Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 053/223] x86/build: Add set -e to mkcapflags.sh to delete broken capflags.c Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 054/223] mt7601u: fix possible memory leak when the device is disconnected Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 055/223] ath10k: fix PCIE device wake up failed Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 056/223] perf tools: Increase MAX_NR_CPUS and MAX_CACHES Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 057/223] libata: dont request sense data on !ZAC ATA devices Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 058/223] clocksource/drivers/exynos_mct: Increase priority over ARM arch timer Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 059/223] rslib: Fix decoding of shortened codes Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 060/223] rslib: Fix handling of of caller provided syndrome Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 061/223] ixgbe: Check DDM existence in transceiver before access Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 062/223] crypto: asymmetric_keys - select CRYPTO_HASH where needed Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 063/223] EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 064/223] bcache: check c->gc_thread by IS_ERR_OR_NULL in cache_set_flush() Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 065/223] iwlwifi: mvm: Drop large non sta frames Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 066/223] net: usb: asix: init MAC address buffers Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 067/223] gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 068/223] Bluetooth: hci_bcsp: Fix memory leak in rx_skb Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 069/223] Bluetooth: 6lowpan: search for destination address in all peers Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 070/223] Bluetooth: Check state in l2cap_disconnect_rsp Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 071/223] Bluetooth: validate BLE connection interval updates Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 072/223] gtp: fix Illegal context switch in RCU read-side critical section Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 073/223] gtp: fix use-after-free in gtp_newlink() Greg Kroah-Hartman
2019-08-02  9:34 ` [PATCH 4.9 074/223] xen: let alloc_xenballooned_pages() fail if not enough memory free Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 075/223] scsi: NCR5380: Reduce goto statements in NCR5380_select() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 076/223] scsi: NCR5380: Always re-enable reselection interrupt Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 077/223] scsi: mac_scsi: Increase PIO/PDMA transfer length threshold Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 078/223] crypto: ghash - fix unaligned memory access in ghash_setkey() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 079/223] crypto: arm64/sha1-ce - correct digest for empty data in finup Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 080/223] crypto: arm64/sha2-ce " Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 081/223] crypto: chacha20poly1305 - fix atomic sleep when using async algorithm Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 082/223] crypto: crypto4xx - fix a potential double free in ppc4xx_trng_probe Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 083/223] Input: gtco - bounds check collection indent level Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 084/223] regulator: s2mps11: Fix buck7 and buck8 wrong voltages Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 085/223] arm64: tegra: Update Jetson TX1 GPU regulator timings Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 086/223] iwlwifi: pcie: dont service an interrupt that was masked Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 087/223] tracing/snapshot: Resize spare buffer if size changed Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 088/223] NFSv4: Handle the special Linux file open access mode Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 089/223] lib/scatterlist: Fix mapping iterator when sg->offset is greater than PAGE_SIZE Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 090/223] ALSA: seq: Break too long mutex context in the write loop Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 091/223] ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 092/223] media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 093/223] media: coda: Remove unbalanced and unneeded mutex unlock Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 094/223] KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 095/223] arm64: tegra: Fix AGIC register range Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 096/223] fs/proc/proc_sysctl.c: fix the default values of i_uid/i_gid on /proc/sys inodes Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 097/223] drm/nouveau/i2c: Enable i2c pads & busses during preinit Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 098/223] padata: use smp_mb in padata_reorder to avoid orphaned padata jobs Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 099/223] 9p/virtio: Add cleanup path in p9_virtio_init Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 100/223] PCI: Do not poll for PME if the device is in D3cold Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 101/223] Btrfs: add missing inode version, ctime and mtime updates when punching hole Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 102/223] libnvdimm/pfn: fix fsdax-mode namespace info-block zero-fields Greg Kroah-Hartman
2019-08-02  9:35 ` Greg Kroah-Hartman [this message]
2019-08-02  9:35 ` [PATCH 4.9 104/223] floppy: fix div-by-zero in setup_format_params Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 105/223] floppy: fix out-of-bounds read in next_valid_format Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 106/223] floppy: fix invalid pointer dereference in drive_name Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 107/223] floppy: fix out-of-bounds read in copy_buffer Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 108/223] coda: pass the host file in vma->vm_file on mmap Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 109/223] gpu: ipu-v3: ipu-ic: Fix saturation bit offset in TPMEM Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 110/223] crypto: ccp - Validate the the error value used to index error messages Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 111/223] PCI: hv: Delete the device earlier from hbus->children for hot-remove Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 112/223] PCI: hv: Fix a use-after-free bug in hv_eject_device_work() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 113/223] crypto: caam - limit output IV to CBC to work around CTR mode DMA issue Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 114/223] um: Allow building and running on older hosts Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 115/223] um: Fix FP register size for XSTATE/XSAVE Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 116/223] parisc: Ensure userspace privilege for ptraced processes in regset functions Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 117/223] parisc: Fix kernel panic due invalid values in IAOQ0 or IAOQ1 Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 118/223] powerpc/32s: fix suspend/resume when IBATs 4-7 are used Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 119/223] powerpc/watchpoint: Restore NV GPRs while returning from exception Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 120/223] eCryptfs: fix a couple type promotion bugs Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 121/223] intel_th: msu: Fix single mode with disabled IOMMU Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 122/223] Bluetooth: Add SMP workaround Microsoft Surface Precision Mouse bug Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 123/223] usb: Handle USB3 remote wakeup for LPM enabled devices correctly Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 124/223] dm bufio: fix deadlock with loop device Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 125/223] compiler.h, kasan: Avoid duplicating __read_once_size_nocheck() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 126/223] compiler.h: Add read_word_at_a_time() function Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 127/223] lib/strscpy: Shut up KASAN false-positives in strscpy() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 128/223] ext4: allow directory holes Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 129/223] bnx2x: Prevent load reordering in tx completion processing Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 130/223] bnx2x: Prevent ptp_task to be rescheduled indefinitely Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 131/223] caif-hsi: fix possible deadlock in cfhsi_exit_module() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 132/223] igmp: fix memory leak in igmpv3_del_delrec() Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 133/223] ipv4: dont set IPv6 only flags to IPv4 addresses Greg Kroah-Hartman
2019-08-02  9:35 ` [PATCH 4.9 134/223] net: bcmgenet: use promisc for unsupported filters Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 135/223] net: dsa: mv88e6xxx: wait after reset deactivation Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 136/223] net: neigh: fix multiple neigh timer scheduling Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 137/223] net: openvswitch: fix csum updates for MPLS actions Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 138/223] nfc: fix potential illegal memory access Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 139/223] rxrpc: Fix send on a connected, but unbound socket Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 140/223] sky2: Disable MSI on ASUS P6T Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 141/223] vrf: make sure skb->data contains ip header to make routing Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 142/223] macsec: fix use-after-free of skb during RX Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 143/223] macsec: fix checksumming after decryption Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 144/223] netrom: fix a memory leak in nr_rx_frame() Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 145/223] netrom: hold sock when setting skb->destructor Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 146/223] bonding: validate ip header before check IPPROTO_IGMP Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 147/223] tcp: Reset bytes_acked and bytes_received when disconnecting Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 148/223] net: bridge: mcast: fix stale nsrcs pointer in igmp3/mld2 report handling Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 149/223] net: bridge: mcast: fix stale ipv6 hdr pointer when handling v6 query Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 150/223] net: bridge: stp: dont cache eth dest pointer before skb pull Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 151/223] perf/x86/amd/uncore: Rename L2 to LLC Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 152/223] perf/x86/amd/uncore: Get correct number of cores sharing last level cache Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 153/223] perf/events/amd/uncore: Fix amd_uncore_llc ID to use pre-defined cpu_llc_id Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 154/223] NFSv4: Fix open create exclusive when the server reboots Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 155/223] nfsd: increase DRC cache limit Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 156/223] nfsd: give out fewer session slots as limit approaches Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 157/223] nfsd: fix performance-limiting session calculation Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 158/223] nfsd: Fix overflow causing non-working mounts on 1 TB machines Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 159/223] drm/panel: simple: Fix panel_simple_dsi_probe Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 160/223] usb: core: hub: Disable hub-initiated U1/U2 Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 161/223] tty: max310x: Fix invalid baudrate divisors calculator Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 162/223] pinctrl: rockchip: fix leaked of_node references Greg Kroah-Hartman
2019-08-02  9:36   ` Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 163/223] tty: serial: cpm_uart - fix init when SMC is relocated Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 164/223] drm/bridge: tc358767: read display_props in get_modes() Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 165/223] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 166/223] memstick: Fix error cleanup path of memstick_init Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 167/223] tty/serial: digicolor: Fix digicolor-usart already registered warning Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 168/223] tty: serial: msm_serial: avoid system lockup condition Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 169/223] serial: 8250: Fix TX interrupt handling condition Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 170/223] drm/virtio: Add memory barriers for capset cache Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 171/223] phy: renesas: rcar-gen2: Fix memory leak at error paths Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 172/223] drm/rockchip: Properly adjust to a true clock in adjusted_mode Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 173/223] tty: serial_core: Set port active bit in uart_port_activate Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 174/223] usb: gadget: Zero ffs_io_data Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 175/223] powerpc/pci/of: Fix OF flags parsing for 64bit BARs Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 176/223] PCI: sysfs: Ignore lockdep for remove attribute Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 177/223] kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 178/223] PCI: xilinx-nwl: Fix Multi MSI data programming Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 179/223] iio: iio-utils: Fix possible incorrect mask calculation Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 180/223] recordmcount: Fix spurious mcount entries on powerpc Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 181/223] mfd: core: Set fwnode for created devices Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 182/223] mfd: arizona: Fix undefined behavior Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 183/223] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 184/223] um: Silence lockdep complaint about mmap_sem Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 185/223] powerpc/4xx/uic: clear pending interrupt after irq type/pol change Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 186/223] RDMA/i40iw: Set queue pair state when being queried Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 187/223] serial: sh-sci: Terminate TX DMA during buffer flushing Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 188/223] serial: sh-sci: Fix TX DMA buffer flushing and workqueue races Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 189/223] kallsyms: exclude kasan local symbols on s390 Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 190/223] perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 191/223] RDMA/rxe: Fill in wc byte_len with IB_WC_RECV_RDMA_WITH_IMM Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 192/223] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 193/223] f2fs: avoid out-of-range memory access Greg Kroah-Hartman
2019-08-02  9:36 ` [PATCH 4.9 194/223] mailbox: handle failed named mailbox channel request Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 195/223] powerpc/eeh: Handle hugepages in ioremap space Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 196/223] sh: prevent warnings when using iounmap Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 197/223] mm/kmemleak.c: fix check for softirq context Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 198/223] 9p: pass the correct prototype to read_cache_page Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 199/223] mm/mmu_notifier: use hlist_add_head_rcu() Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 200/223] locking/lockdep: Fix lock used or unused stats error Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 201/223] locking/lockdep: Hide unused class variable Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 202/223] usb: wusbcore: fix unbalanced get/put cluster_id Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 203/223] usb: pci-quirks: Correct AMD PLL quirk detection Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 204/223] x86/sysfb_efi: Add quirks for some devices with swapped width and height Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 205/223] x86/speculation/mds: Apply more accurate check on hypervisor platform Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 206/223] hpet: Fix division by zero in hpet_time_div() Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 207/223] ALSA: line6: Fix wrong altsetting for LINE6_PODHD500_1 Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 208/223] ALSA: hda - Add a conexant codec entry to let mute led work Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 209/223] powerpc/tm: Fix oops on sigreturn on systems without TM Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 210/223] access: avoid the RCU grace period for the temporary subjective credentials Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 211/223] ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 212/223] tcp: reset sk_send_head in tcp_write_queue_purge Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 213/223] arm64: dts: marvell: Fix A37xx UART0 register size Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 214/223] i2c: qup: fixed releasing dma without flush operation completion Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 215/223] arm64: compat: Provide definition for COMPAT_SIGMINSTKSZ Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 216/223] ISDN: hfcsusb: checking idx of ep configuration Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 217/223] media: au0828: fix null dereference in error path Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 218/223] media: cpia2_usb: first wake up, then free in disconnect Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 219/223] media: radio-raremono: change devm_k*alloc to k*alloc Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 220/223] Bluetooth: hci_uart: check for missing tty operations Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 221/223] sched/fair: Dont free p->numa_faults with concurrent readers Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 222/223] drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl Greg Kroah-Hartman
2019-08-02  9:37 ` [PATCH 4.9 223/223] ceph: hold i_ceph_lock when removing caps for freeing inode Greg Kroah-Hartman
2019-08-02 14:19 ` [PATCH 4.9 000/223] 4.9.187-stable review Thierry Reding
2019-08-02 16:34 ` kernelci.org bot
2019-08-02 18:46 ` Naresh Kamboju
2019-08-02 23:19 ` shuah
2019-08-03 15:58 ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190802092245.891419443@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.