Re: [PATCH v4] tty: rocket: Remove the rp_ioctl

2019-04-17 Thread Jiri Slaby
On 17. 04. 19, 8:52, Jiri Slaby wrote: > So could you rework the patch to remove only the one? And in a separate > patch, introduce a printk_ratelimited warning to every "case *:" (i.e. Not printk_ratelimited, but "dev_warn_ratelimited(tty->dev" as we have a device. > no warning in the "default"

Re: [PATCH v4] tty: rocket: Remove the rp_ioctl

2019-04-17 Thread Jiri Slaby
On 17. 04. 19, 8:46, Greg Kroah-Hartman wrote: > On Wed, Apr 17, 2019 at 08:27:41AM +0200, Jiri Slaby wrote: >> On 16. 04. 19, 16:53, Fuqian Huang wrote: >>> --- a/drivers/tty/rocket.c >>> +++ b/drivers/tty/rocket.c >> ... >>> -/* IOCTL call handler into the driver */ >>> -static int

Re: [PATCH v4] tty: rocket: Remove the rp_ioctl

2019-04-17 Thread Greg Kroah-Hartman
On Wed, Apr 17, 2019 at 08:27:41AM +0200, Jiri Slaby wrote: > On 16. 04. 19, 16:53, Fuqian Huang wrote: > > --- a/drivers/tty/rocket.c > > +++ b/drivers/tty/rocket.c > ... > > -/* IOCTL call handler into the driver */ > > -static int rp_ioctl(struct tty_struct *tty, > > - unsigned

Re: [PATCH v4] tty: rocket: Remove the rp_ioctl

2019-04-17 Thread Jiri Slaby
On 16. 04. 19, 16:53, Fuqian Huang wrote: > --- a/drivers/tty/rocket.c > +++ b/drivers/tty/rocket.c ... > -/* IOCTL call handler into the driver */ > -static int rp_ioctl(struct tty_struct *tty, > - unsigned int cmd, unsigned long arg) > -{ > - struct r_port *info =

[PATCH v4] tty: rocket: Remove the rp_ioctl

2019-04-16 Thread Fuqian Huang
If the cmd is RCPK_GET_STRUCT, copy_to_user will copy info to user space. As info->port.ops is the address of a constant object rocket_port_ops (assigned in init_r_port), a kernel address leakage happens. The rp_ioctl seems will be not used by anybody. Delete the rp_ioctl completely.