From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/3] xen/flask: change bool_maxstr to PAGE_SIZE Date: Wed, 27 May 2015 09:13:51 +0100 Message-ID: <1432714431.14664.154.camel@citrix.com> References: <1432664009-10532-1-git-send-email-dgdegra@tycho.nsa.gov> <1432664009-10532-2-git-send-email-dgdegra@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YxWTR-000293-7p for xen-devel@lists.xenproject.org; Wed, 27 May 2015 08:14:01 +0000 In-Reply-To: <1432664009-10532-2-git-send-email-dgdegra@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel De Graaf Cc: xen-devel@lists.xenproject.org, wei.liu2@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2015-05-26 at 14:13 -0400, Daniel De Graaf wrote: > When FLASK_{GET,SET}BOOL is called with a named boolean, the call to > flask_security_resolve_bool is made prior to bool_maxstr being populated > by flask_security_make_bools. This results in the maximum string length > being specified as zero, which is not useful. While it would be > possible to initialize bool_maxstr correctly prior to its use, it is > simpler to use a fixed maximum of PAGE_SIZE as is done for the other > calls to safe_copy_string_from_guest. > > Signed-off-by: Daniel De Graaf Acked-by: Ian Campbell