Linux Documentation
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, bp@alien8.de, corbet@lwn.net,
	dpsmith@apertussolutions.com, eric.snowberg@oracle.com,
	kanth.ghatraju@oracle.com, konrad.wilk@oracle.com,
	mingo@redhat.com, ross.philipson@oracle.com, tglx@linutronix.de
Subject: Re: [PATCH v2 1/3] x86/boot: Introduce the kernel_info
Date: Mon, 30 Sep 2019 10:18:43 -0700	[thread overview]
Message-ID: <c9eb5a39-ced5-b35d-616d-6ffbe15c1396@zytor.com> (raw)
In-Reply-To: <20190930150110.ekir52wu3w67v2fk@tomti.i.net-space.pl>

On 2019-09-30 08:01, Daniel Kiper wrote:
> 
> OK.
> 
>> field for the entire .kernel_info section, thus ensuring it is a
>> single self-contained blob.
> 
> .rodata.kernel_info contains its total size immediately behind the
> "InfO" header. Do you suggest that we should add the size of
> .rodata.kernel_info into setup_header too?
> 

No, what I want is a chunked architecture for kernel_info.

That is:

/* Common chunk header */
struct kernel_info_header {
	uint32_t magic;
	uint32_t len;
};

/* Top-level chunk, always first */
#define KERNEL_INFO_MAGIC 0x45fdbe4f

struct kernel_info {
	struct kernel_info_header hdr;
	uint32_t total_size;		/* Total size of all chunks */

	/* Various fixed-sized data objects, OR offsets to other chunks */
};

Also "InfO" is a pretty hideous magic. In general, all-ASCII magics have much
higher risk of collision than *RANDOM* binary numbers. However, for a chunked
architecture they do have the advantage that they can be used also as a human
name or file name for the chunk, e.,g. in sysfs, so maybe something like
"LnuX" or even "LToP" for the top-level chunk might make sense.

How does that sound?

	-hpa


  reply	other threads:[~2019-09-30 20:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-04 16:36 [PATCH v2 0/3] x86/boot: Introduce the kernel_info et consortes Daniel Kiper
2019-07-04 16:36 ` [PATCH v2 1/3] x86/boot: Introduce the kernel_info Daniel Kiper
2019-07-12 16:04   ` hpa
2019-09-30 15:01     ` Daniel Kiper
2019-09-30 17:18       ` H. Peter Anvin [this message]
2019-10-01 11:41         ` Daniel Kiper
2019-10-01 22:28           ` H. Peter Anvin
2019-10-02 12:00             ` Daniel Kiper
2019-07-04 16:36 ` [PATCH v2 2/3] x86/boot: Introduce the setup_indirect Daniel Kiper
2019-07-12 15:56   ` hpa
2019-10-01 14:47     ` Daniel Kiper
2019-07-04 16:36 ` [PATCH v2 3/3] x86/boot: Introduce the kernel_info.setup_type_max Daniel Kiper
2019-07-12 15:59   ` hpa
2019-07-12 11:58 ` [PATCH v2 0/3] x86/boot: Introduce the kernel_info et consortes Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9eb5a39-ced5-b35d-616d-6ffbe15c1396@zytor.com \
    --to=hpa@zytor.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=daniel.kiper@oracle.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=eric.snowberg@oracle.com \
    --cc=kanth.ghatraju@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ross.philipson@oracle.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox