Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Feb 2015 03:38:45 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, Nathan Whitehorn <nwhitehorn@freebsd.org>
Subject:   Fixing powerpc64 /boot/loader's kernel page handing: suggestions?
Message-ID:  <229FBFAB-B198-4F79-827D-D381DE716593@dsl-only.net>

next in thread | raw e-mail | index | archive | help
Nathan W wrote:

> Thanks for diagnosing this! The syncicache spans the whole kernel out =
of=20
> laziness. As you note, it isn't appropriate. If there are more =
instances=20
> of this kind of thing, then it might make sense to try to make ld emit=20=

> only one PT_LOAD program section as a long-term solution. I'll look =
into=20
> that soon.
> -Nathan

In =
https://lists.freebsd.org/pipermail/freebsd-ppc/2015-February/007415.html =
I reported that I had accidentally caused the existence of the =
unreferenced pages via a .align that was larger than a page: I typed the =
target number instead of its power of 2. It was only "luck" that my =
prior builds had been close to the large .align boundary and so happened =
to not get any extra pages from the mistake.

Without this oddity in the .align only one PT_LOAD is present in any of =
my builds.

But with the oddity such breaks can cause multiple PT_LOAD's to be =
generated with holes between them.

As stands there is an implicit rule that no pages can be wasted: no =
holes that contain a full page or more are allowed. But any holes that =
include such have non-obvious behavior and failure at a very early stage =
where it is messy to figure out what happened.

An alternate for the issue of "holes" might be a message reporting the =
issue as a reason why the load/boot will be rejected --sort of like =
detecting and reporting other types of problems with using a messed-up =
file as a kernel. May be even just reporting whenever there is more than =
one PT_LOAD even if no pages would make a hole.

Then the issue of avoiding isync'ing memory regions that are not =
appropriate would be an independent point that still could be addressed =
on its own.


=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?229FBFAB-B198-4F79-827D-D381DE716593>