Received: from list by lists.gnu.org with archive (Exim 4.71) id 1g9sJE-0003ym-A2 for mharc-grub-devel@gnu.org; Tue, 09 Oct 2018 09:44:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60081) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9sJB-0003wK-Au for grub-devel@gnu.org; Tue, 09 Oct 2018 09:44:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9sIx-0003cv-2r for grub-devel@gnu.org; Tue, 09 Oct 2018 09:44:17 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:36396) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9sIW-0002n2-Qn for grub-devel@gnu.org; Tue, 09 Oct 2018 09:44:05 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w99Dfgee134559; Tue, 9 Oct 2018 13:43:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=BDSUq1wET713VtPlLNFhFamttqGIwdyg8ogmOSWA8gw=; b=a490zv5KCsJb7PDQZfbe+NB9kBZIUZ/hYrOM6J+3CfojMNdTpdHFSfRj0UQ1296XWNcV rxON/5IND8onbwz4875GBJ2kPlZujawms2Bwmg87kJXV0bSn436nTvQacJkobEFnY0vr bfBCVg6Fim4fZc19EZ9eRcQukVfRGrDBRftKeOjW6j5zXk2e8CMjDKZM+VLFCUXX0w9+ 4PCggclZhM2IlHraqPdqn3SUUW9UEfuxDWKlO9odtWxsX+VEjY6Udb13/wl6w0EiG1v6 ycqh6+y4j1Wx9xq4PkmAqIDaWnkb0bLAvCAyrd2/DUgFDGhgRMGnULeip5rZnaeE7yib Xw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2mxmftndyb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 09 Oct 2018 13:43:37 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w99Dhb04001376 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Oct 2018 13:43:37 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w99DhZVw026398; Tue, 9 Oct 2018 13:43:35 GMT Received: from olila.i.net-space.pl (/10.175.174.86) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Oct 2018 13:43:34 +0000 Date: Tue, 9 Oct 2018 15:43:29 +0200 From: Daniel Kiper To: Ross Philipson Cc: grub-devel@gnu.org, dpsmith.dev@gmail.com, eric.snowberg@oracle.com, javierm@redhat.com, jonmccune@google.com, kanth.ghatraju@oracle.com, keng-yu.lin@hpe.com, konrad.wilk@oracle.com, leif.lindholm@linaro.org, mjg59@srcf.ucam.org, phcoder@gmail.com, philip.b.tricca@intel.com Subject: Re: [PATCH v3 1/8] verifiers: File type for fine-grained signature-verification controlling Message-ID: <20181009134329.GC4472@olila.i.net-space.pl> References: <1538559415-6233-1-git-send-email-daniel.kiper@oracle.com> <1538559415-6233-2-git-send-email-daniel.kiper@oracle.com> <3f5e8a7f-7574-34f8-08aa-4410603d903f@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3f5e8a7f-7574-34f8-08aa-4410603d903f@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9040 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810090135 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 13:44:22 -0000 On Wed, Oct 03, 2018 at 01:33:26PM -0400, Ross Philipson wrote: > On 10/03/2018 05:36 AM, Daniel Kiper wrote: [...] > > grub_file_t > > -grub_file_open (const char *name) > > +grub_file_open (const char *name, enum grub_file_type type) > > { > > grub_device_t device = 0; > > grub_file_t file = 0, last_file = 0; > > @@ -114,18 +113,20 @@ grub_file_open (const char *name) > > file->name = grub_strdup (name); > > grub_errno = GRUB_ERR_NONE; > > > > - for (filter = 0; file && filter < ARRAY_SIZE (grub_file_filters_enabled); > > + for (filter = 0; file && filter < ARRAY_SIZE (grub_file_filters); > > filter++) > > - if (grub_file_filters_enabled[filter]) > > + if (grub_file_filters[filter]) > > { > > last_file = file; > > - file = grub_file_filters_enabled[filter] (file, name); > > + file = grub_file_filters[filter] (file, type); > > + if (file && file != last_file) > > + { > > + file->name = grub_strdup (name); > > + grub_errno = GRUB_ERR_NONE; > > + } > > This doesn't seem like it is related to adding file type information. > Was the setting of the name just something that was already missing/broken? Looks strange... I will take closer look at Vladimir patches and try to remove the clutter... Daniel