From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752922AbdBIOna convert rfc822-to-8bit (ORCPT ); Thu, 9 Feb 2017 09:43:30 -0500 Received: from prv-mh.provo.novell.com ([137.65.248.74]:36598 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752606AbdBIOn3 (ORCPT ); Thu, 9 Feb 2017 09:43:29 -0500 Message-Id: <589C8E1D0200007800138448@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.1 Date: Thu, 09 Feb 2017 07:43:25 -0700 From: "Jan Beulich" To: "Paul Durrant" Cc: , "Boris Ostrovsky" , "Juergen Gross" , Subject: Re: [Xen-devel] [PATCH 3/3] xen/privcmd: add IOCTL_PRIVCMD_RESTRICT References: <1486649866-4869-1-git-send-email-paul.durrant@citrix.com> <1486649866-4869-4-git-send-email-paul.durrant@citrix.com> In-Reply-To: <1486649866-4869-4-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 09.02.17 at 15:17, wrote: > @@ -666,6 +680,20 @@ static long privcmd_ioctl_dm_op(void __user *udata) > return rc; > } > > +static long privcmd_ioctl_restrict(struct file *file, void __user *udata) > +{ > + struct privcmd_data *data = file->private_data; > + domid_t dom; > + > + if (copy_from_user(&dom, udata, sizeof(dom))) > + return -EFAULT; > + > + /* Set restriction to the specified domain */ > + data->domid = dom; > + > + return 0; > +} Is it really intended for the caller to be able to undo this, by passing in DOMID_INVALID? Jan