Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3003780pxk; Mon, 21 Sep 2020 02:48:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxD/5WFTxwfyzHusSTbWljQ0OiM2i//UD6mXK2Ntu3if+ISEOBuDU7heCKqW0onXMY0qD7f X-Received: by 2002:aa7:da89:: with SMTP id q9mr50409726eds.111.1600681682175; Mon, 21 Sep 2020 02:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600681682; cv=none; d=google.com; s=arc-20160816; b=CKR0xN93g9hOnaNHbF8YpxEb0Cqm39vSwCY3Bn8D9DPy0UmGGHWPWz6aHvvY8zOrOC fRcB7ve+2QT7GZe6jDVFDFK18vQIRDw2Ef2bYGKO0p+Aci9jKt0EE537KsoDLnjEYXEV wC2ZRjRJDmcCGSF+OeW7helC2IVBMfc329IIoDocq4n+cPTPu8qquHf9+fplvlRzx8AJ FB/JWTql71Xz4KT1mfx7SVv9TogaPEwmC14Yd9FeavyJhvsd8ACRt7Zsjtny1YWsIu9n 39r1ANh5EKIclN/rn0hP2y5WWswhgvOj7FD4yWUxq6l1x8WWOpGv6eH6v+uDf104yNwb As0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=ek7u0jjmxxJK/37q0Vf20ntN8TXurJOMqAfuyUeuizE=; b=UMvwk3QZa5e7GwJlp7HWfnt6/lhnN2gI4UWabVjCdgb2Ec1KquyDx7sGxAw6muvOSX LXm81ajl7dXP6OfKirfMSwWiGvct0m/QjpHBHPqkAlHrFlu/Vj+xoYlKoL7CIYjiSyEd kijunUJhUmHmNi6q+DT8NqmVfFupcM9M43vOc8XwdOW+qYGEbgOAaWBZyNuktxxyQws4 VVD3CtGwbximY99x1NdHmjDTu3CnZIC9KBlebijMh6kKkdRtXzjBa9ybl2s1sneoxXDZ VBFVQTKSrQVqVysRkSd7ZfEh8+xAWlZs9M14jttuaNupwssrUdgLYKty3DbUybvbHWSG RC0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y0ffBdYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si7950709edr.96.2020.09.21.02.47.39; Mon, 21 Sep 2020 02:48:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y0ffBdYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726417AbgIUJoi (ORCPT + 99 others); Mon, 21 Sep 2020 05:44:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:60878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726358AbgIUJoh (ORCPT ); Mon, 21 Sep 2020 05:44:37 -0400 Received: from localhost.localdomain (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 593862076B; Mon, 21 Sep 2020 09:44:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600681477; bh=Z92PhSiSGLZvxyCQXE5kB9pXKwvYFj4JCiDf0s9v4f0=; h=From:To:Cc:Subject:Date:From; b=Y0ffBdYA09c21nEEWgNXUtH/mH6JYQF9TPbRtWeoJ3rfO9tj76qouMjMz+IW0EKOD oty3cr7I0QPu5wd4CJaJpc2m1/L3KWOHvepLctneu3lM3UeJwp6dTU8uS4nTcsV6nZ 36KSy//Sw/E4+wTSyZSQP1vej7gCro18a7vmCVHg= From: Masami Hiramatsu To: Steven Rostedt Cc: LKML , Ingo Molnar , Masami Hiramatsu Subject: [PATCH 0/4] bootconfig: Fix a parser bug Date: Mon, 21 Sep 2020 18:44:33 +0900 Message-Id: <160068147328.1088739.7282405187565509762.stgit@devnote2> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Here are patches to fix 2 bugs in the parser. One issue happens when a key has a siblings and the key repeated with brace after sibling nodes. Another one is that the parser keeps tailing spaces when we put a comment on the line. For example, the minimum example of the 1st issue is here; foo bar foo { buz } This should be parsed as foo.buz bar But the bootconfig parser parses it as foo.buz (no bar node) because foo->bar link is unlinked when the brace ("foo {") was found. The second one is simpler, if we have foo = val # comment The value's space after the word was not removed. foo="val " But this also should be foo="val" If user needs tailing spaces, they can use quotes, e.g. foo = "val " # comment Thank you, --- Masami Hiramatsu (4): lib/bootconfig: Fix a bug of breaking existing tree nodes lib/bootconfig: Fix to remove tailing spaces after value tools/bootconfig: Add testcases for repeated key with brace tools/bootconfig: Add testcase for tailing space tools/bootconfig/test-bootconfig.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -- Masami Hiramatsu (Linaro)