mbox series

[00/12] linux-user: Load a vdso for x86_64 and hppa

Message ID 20210619034329.532318-1-richard.henderson@linaro.org (mailing list archive)
Headers show
Series linux-user: Load a vdso for x86_64 and hppa | expand

Message

Richard Henderson June 19, 2021, 3:43 a.m. UTC
Supersedes: 20200519194452.9009-1-richard.henderson@linaro.org
Based-on: 20210618192951.125651-1-richard.henderson@linaro.org
("[PATCH v2 00/23] linux-user: Move signal trampolines to new page")

Previous cover letter:
> The subject of AT_SYSINFO came up on launchpad recently.
> 
> There is definite room for improvement in all of this:
> 
> (1) We could build the vdso binary into qemu instead of really
>     loading it from the file system.  This would obviate the
>     several problems of locating the .so file.  It would also
>     mean that --static builds continue to create a standalone
>     qemu binary.
> 
> (2) We could use our cross-build system to build the vdso.
>     Though we'd still likely want to keep the image in git
>     along side the other rom images for when cross-build is
>     not available.
> 
> (3) There are some ??? comments where some decisions could be made,
>     and other ??? that are merely commenting on weirdness.
> 
> (4) It shouldn't take too much effort to create vdsos for the
>     other architectures.  But we should get this one as clean
>     as we can first.

Amusingly, this patch set has turned 11 years old.
First posted April 4, 2010.

Change since previous:

Point (1) has been addressed: the vdso binary pre-processed,
validating the VDSO image, emitting a C array for the image,
collecting the set of relocations required, and identifying
any signal return trampolines.

Point (2) is still an issue in that the cross-build system is
tied up in tests/ makefiles.  It might be time to bite the bullet
and convert it all to meson.

I think there are fewer ??? than before.


r~


Richard Henderson (12):
  linux-user: Fix style problems in linuxload.c
  linux-user: Introduce imgsrc_read, imgsrc_read_alloc
  linux-user: Tidy loader_exec
  linux-user: Do not clobber bprm_buf swapping ehdr
  linux-user: Use ImageSource in load_elf_image
  linux-user: Use ImageSource in load_symbols
  linux-user: Replace bprm->fd with bprm->src.fd
  linux-user: Introduce imgsrc_mmap
  linux-user: Load vdso image if available
  linux-user: Add gen-vdso tool
  linux-user/x86_64: Add vdso
  linux-user/hppa: Add vdso and use it for rt_sigreturn

 linux-user/qemu.h               |  60 ++++++-
 linux-user/elfload.c            | 305 ++++++++++++++++++--------------
 linux-user/flatload.c           |   8 +-
 linux-user/gen-vdso.c           | 168 ++++++++++++++++++
 linux-user/hppa/signal.c        |   8 +-
 linux-user/linuxload.c          | 171 +++++++++++++-----
 linux-user/gen-vdso-elfn.c.inc  | 299 +++++++++++++++++++++++++++++++
 linux-user/hppa/Makefile.vdso   |   4 +
 linux-user/hppa/meson.build     |   6 +
 linux-user/hppa/vdso.S          | 149 ++++++++++++++++
 linux-user/hppa/vdso.ld         |  75 ++++++++
 linux-user/hppa/vdso.so         | Bin 0 -> 5192 bytes
 linux-user/meson.build          |   6 +-
 linux-user/x86_64/Makefile.vdso |   3 +
 linux-user/x86_64/meson.build   |   6 +
 linux-user/x86_64/vdso.S        | 122 +++++++++++++
 linux-user/x86_64/vdso.ld       |  74 ++++++++
 linux-user/x86_64/vdso.so       | Bin 0 -> 5912 bytes
 18 files changed, 1272 insertions(+), 192 deletions(-)
 create mode 100644 linux-user/gen-vdso.c
 create mode 100644 linux-user/gen-vdso-elfn.c.inc
 create mode 100644 linux-user/hppa/Makefile.vdso
 create mode 100644 linux-user/hppa/vdso.S
 create mode 100644 linux-user/hppa/vdso.ld
 create mode 100755 linux-user/hppa/vdso.so
 create mode 100644 linux-user/x86_64/Makefile.vdso
 create mode 100644 linux-user/x86_64/vdso.S
 create mode 100644 linux-user/x86_64/vdso.ld
 create mode 100755 linux-user/x86_64/vdso.so

Comments

no-reply@patchew.org June 19, 2021, 4:06 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20210619034329.532318-1-richard.henderson@linaro.org/



Hi,

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

Type: series
Message-id: 20210619034329.532318-1-richard.henderson@linaro.org
Subject: [PATCH 00/12] linux-user: Load a vdso for x86_64 and hppa

=== 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 ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20210619034329.532318-1-richard.henderson@linaro.org -> patchew/20210619034329.532318-1-richard.henderson@linaro.org
Switched to a new branch 'test'
eb8d6c9 linux-user/hppa: Add vdso and use it for rt_sigreturn
52cca21 linux-user/x86_64: Add vdso
fd7f59e linux-user: Add gen-vdso tool
5228b92 linux-user: Load vdso image if available
0fc0b1b linux-user: Introduce imgsrc_mmap
e397043 linux-user: Replace bprm->fd with bprm->src.fd
832f702 linux-user: Use ImageSource in load_symbols
9d65bf5 linux-user: Use ImageSource in load_elf_image
b04a74d linux-user: Do not clobber bprm_buf swapping ehdr
acdaddc linux-user: Tidy loader_exec
63442e1 linux-user: Introduce imgsrc_read, imgsrc_read_alloc
a4d2a45 linux-user: Fix style problems in linuxload.c

=== OUTPUT BEGIN ===
1/12 Checking commit a4d2a4511b66 (linux-user: Fix style problems in linuxload.c)
2/12 Checking commit 63442e15ed05 (linux-user: Introduce imgsrc_read, imgsrc_read_alloc)
3/12 Checking commit acdaddc5dc89 (linux-user: Tidy loader_exec)
4/12 Checking commit b04a74dee4d8 (linux-user: Do not clobber bprm_buf swapping ehdr)
5/12 Checking commit 9d65bf56e0c7 (linux-user: Use ImageSource in load_elf_image)
6/12 Checking commit 832f702ccea5 (linux-user: Use ImageSource in load_symbols)
7/12 Checking commit e3970430bd3b (linux-user: Replace bprm->fd with bprm->src.fd)
8/12 Checking commit 0fc0b1bd7d79 (linux-user: Introduce imgsrc_mmap)
9/12 Checking commit 5228b920709c (linux-user: Load vdso image if available)
10/12 Checking commit fd7f59e94124 (linux-user: Add gen-vdso tool)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#21: 
new file mode 100644

ERROR: trailing whitespace
#31: FILE: linux-user/gen-vdso-elfn.c.inc:6:
+ * $

ERROR: spaces required around that '*' (ctx:WxV)
#92: FILE: linux-user/gen-vdso-elfn.c.inc:67:
+static void elfN(process)(FILE *outf, void *buf, long total_len,
                                ^

ERROR: trailing whitespace
#184: FILE: linux-user/gen-vdso-elfn.c.inc:159:
+        $

ERROR: trailing whitespace
#335: FILE: linux-user/gen-vdso.c:5:
+ * $

ERROR: spaces required around that ':' (ctx:VxW)
#350: FILE: linux-user/gen-vdso.c:20:
+                            uint16_t: __builtin_bswap16,       \
                                     ^

ERROR: spaces required around that ':' (ctx:VxW)
#351: FILE: linux-user/gen-vdso.c:21:
+                            uint32_t: __builtin_bswap32,       \
                                     ^

ERROR: spaces required around that ':' (ctx:VxW)
#352: FILE: linux-user/gen-vdso.c:22:
+                            uint64_t: __builtin_bswap64,       \
                                     ^

ERROR: spaces required around that ':' (ctx:VxW)
#353: FILE: linux-user/gen-vdso.c:23:
+                            int16_t: __builtin_bswap16,        \
                                    ^

ERROR: spaces required around that ':' (ctx:VxW)
#354: FILE: linux-user/gen-vdso.c:24:
+                            int32_t: __builtin_bswap32,        \
                                    ^

ERROR: spaces required around that ':' (ctx:VxW)
#355: FILE: linux-user/gen-vdso.c:25:
+                            int64_t: __builtin_bswap64)
                                    ^

WARNING: Block comments use a leading /* on a separate line
#436: FILE: linux-user/gen-vdso.c:106:
+    fputs("/* Automatically generated from linux-user/gen-vdso.c. */\n"

total: 10 errors, 2 warnings, 481 lines checked

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

11/12 Checking commit 52cca2161834 (linux-user/x86_64: Add vdso)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#38: 
new file mode 100644

ERROR: trailing whitespace
#70: FILE: linux-user/x86_64/vdso.S:5:
+ * $

ERROR: trailing whitespace
#198: FILE: linux-user/x86_64/vdso.ld:5:
+ * $

total: 2 errors, 1 warnings, 217 lines checked

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

12/12 Checking commit eb8d6c9db1a6 (linux-user/hppa: Add vdso and use it for rt_sigreturn)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#42: 
new file mode 100644

total: 0 errors, 1 warnings, 268 lines checked

Patch 12/12 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/20210619034329.532318-1-richard.henderson@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com