From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3AF33F164E for ; Wed, 1 Apr 2026 12:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775047645; cv=none; b=O1AsyTSnoAdrF+hRD1gAqHR2ZqNKBGlqJSey1dsEtMMSGO7s9DWmD8TLAsuqsUvabrH18tfjuY8aOV6g9siYELxcWzUb34JgNNnqunFcy5/0f+OzDj3idv8q6joaN/kckETgRVHLMrdPCq1B++20OL4AzgdKaPAzsVECFUIY0ko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775047645; c=relaxed/simple; bh=GxJNV1xPzaUW2EbQXJsL8zuVUtqru3tnwUUTmQhDhV4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pn2Bjgx6rWxVBLpPixLMCVG2sW94CtqCW86AgS2D2aRJk+pSnUu9B5M3Ex334YHHH3LuXZUZxIoTz1tuKNTJ+lhgVfVGB8GR1yvSQncmzRgE4wNgRrZofPgUZU2hzVe6vhkCLh3RCRwQh7LFIa7KBsPqzvmD2MDIRQdIb6k8RV8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=hBqG1AWf; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="hBqG1AWf" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-488895ad947so1767295e9.3 for ; Wed, 01 Apr 2026 05:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1775047642; x=1775652442; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CmkE/mRjtY453rWaP2ZVb9e+iB/11UzwVnbiatYRX+w=; b=hBqG1AWfWu1ExZp5JezUn0oTRxqjMAqiO0JHSvMhE6u8imLA0RCcOel7vV2UPDaZKY jH3sanCK551nx9hKSkjz8TCQKfF0xnw9ps7AQNL0QqwOz5w+4qW3HAuqXvwkSW1i29bE l7oz19OrBOjRu+GJHLXBuZ/TYHJcI/fDRNDZuFnIKDLGMjQsThdIwKh34sb/afxb0nzw uGaaea8+r697v3xP2jfZGaY9Qop7eOT4JjOkTkpx+mwk3EUmMkEo+Vx1c5ciEzdEr+Wl y3CUbcL13VNETK/80xFt8g2rwb6Teu1vdxDFSaieDjAP56lPogA9rElKqPIezQPA/C7L /+4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775047642; x=1775652442; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CmkE/mRjtY453rWaP2ZVb9e+iB/11UzwVnbiatYRX+w=; b=emgUKsappUIwwcj8SSjMacJLJ8mZCWvBQ1vpGsHYLLMybw26qlYVSgnKbwrYfiQHkH wvnP04XFxDMsHdFsJeK8qrKFNKZ4jVpWL8+LI77FS6Mc40ZAMNdIUeOt+DxXYl5MbcW3 /KIJ8LQlynD8YlUKoHn5T8Y/5EEq4zVxL+FKXw8QOZ6XLRUtemTZ3O3TUCV8FyDaZI8s TUflvradLU6YIR87EqLEf50rGd8OjrPVQoDPybguI7PB2w/rTLrOKKZdssEzLdr3C3Fw d6asBO8QSG3KRwZJwOMujzsnrkp7/fpXv4KZsAQk3B3MkZY1kKEGD2aeEX4WHgrxTOBt HfDw== X-Forwarded-Encrypted: i=1; AJvYcCXkBiIu5xZwN5/DvFcovtfSUT+VPGyCkot9iK8rgWATOoGlg7qW2+7w/7uuXNSCUG1W4ms0o12adHxLEUQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzLnozta6i3Nhnho3s7hXUqmKqypbADGvjAGVuXkfcl3L2P7XB6 ZqNsVH2wVuPZb9E+ETwtlEqYv64A4uzRE2Q1ACqBTEbfnVsgmuzXxr/srYjxzJ4Pd8VGNLLZ0ty r/Hd6frM= X-Gm-Gg: ATEYQzznD/Rgqyb2nRPP9f05/33iKnzAl2cYDdPUwBmPykvmUAyNa9SmfohGQD5cVjK xPC2Eo/ThdpBJ5d9aj0j0oVM+A7LQsUVrEZ1LqQPJQwU5K+i9TkfGMZD7i6ZOdodYu2kkWDqG0Q /DWNi+7KdDrt1U9GY66cCqun8drpTrnOnnOM2iRyy4urhF7VxlXfM/cOiVtbJliMbBvwPXLBcRN IcGgN/cxcZgO13Sy/EaVLfELWONUrpjZr7RJqCW+Wtou+6h8OnKh72CBJkMrptyto8Jb3xvD1iH sSkLtCsKxpippSizubiaH6NVlr+c0n10Pz1NMk24bJSEnHG8lSwq/HSFFsj+8R8tjM+M65P9Zzw FxhpgUNHJgewpUzBXBqAAgUfqRI5g3nadwi1bx7+1iPI5jRmwNkOf3nWqIf2lAMVpmVpzxquV9Z +C3nafph0f89tGTHsLLURgxyUpmg== X-Received: by 2002:a05:600c:310d:b0:487:18c:7acf with SMTP id 5b1f17b1804b1-48883599311mr56100045e9.25.1775047642136; Wed, 01 Apr 2026 05:47:22 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4887c8a546esm62124775e9.5.2026.04.01.05.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2026 05:47:21 -0700 (PDT) Date: Wed, 1 Apr 2026 14:47:19 +0200 From: Petr Mladek To: David Disseldorp Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Al Viro , Christian Brauner , Jan Kara , Steven Rostedt , Rasmus Villemoes , Sergey Senozhatsky , Andrew Morton Subject: Re: [PATCH v5 2/6] initramfs_test: test header fields with 0x hex prefix Message-ID: References: <20260331070519.5974-1-ddiss@suse.de> <20260331070519.5974-3-ddiss@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260331070519.5974-3-ddiss@suse.de> On Tue 2026-03-31 17:57:32, David Disseldorp wrote: > cpio header fields are 8-byte hex strings, but one "interesting" > side-effect of our historic simple_str[n]toul() use means that a "0x" > (or "0X") prefixed header field will be successfully processed when > coupled alongside a 6-byte hex remainder string. > > "0x" prefix support is contrary to the initramfs specification at > Documentation/driver-api/early-userspace/buffer-format.rst which states: > > The structure of the cpio_header is as follows (all fields contain > hexadecimal ASCII numbers fully padded with '0' on the left to the > full width of the field, for example, the integer 4780 is represented > by the ASCII string "000012ac"): > > Test for this corner case by injecting "0x" prefixes into the uid, gid > and namesize cpio header fields. Confirm that init_stat() returns > matching uid and gid values. > > This test can be modified in future to expect unpack_to_rootfs() failure > when header validation is changed to properly follow the specification. > > Add some missing struct kstat initializations to account for possible > init_stat() failures. > > Signed-off-by: David Disseldorp Reviewed-by: Petr Mladek Best Regards, Petr