Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc cleanups and minor fixes #531

Merged
merged 5 commits into from
Sep 16, 2023
Merged

Conversation

ddiss
Copy link

@ddiss ddiss commented Sep 15, 2023

For ease of review, I decided to split these out from the v6.4 merge PR.

The following changes since commit 182efc849072e8afbe9e792a82e3af58d7407fc1:

  Merge pull request #524 from thehajime/zpoline-lkl (2023-08-01 09:46:40 +0900)

are available in the Git repository at:

  https://github.com/ddiss/linux.git misc_cleanups_and_minor_fixes

for you to fetch changes up to d3a47cfb720d180ecc269cee62d5d0941e067f14:

  lkl/tests: add disk parameters check to avoid segfaulting (2023-09-16 00:29:28 +0200)

----------------------------------------------------------------
David Disseldorp (5):
      lkl tools: fix cpfromfs relative path handling
      lkl: allow some Makefile install paths to be overridden
      lkl/fs2tar: cleanup ARGP_KEY_END handling
      lkl: Mark the stack non-executable to fix a binutils warning
      lkl/tests: add disk parameters check to avoid segfaulting

 tools/lkl/Makefile          | 19 +++++++++++--------
 tools/lkl/Makefile.autoconf |  3 ++-
 tools/lkl/cptofs.c          |  4 ++--
 tools/lkl/fs2tar.c          |  1 +
 tools/lkl/tests/disk.c      |  7 ++++++-
 5 files changed, 22 insertions(+), 12 deletions(-)

utimensat() needs a valid directory fd if the pathname is relative.
Use AT_FDCWD to ensure that relative paths are correctly handled.

Signed-off-by: David Disseldorp <[email protected]>
Some distributions require libraries in e.g. /usr/lib64, so add
support for overriding common install paths via LIBDIR, BINDIR and
INCDIR.

Signed-off-by: David Disseldorp <[email protected]>
The current handler unintentionally returns ARGP_ERROR_UNKNOWN for the
non-error case (via case fallthrough). As per argp.h, this error return
gets ignored, so doesn't cause any problems:
  What to return for unrecognized keys.  For special ARGP_KEY_ keys,
  such returns will simply be ignored.

Still worth fixing for the compiler warnings.

Signed-off-by: David Disseldorp <[email protected]>
As per commit bd71558 ("arch: um: Mark the stack non-executable to
fix a binutils warning"):
Since binutils 2.39, ld will print a warning if any stack section is
executable, which is the default for stack sections on files without a
.note.GNU-stack section.

Signed-off-by: David Disseldorp <[email protected]>
Check for disk (image) and fstype parameters, to avoid segfaulting
immediately. Failure to open the image or invalid fstype will still
result in segfault.

Signed-off-by: David Disseldorp <[email protected]>
@thehajime
Copy link
Member

LGTM.

For the qemu test, it often fails randomly (I haven't investigated so far but I should) so, it should be unrelated to this PR.

Copy link
Member

@tavip tavip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks David!

@tavip tavip merged commit 31a835e into lkl:master Sep 16, 2023
13 checks passed
@ddiss ddiss deleted the misc_cleanups_and_minor_fixes branch September 18, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants