Re: [PATCH 3/5] vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl

2017-06-05 Thread Al Viro
On Mon, Jun 05, 2017 at 05:34:16PM +0100, Alan Cox wrote: > > @@ -775,13 +775,11 @@ int con_get_unimap(struct vc_data *vc, ushort ct, > > ushort __user *uct, struct uni > > } > > } > > console_unlock(); > > - for (i = min(ect, ct), plist = unilist; i; i--, list++, plist++) {

Re: [PATCH 3/5] vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl

2017-06-05 Thread Al Viro
On Mon, Jun 05, 2017 at 05:34:16PM +0100, Alan Cox wrote: > > @@ -775,13 +775,11 @@ int con_get_unimap(struct vc_data *vc, ushort ct, > > ushort __user *uct, struct uni > > } > > } > > console_unlock(); > > - for (i = min(ect, ct), plist = unilist; i; i--, list++, plist++) {

Re: [PATCH 3/5] vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl

2017-06-05 Thread Alan Cox
> @@ -775,13 +775,11 @@ int con_get_unimap(struct vc_data *vc, ushort ct, > ushort __user *uct, struct uni > } > } > console_unlock(); > - for (i = min(ect, ct), plist = unilist; i; i--, list++, plist++) { > - __put_user(plist->unicode, >unicode); > -

Re: [PATCH 3/5] vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl

2017-06-05 Thread Alan Cox
> @@ -775,13 +775,11 @@ int con_get_unimap(struct vc_data *vc, ushort ct, > ushort __user *uct, struct uni > } > } > console_unlock(); > - for (i = min(ect, ct), plist = unilist; i; i--, list++, plist++) { > - __put_user(plist->unicode, >unicode); > -

[PATCH 3/5] vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl

2017-06-03 Thread Adam Borowski
A nice big linear transfer, no need to flip stac/PAN/etc every half-entry. Also, yay __put_user() after checking only read. Signed-off-by: Adam Borowski --- drivers/tty/vt/consolemap.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git

[PATCH 3/5] vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl

2017-06-03 Thread Adam Borowski
A nice big linear transfer, no need to flip stac/PAN/etc every half-entry. Also, yay __put_user() after checking only read. Signed-off-by: Adam Borowski --- drivers/tty/vt/consolemap.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/tty/vt/consolemap.c