Message ID | 20231121231342.193646-1-oss@malat.biz |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp972984vqb; Tue, 21 Nov 2023 15:14:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWQBEwkdvC1nJYU3CIU+olaL1dZZS/yPGfFW+fIZthVf7QlDvCe6KuBPiXVxLg2xTLfnYz X-Received: by 2002:a05:6a00:2395:b0:6cb:735c:67af with SMTP id f21-20020a056a00239500b006cb735c67afmr1211028pfc.0.1700608454268; Tue, 21 Nov 2023 15:14:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700608454; cv=none; d=google.com; s=arc-20160816; b=Mi14/tl4mjqZKduR/nKOoa+7b6XqE4XCzpuleMqu/JP2nwkxkCFOYMUfx0jl5r+N29 e3yXMuKrpEzLZO5hW5J78jM+q1AupFRUrOQNLTZ+YhUIHF0DPs+OYE/ayOy6yU+5ANgV Sxuif1/NOdW6HNXpRornhAlWIwsZSAgv9K523z9+zzpNaB+YaBQGftMs6o4oVQRMWNq8 CfmONq5UMOE5yDOMC6Lqmv1CKdKAQ9G21KScrDMANYd5CmZp67FZMHT+YSTQHHoIRObE gwEYT+hc8c6ZIJa0xgr0b+yha/DXZGUhaA8Y9O2RP1ijpolSu1SVCQQevm0nu9Jo74zk hTuQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=u2L9dMn1KKZ1/ioo/PFLD/+csdsIYO11PXlZaQcONvA=; fh=7b2BgFWeMSfoyniPx828ASBftS1Bm6+CDBwFVQh34Rw=; b=mTM5CVlvhua5IRrkbq9sZWVofxumz+iuLGV3KqMjdxxl3RybuWXPsT04JcqLAASxP/ orkgdnN8Oc6Nw1mBtgsixbHQKnGfCozQXfe9/fyid56VwNn60ao1OwONI1Vlyg5i/jag r9n7GaPYP7GcXedpJdu7g4FBVu+G7W0NQHzZvSsoFiTEWiyvRbzZ8Kn2Mzrf+nbq3C4m FVcIj4qCyGAKEmwmHIsYI9ZRCcyNXjGRRD6UmJPiytL9eCC6IHzVeLtCukWHj45nuUBm nbeQaZk9dl3tZcFqI4YcRpQoqFdHOp9yYgjFey/ZOMw/ulThXACoQRBZ+qWOSR40I+P1 9FCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@malat-biz.20230601.gappssmtp.com header.s=20230601 header.b=UrhZivy+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id w188-20020a6262c5000000b006cb8ea1f1besi5808024pfb.65.2023.11.21.15.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 15:14:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@malat-biz.20230601.gappssmtp.com header.s=20230601 header.b=UrhZivy+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 74DEB80764AB; Tue, 21 Nov 2023 15:14:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229750AbjKUXOB (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Tue, 21 Nov 2023 18:14:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjKUXOA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Nov 2023 18:14:00 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A585210C for <linux-kernel@vger.kernel.org>; Tue, 21 Nov 2023 15:13:55 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-507bd19eac8so8084995e87.0 for <linux-kernel@vger.kernel.org>; Tue, 21 Nov 2023 15:13:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=malat-biz.20230601.gappssmtp.com; s=20230601; t=1700608434; x=1701213234; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=u2L9dMn1KKZ1/ioo/PFLD/+csdsIYO11PXlZaQcONvA=; b=UrhZivy+aWLPCYn01YylneFCyNnCmHQPFU3Z+FE5NdzJIlzsy4NFY7CjA+mL9DN+x3 cwi2EjoSus+VqH/lJqQEBW1Q6rVkR7jpmO2a4+B2wNkIGTZ+nj1cxzKxgLgFZBYUh1q4 WrV4TPKzIO71hTBGdN9OeMSAAIq/ChucF+EUsBqn05OOITFu54Y7/exkbeyNS9IFoMMA CNGGCURT1HlL6e7GO6miO0IlJZ+OFwXtIkhsRM7jmg/mEocCa6bvV6beTsldmK6Kj65L EgikIh2OzrdJFqsrBJNrovBlZgUaQ1Ay1mFa3WXg6jiiJwQ5xDVYthIk8oZXy5R4wLLL 4+fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700608434; x=1701213234; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=u2L9dMn1KKZ1/ioo/PFLD/+csdsIYO11PXlZaQcONvA=; b=L7FRvhbb6OiJ9FJ8B0UqATo/8ZKtXvsMXAgEQDMB7L0NEriZwMo916TiQ66e99THz+ RmXeG4q6b8iW41HIP42/lnladWiph5bvvNprapftF2V2ZEU0RA2GTvkBfFQEFUjaq+jP lzxn72KQi6I/91YL5F178hAa9C5uinNkEK76eecLHdu0vX+xHrJG4bsX0JFnzjhTBKKr N4l15iRJ6kTUKoO7psd9PqkJTbm2umLx369X0RDfM6s601d5s3SGW3flBjtsignb3lNb JEAk8mEzYA4kzk/U5kkyDfyfRdFZu02P7aL9DJiEZa/3dKnwnCASer/WXrwHUcsTwug6 V+mw== X-Gm-Message-State: AOJu0YxKvuUOjvETMEItQQsHbo9ikdljtH+s13qjOsJ7BEXcSz6LdIsR WDGbY4mVt06wsOcOrOW/xO9dJYzHMmqMiA8D/I/A4Q== X-Received: by 2002:a05:6512:10cd:b0:500:b2f6:592 with SMTP id k13-20020a05651210cd00b00500b2f60592mr526356lfg.50.1700608433760; Tue, 21 Nov 2023 15:13:53 -0800 (PST) Received: from ntb.lan ([193.86.118.65]) by smtp.googlemail.com with ESMTPSA id f7-20020a056402160700b00548b6175881sm2964840edv.77.2023.11.21.15.13.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 15:13:53 -0800 (PST) From: Petr Malat <oss@malat.biz> To: linux-kernel@vger.kernel.org Cc: mhiramat@kernel.org, paulmck@kernel.org, rostedt@goodmis.org, oss@malat.biz Subject: [PATCH 0/2] bootconfig: Support early options in embedded config Date: Wed, 22 Nov 2023 00:13:40 +0100 Message-Id: <20231121231342.193646-1-oss@malat.biz> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 21 Nov 2023 15:14:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783217210784938579 X-GMAIL-MSGID: 1783217210784938579 |
Series |
bootconfig: Support early options in embedded config
|
|
Message
Petr Malat
Nov. 21, 2023, 11:13 p.m. UTC
These 2 patches add a support for specifying early options in embedded bootconfig and merging embedded and initrd bootconfig into one. To allow handling of early options, it's necessary to eliminate allocations from embedded bootconfig handling, which can be done by parsing the config data in place and allocating xbc_nodes array statically. Later, when initrd is available, it either replaces embedded data or is appended to them. To append initrd data, it's necessary to relocate already parsed data to a bigger memory chunk, but that's not a problem, because xbc_node structure uses offsets and not absolute pointers. Also, update the documentation to make users aware early options can't be configured in the initrd.
Comments
On Wed, Nov 22, 2023 at 12:13:40AM +0100, Petr Malat wrote: > These 2 patches add a support for specifying early options in embedded > bootconfig and merging embedded and initrd bootconfig into one. > > To allow handling of early options, it's necessary to eliminate allocations > from embedded bootconfig handling, which can be done by parsing the config > data in place and allocating xbc_nodes array statically. > > Later, when initrd is available, it either replaces embedded data or is > appended to them. To append initrd data, it's necessary to relocate already > parsed data to a bigger memory chunk, but that's not a problem, because > xbc_node structure uses offsets and not absolute pointers. > > Also, update the documentation to make users aware early options can't be > configured in the initrd. Nice!!! For the series: Tested-by: Paul E. McKenney <paulmck@kernel.org> (My setup isn't friendly with initrd bootconfig, so I tested this only for the embedded bootconfig parameters.) Thanx, Paul
Hi Petr, Thanks for the patch. On Wed, 22 Nov 2023 00:13:40 +0100 Petr Malat <oss@malat.biz> wrote: > These 2 patches add a support for specifying early options in embedded > bootconfig and merging embedded and initrd bootconfig into one. > > To allow handling of early options, it's necessary to eliminate allocations > from embedded bootconfig handling, which can be done by parsing the config > data in place and allocating xbc_nodes array statically. Hm, my concern is that this can introduce some sort of overhead to parse the bootconfig. > > Later, when initrd is available, it either replaces embedded data or is > appended to them. To append initrd data, it's necessary to relocate already > parsed data to a bigger memory chunk, but that's not a problem, because > xbc_node structure uses offsets and not absolute pointers. However, as you did on this series, it is OK that it does an additional parse for the initrd bootconfig (do not parse twice) Let me comment your patch. Thanks! > > Also, update the documentation to make users aware early options can't be > configured in the initrd. > >