Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1656739 > unrolled thread
| Started by | Adam Borowski <kilobyte@angband.pl> |
|---|---|
| First post | 2017-06-03 09:40 +0200 |
| Last post | 2017-06-05 08:50 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/5] vt: get rid of worst cases of __put_user/__get_user Adam Borowski <kilobyte@angband.pl> - 2017-06-03 09:40 +0200
Re: [PATCH 0/5] vt: get rid of worst cases of __put_user/__get_user Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-03 17:50 +0200
Re: [PATCH 0/5] vt: get rid of worst cases of __put_user/__get_user Al Viro <viro@ZenIV.linux.org.uk> - 2017-06-05 08:20 +0200
Re: [PATCH 0/5] vt: get rid of worst cases of __put_user/__get_user Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-05 08:50 +0200
| From | Adam Borowski <kilobyte@angband.pl> |
|---|---|
| Date | 2017-06-03 09:40 +0200 |
| Subject | [PATCH 0/5] vt: get rid of worst cases of __put_user/__get_user |
| Message-ID | <tObPc-45V-5@gated-at.bofh.it> |
Hi!
In a recent discussion, Linus and Al Viro said quite a bit of expletives
about __put_user() and __get_user(), that it's a bad interface that's
almost always the wrong thing to use:
https://marc.info/?l=linux-kernel&m=149463725626316&w=2
https://marc.info/?l=linux-kernel&m=149465866929092&w=2
Here's a few patches applying the lessons from that discussion to vt.
None of the uses is performance-critical, but at least we get a nice bit
of code simplification. And, it's a start of manual review + conversion
that Al Viro wants.
Adam Borowski (5):
vt: use copy_from/to_user instead of __get/put_user for scrnmap ioctls
vt: fix unchecked __put_user() in tioclinux ioctls
vt: use copy_to_user instead of __put_user in GIO_UNIMAP ioctl
vt: use memdup_user in PIO_UNIMAP ioctl
vt: drop access_ok() calls in unimap ioctls
drivers/tty/vt/consolemap.c | 56 ++++++++++++++++----------------------------------------
drivers/tty/vt/vt.c | 6 +++---
drivers/tty/vt/vt_ioctl.c | 8 --------
3 files changed, 19 insertions(+), 51 deletions(-)
--
⢀⣴⠾⠻⢶⣦⠀ A tit a day keeps the vet away.
⣾⠁⢰⠒⠀⣿⡁
⢿⡄⠘⠷⠚⠋⠀ (Rejoice as my small-animal-murder-machine got unbroken after
⠈⠳⣄⠀⠀⠀⠀ nearly two years of no catch!)
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-06-03 17:50 +0200 |
| Message-ID | <tOjtn-mU-7@gated-at.bofh.it> |
| In reply to | #1656739 |
On Sat, Jun 03, 2017 at 09:32:55AM +0200, Adam Borowski wrote: > Hi! > In a recent discussion, Linus and Al Viro said quite a bit of expletives > about __put_user() and __get_user(), that it's a bad interface that's > almost always the wrong thing to use: > https://marc.info/?l=linux-kernel&m=149463725626316&w=2 > https://marc.info/?l=linux-kernel&m=149465866929092&w=2 > > Here's a few patches applying the lessons from that discussion to vt. > None of the uses is performance-critical, but at least we get a nice bit > of code simplification. And, it's a start of manual review + conversion > that Al Viro wants. Ah, nice work, at first glance these all look good to me. I'll queue them up on Monday. greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Date | 2017-06-05 08:20 +0200 |
| Message-ID | <tOTwS-7Hu-15@gated-at.bofh.it> |
| In reply to | #1656858 |
On Sun, Jun 04, 2017 at 12:42:52AM +0900, Greg Kroah-Hartman wrote: > On Sat, Jun 03, 2017 at 09:32:55AM +0200, Adam Borowski wrote: > > Hi! > > In a recent discussion, Linus and Al Viro said quite a bit of expletives > > about __put_user() and __get_user(), that it's a bad interface that's > > almost always the wrong thing to use: > > https://marc.info/?l=linux-kernel&m=149463725626316&w=2 > > https://marc.info/?l=linux-kernel&m=149465866929092&w=2 > > > > Here's a few patches applying the lessons from that discussion to vt. > > None of the uses is performance-critical, but at least we get a nice bit > > of code simplification. And, it's a start of manual review + conversion > > that Al Viro wants. > > Ah, nice work, at first glance these all look good to me. I'll queue > them up on Monday. Could you put that into a separate no-rebase branch? Or I could do that in vfs.git, for that matter...
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-06-05 08:50 +0200 |
| Message-ID | <tOTZT-7QM-3@gated-at.bofh.it> |
| In reply to | #1657297 |
On Mon, Jun 05, 2017 at 07:13:50AM +0100, Al Viro wrote: > On Sun, Jun 04, 2017 at 12:42:52AM +0900, Greg Kroah-Hartman wrote: > > On Sat, Jun 03, 2017 at 09:32:55AM +0200, Adam Borowski wrote: > > > Hi! > > > In a recent discussion, Linus and Al Viro said quite a bit of expletives > > > about __put_user() and __get_user(), that it's a bad interface that's > > > almost always the wrong thing to use: > > > https://marc.info/?l=linux-kernel&m=149463725626316&w=2 > > > https://marc.info/?l=linux-kernel&m=149465866929092&w=2 > > > > > > Here's a few patches applying the lessons from that discussion to vt. > > > None of the uses is performance-critical, but at least we get a nice bit > > > of code simplification. And, it's a start of manual review + conversion > > > that Al Viro wants. > > > > Ah, nice work, at first glance these all look good to me. I'll queue > > them up on Monday. > > Could you put that into a separate no-rebase branch? Or I could do that > in vfs.git, for that matter... If you just want to take these in vfs.git feel free to, I don't mind at all: Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> that's probably the easiest. thanks, greg k-h
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web