From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6B4DA21A134AE for ; Wed, 10 May 2017 11:09:45 -0700 (PDT) Date: Wed, 10 May 2017 20:09:42 +0200 From: Christoph Hellwig Subject: Re: [PATCH 14/16] block: remove blk_part_pack_uuid Message-ID: <20170510180942.GA5361@lst.de> References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-15-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170510180214.16852-15-hch@lst.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Andy Shevchenko , Amir Goldstein , linux-fsdevel@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvdimm@lists.01.org, Shaohua Li , linux-kernel@vger.kernel.org, David Howells , Mimi Zohar , Steven Whitehouse List-ID: On Wed, May 10, 2017 at 08:02:12PM +0200, Christoph Hellwig wrote: > This helper was only used by IMA of all things, which would get spurious > errors if CONFIG_BLOCK is disabled. Just opencode the call there. > > Signed-off-by: Christoph Hellwig > [andy: correctly handle error returns from uuid_to_bin] > Signed-off-by: Andy Shevchenko > --- > security/integrity/ima/ima_policy.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c > index 4d1178610145..49fbc3e8f012 100644 > --- a/security/integrity/ima/ima_policy.c > +++ b/security/integrity/ima/ima_policy.c > @@ -717,8 +717,9 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) > break; > } > > - uuid_to_bin(args[0].from, (uuid_t *)entry->fsuuid); > - entry->flags |= IMA_FSUUID; > + result = uuid_to_bin(args[0].from, (uuid_t *)&entry->fsuuid); > + if (!result) > + entry->flags |= IMA_FSUUID; This should have been folded into the previous patch.. _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 14/16] block: remove blk_part_pack_uuid Date: Wed, 10 May 2017 20:09:42 +0200 Message-ID: <20170510180942.GA5361@lst.de> References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-15-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170510180214.16852-15-hch-jcswGhMUV9g@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Andy Shevchenko , Amir Goldstein , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, Shaohua Li , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, David Howells , Mimi Zohar , Steven Whitehouse List-Id: linux-raid.ids On Wed, May 10, 2017 at 08:02:12PM +0200, Christoph Hellwig wrote: > This helper was only used by IMA of all things, which would get spurious > errors if CONFIG_BLOCK is disabled. Just opencode the call there. > > Signed-off-by: Christoph Hellwig > [andy: correctly handle error returns from uuid_to_bin] > Signed-off-by: Andy Shevchenko > --- > security/integrity/ima/ima_policy.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c > index 4d1178610145..49fbc3e8f012 100644 > --- a/security/integrity/ima/ima_policy.c > +++ b/security/integrity/ima/ima_policy.c > @@ -717,8 +717,9 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) > break; > } > > - uuid_to_bin(args[0].from, (uuid_t *)entry->fsuuid); > - entry->flags |= IMA_FSUUID; > + result = uuid_to_bin(args[0].from, (uuid_t *)&entry->fsuuid); > + if (!result) > + entry->flags |= IMA_FSUUID; This should have been folded into the previous patch.. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754123AbdEJSJq (ORCPT ); Wed, 10 May 2017 14:09:46 -0400 Received: from verein.lst.de ([213.95.11.211]:51213 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbdEJSJo (ORCPT ); Wed, 10 May 2017 14:09:44 -0400 Date: Wed, 10 May 2017 20:09:42 +0200 From: Christoph Hellwig To: Andy Shevchenko , Amir Goldstein , linux-fsdevel@vger.kernel.org Cc: Shaohua Li , Dan Williams , David Howells , Steven Whitehouse , Mimi Zohar , linux-xfs@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvdimm@ml01.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/16] block: remove blk_part_pack_uuid Message-ID: <20170510180942.GA5361@lst.de> References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-15-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170510180214.16852-15-hch@lst.de> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 10, 2017 at 08:02:12PM +0200, Christoph Hellwig wrote: > This helper was only used by IMA of all things, which would get spurious > errors if CONFIG_BLOCK is disabled. Just opencode the call there. > > Signed-off-by: Christoph Hellwig > [andy: correctly handle error returns from uuid_to_bin] > Signed-off-by: Andy Shevchenko > --- > security/integrity/ima/ima_policy.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c > index 4d1178610145..49fbc3e8f012 100644 > --- a/security/integrity/ima/ima_policy.c > +++ b/security/integrity/ima/ima_policy.c > @@ -717,8 +717,9 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) > break; > } > > - uuid_to_bin(args[0].from, (uuid_t *)entry->fsuuid); > - entry->flags |= IMA_FSUUID; > + result = uuid_to_bin(args[0].from, (uuid_t *)&entry->fsuuid); > + if (!result) > + entry->flags |= IMA_FSUUID; This should have been folded into the previous patch.. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 10 May 2017 20:09:42 +0200 From: Christoph Hellwig To: Andy Shevchenko , Amir Goldstein , linux-fsdevel@vger.kernel.org Cc: Shaohua Li , Dan Williams , David Howells , Steven Whitehouse , Mimi Zohar , linux-xfs@vger.kernel.org, linux-raid@vger.kernel.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/16] block: remove blk_part_pack_uuid Message-ID: <20170510180942.GA5361@lst.de> References: <20170510180214.16852-1-hch@lst.de> <20170510180214.16852-15-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170510180214.16852-15-hch@lst.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: On Wed, May 10, 2017 at 08:02:12PM +0200, Christoph Hellwig wrote: > This helper was only used by IMA of all things, which would get spurious > errors if CONFIG_BLOCK is disabled. Just opencode the call there. > > Signed-off-by: Christoph Hellwig > [andy: correctly handle error returns from uuid_to_bin] > Signed-off-by: Andy Shevchenko > --- > security/integrity/ima/ima_policy.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c > index 4d1178610145..49fbc3e8f012 100644 > --- a/security/integrity/ima/ima_policy.c > +++ b/security/integrity/ima/ima_policy.c > @@ -717,8 +717,9 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) > break; > } > > - uuid_to_bin(args[0].from, (uuid_t *)entry->fsuuid); > - entry->flags |= IMA_FSUUID; > + result = uuid_to_bin(args[0].from, (uuid_t *)&entry->fsuuid); > + if (!result) > + entry->flags |= IMA_FSUUID; This should have been folded into the previous patch..