[PATCH v1 0/3] some linux-user guest_base fixes

Alex Bennée posted 3 patches 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch failed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200527100546.29297-1-alex.bennee@linaro.org
linux-user/elfload.c          | 66 ++++++++++++++++++++++++++++++-----
tests/tcg/arm/commpage.c      | 61 ++++++++++++++++++++++++++++++++
tests/tcg/arm/Makefile.target |  2 ++
3 files changed, 121 insertions(+), 8 deletions(-)
create mode 100644 tests/tcg/arm/commpage.c
[PATCH v1 0/3] some linux-user guest_base fixes
Posted by Alex Bennée 3 years, 11 months ago
Hi,

Here are a couple of patches to clean-up guest_base handling for
linux-user guests. There are two cases we hadn't accounted for/tested
enough in the original clean-up:

  - chroots without /proc access
  - 32 bit hosts and the 32 bit ARM COMMPAGE

The solution to the first problem is a simple fall-back to mmap
probing but without the ugliness of the first approach.

The second is a bit of a hack but works. Given we only ever expose one
value from the COMMPAGE it does make me wonder if we could rip out the
special casing and come up with a cleaner ARM only approach by hooking
exceptions? Anyway I've included a test case for the COMMPAGE as well.

Please review

Alex Bennée (3):
  linux-user: provide fallback pgd_find_hole for bare chroots
  linux-user: deal with address wrap for ARM_COMMPAGE on 32 bit
  tests/tcg: add simple commpage test case

 linux-user/elfload.c          | 66 ++++++++++++++++++++++++++++++-----
 tests/tcg/arm/commpage.c      | 61 ++++++++++++++++++++++++++++++++
 tests/tcg/arm/Makefile.target |  2 ++
 3 files changed, 121 insertions(+), 8 deletions(-)
 create mode 100644 tests/tcg/arm/commpage.c

-- 
2.20.1


Re: [PATCH v1 0/3] some linux-user guest_base fixes
Posted by no-reply@patchew.org 3 years, 11 months ago
Patchew URL: https://patchew.org/QEMU/20200527100546.29297-1-alex.bennee@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20200527100546.29297-1-alex.bennee@linaro.org
Subject: [PATCH  v1 0/3] some linux-user guest_base fixes
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 - [tag update]      patchew/20200527100546.29297-1-alex.bennee@linaro.org -> patchew/20200527100546.29297-1-alex.bennee@linaro.org
Switched to a new branch 'test'
a537e13 tests/tcg: add simple commpage test case
26c424e linux-user: deal with address wrap for ARM_COMMPAGE on 32 bit
8825cb1 linux-user: provide fallback pgd_find_hole for bare chroots

=== OUTPUT BEGIN ===
1/3 Checking commit 8825cb148fa8 (linux-user: provide fallback pgd_find_hole for bare chroots)
WARNING: line over 80 characters
#44: FILE: linux-user/elfload.c:2114:
+static uintptr_t pgd_find_hole_fallback(uintptr_t guest_size, uintptr_t brk, long align)

total: 0 errors, 1 warnings, 60 lines checked

Patch 1/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
2/3 Checking commit 26c424e346df (linux-user: deal with address wrap for ARM_COMMPAGE on 32 bit)
3/3 Checking commit a537e13dbea5 (tests/tcg: add simple commpage test case)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#28: 
new file mode 100644

ERROR: Use of volatile is usually wrong, please add a comment
#57: FILE: tests/tcg/arm/commpage.c:25:
+typedef int (cmpxchg_fn)(int oldval, int newval, volatile int *ptr);

ERROR: Use of volatile is usually wrong, please add a comment
#63: FILE: tests/tcg/arm/commpage.c:31:
+                           volatile int64_t *ptr);

total: 2 errors, 1 warnings, 69 lines checked

Patch 3/3 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200527100546.29297-1-alex.bennee@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com