Nathan Lynch via B4 Relay <devnull+nathanl.linux.ibm....@kernel.org> writes: > +static long papr_sysparm_ioctl(struct file *filp, unsigned int ioctl, > unsigned long arg) > +{ > + void __user *argp = (__force void __user *)arg; > + long ret; > + > + switch (ioctl) { > + case PAPR_SYSPARM_IOC_GET: > + ret = papr_sysparm_ioctl_get(argp); > + break; > + case PAPR_SYSPARM_IOC_SET: > + ret = papr_sysparm_ioctl_set(argp); > + break;
Some offline discussion raised the point that updating system parameters should be allowed only when the device is opened for writing. I've made this change and added a testcase for v6, coming shortly.