Received: by 10.223.176.46 with SMTP id f43csp1144333wra; Fri, 26 Jan 2018 12:38:03 -0800 (PST) X-Google-Smtp-Source: AH8x227X/icGN1MXZR1UJwEdVIlDbhOnat6XeLqg9ZVCGvyjhEJ6R5OdyQRwb/ptCXaaWdI/C5vY X-Received: by 2002:a17:902:4a0c:: with SMTP id w12-v6mr6368329pld.17.1516999083705; Fri, 26 Jan 2018 12:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516999083; cv=none; d=google.com; s=arc-20160816; b=d4PTnAqUGbZtBqh3OrO3efTKAM5WJ6tesouXYOlymgRmLY3VJvm3YIKm3tGq71aAQf FSaC3Yk/W4x7nE1mKC85ecPjU1ciNMJ4s9hQkFAQDjADjyQ23VDpgiqQnVID+/SpJrCe jbACiAWbzlAY12xeauHXMG273O1fkNMVtmK4yobpZ8XmQe92dUD0AlfmUy0bB7L38qjf VbZPmr9oB5YpNErzw02ulAvWvdc0Ox8X89XuFFWg1+uX0mo/eeEjPnbbSLW47jNdXllc mldOBAsqwiR5H/pMEcE35jH2W/A5p9RrKlpJZ082hMhRUtGIktlMwJc6Y7D1ut64dIGW 2J5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=RW9DEd8maK/IVkamRn2xjNuNNm5y1S6YxhehcsNYpls=; b=kPcxSATHOOrE+ne95MS5IqObavmYf0kcwEUfWYpfZZ2LwBb6jNXKfi8Qts8Fb9kFWm h95H9biUlRINn1C01mXvgc75GONMxQmGyKu5BuXsBWVSh4/JIhmwfGSZQZdOu0BOdH/V DeWtAQL3z8ycfKxpUp4DPmLtffVL8C9tHyH8uPALdEJm0M7dFW567Wm69B6Wa9rdOqDR LwReDgvXq9y1n580Wjdm+FmpvNxGunw3z3lj8aZNe7SccVFWqmm9lMzszS51UAga1cjo WUr0lH0FH0jgX8W2JFCusRliwUMwZvthYFb6Y/qbbUxZq84fXnB/zKimPiZ1V6dDYLWV 5mGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=YSbariS8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12si3430646pgf.84.2018.01.26.12.37.49; Fri, 26 Jan 2018 12:38:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=YSbariS8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751724AbeAZUhW (ORCPT + 99 others); Fri, 26 Jan 2018 15:37:22 -0500 Received: from rcdn-iport-9.cisco.com ([173.37.86.80]:62866 "EHLO rcdn-iport-9.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbeAZUhU (ORCPT ); Fri, 26 Jan 2018 15:37:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=894; q=dns/txt; s=iport; t=1516999040; x=1518208640; h=mime-version:content-transfer-encoding:to:from: in-reply-to:cc:references:message-id:subject:date; bh=f9aXahrgJ6W4s5lYFKzolVmaLj/rcUPEJlNVEhT2XTY=; b=YSbariS8KmOkOtib9vdVobbBEYAODDSg+N6OIgLL4TKux5OJaq568YbN EzTW5pdeWd+ZyTGuLBXPe+7dP8y4Ot7/N8Dlzicz+hiLW2Jylk8rES3MJ pAQTFD5YRiGVloHKT0R4EFqLet7e//KDzCXUg5+HqO66yEfNU0aSwI5A6 Y=; X-IronPort-AV: E=Sophos;i="5.46,418,1511827200"; d="scan'208";a="342075795" Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jan 2018 20:37:19 +0000 Received: from localhost ([10.156.154.35]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id w0QKbJQn003284; Fri, 26 Jan 2018 20:37:19 GMT Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: "H. Peter Anvin" , Al Viro , Arnd Bergmann , James McMechan , Jonathan Corbet , Mimi Zohar , Rob Landley From: Taras Kondratiuk In-Reply-To: Cc: initramfs@vger.kernel.org, Victor Kamensky , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, xe-linux-external@cisco.com References: <1516850875-25066-1-git-send-email-takondra@cisco.com> <1516850875-25066-12-git-send-email-takondra@cisco.com> Message-ID: <151699903485.21956.15795523878472133751@takondra-t460s> User-Agent: alot/0.6 Subject: Re: [PATCH v2 11/15] gen_init_cpio: add newcx format Date: Fri, 26 Jan 2018 12:37:14 -0800 X-Auto-Response-Suppress: DR, OOF, AutoReply Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Rob Landley (2018-01-25 18:40:25) > On 01/24/2018 09:27 PM, Taras Kondratiuk wrote: > > diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c > > index 7a2a6d85345d..78a47a5bdcb1 100644 > > --- a/usr/gen_init_cpio.c > > +++ b/usr/gen_init_cpio.c > > @@ -10,6 +10,7 @@ > > #include > > #include > > #include > > +#include > = > You're adding an assert? Really? > = > > fputs(s, stdout); > > - offset +=3D 110; > > + assert((offset & 3) =3D=3D 0); > > + offset +=3D cpio_hdr_size; > = > Why? Current code assumes that previous file entry in cpio is padded to 4 byte boundary. The assert just captures this assumption. It should be true unless there is a bug in the code and some padding is missing. Actually this assert should be a part of the next patch (#12) that modifies padding code.