* Fix some compilation issues
* Fix overflow calculation in s390x emulation * Update location of lockdown.yml in MAINTAINERS file -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmJG4aoRHHRodXRoQHJl ZGhhdC5jb20ACgkQLtnXdP5wLbUMiA/+Pt8gEz/NBkSdITJ/aim9e65FKOU6q8h1 PvLZG+CZT1zLOSvLE9QmOSXI0PSoP1Y/U+KP/1AyoBUxyFbNtYzifp/FFUPNKZbm dkzcxIdEDfas8xIoLfwMThQlxU019wIDpbKJN5WnBmWm4IW+jTticc0EcuccW2UX 4FznS+PbmAH20VckwA7smeNv4JvbsMFg7ftAIapZ/0e5+6rxL0dXTE+Bimej1MO/ rx9G9JVGf+44N7xGjYNt5p/jeX27GwsH9N2esGoIMuadadvmB1Gc4JmLJD0iHM3C BKcRHnpxTekRsidtgudnbxo7ZwjsFPtLDmDmstOejKovy4xCoR1/sfTAmSlBws3V KBb1V3uHMV0tLz9fiYi4LjXSSpVV5scAjBbir/Hl5RIfK1BKk81EcJep5U9uuxRn IgEMjzTG6pUpd9RjqPvWyaYm1Js7NYR9cR/XcPnEYrWkibkcQO+ErwhN3sWmItn3 AihIHY1qDxlTqqNmF2TLjvXAzMf4jMu0CxINfaDjSliQTKm9jFZ5e+iIbPTpqX1O TIV6qZVT1ft5b+GN6vrT/PxAv5Udx4CfF9OTdQQf3zciztDmQRRL2x1HffyF06cy iF16LxaK/TbrIIFQPut2VR5UufeJ+sEtRwvEiukeq7GaCeHftxnL3vbrYfM9/OcE 51c4GVBBEOY= =4ry6 -----END PGP SIGNATURE----- Merge tag 'pull-request-2022-04-01' of https://gitlab.com/thuth/qemu into staging * Fix some compilation issues * Fix overflow calculation in s390x emulation * Update location of lockdown.yml in MAINTAINERS file # gpg: Signature made Fri 01 Apr 2022 12:27:38 BST # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2022-04-01' of https://gitlab.com/thuth/qemu: trace: fix compilation with lttng-ust >= 2.13 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c meson.build: Fix dependency of page-vary-common.c to config-poison.h target/s390x: Fix determination of overflow condition code after subtraction target/s390x: Fix determination of overflow condition code after addition misc: Fixes MAINTAINERS's path .github/workflows/lockdown.yml Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
bc6ec396d4
@ -3615,7 +3615,7 @@ M: Thomas Huth <thuth@redhat.com>
|
||||
R: Wainer dos Santos Moschetta <wainersm@redhat.com>
|
||||
R: Beraldo Leal <bleal@redhat.com>
|
||||
S: Maintained
|
||||
F: .github/lockdown.yml
|
||||
F: .github/workflows/lockdown.yml
|
||||
F: .gitlab-ci.yml
|
||||
F: .gitlab-ci.d/
|
||||
F: .travis.yml
|
||||
|
28
hw/9pfs/9p.c
28
hw/9pfs/9p.c
@ -17,6 +17,11 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#ifdef CONFIG_LINUX
|
||||
#include <linux/limits.h>
|
||||
#else
|
||||
#include <limits.h>
|
||||
#endif
|
||||
#include <glib/gprintf.h>
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "qapi/error.h"
|
||||
@ -33,11 +38,6 @@
|
||||
#include "migration/blocker.h"
|
||||
#include "qemu/xxhash.h"
|
||||
#include <math.h>
|
||||
#ifdef CONFIG_LINUX
|
||||
#include <linux/limits.h>
|
||||
#else
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
int open_fd_hw;
|
||||
int total_open_fd;
|
||||
@ -3925,6 +3925,24 @@ out_nofid:
|
||||
v9fs_string_free(&name);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_LINUX)
|
||||
/* Currently, only Linux has XATTR_SIZE_MAX */
|
||||
#define P9_XATTR_SIZE_MAX XATTR_SIZE_MAX
|
||||
#elif defined(CONFIG_DARWIN)
|
||||
/*
|
||||
* Darwin doesn't seem to define a maximum xattr size in its user
|
||||
* space header, so manually configure it across platforms as 64k.
|
||||
*
|
||||
* Having no limit at all can lead to QEMU crashing during large g_malloc()
|
||||
* calls. Because QEMU does not currently support macOS guests, the below
|
||||
* preliminary solution only works due to its being a reflection of the limit of
|
||||
* Linux guests.
|
||||
*/
|
||||
#define P9_XATTR_SIZE_MAX 65536
|
||||
#else
|
||||
#error Missing definition for P9_XATTR_SIZE_MAX for this host system
|
||||
#endif
|
||||
|
||||
static void coroutine_fn v9fs_xattrcreate(void *opaque)
|
||||
{
|
||||
int flags, rflags = 0;
|
||||
|
18
hw/9pfs/9p.h
18
hw/9pfs/9p.h
@ -479,22 +479,4 @@ struct V9fsTransport {
|
||||
void (*push_and_notify)(V9fsPDU *pdu);
|
||||
};
|
||||
|
||||
#if defined(XATTR_SIZE_MAX)
|
||||
/* Linux */
|
||||
#define P9_XATTR_SIZE_MAX XATTR_SIZE_MAX
|
||||
#elif defined(CONFIG_DARWIN)
|
||||
/*
|
||||
* Darwin doesn't seem to define a maximum xattr size in its user
|
||||
* space header, so manually configure it across platforms as 64k.
|
||||
*
|
||||
* Having no limit at all can lead to QEMU crashing during large g_malloc()
|
||||
* calls. Because QEMU does not currently support macOS guests, the below
|
||||
* preliminary solution only works due to its being a reflection of the limit of
|
||||
* Linux guests.
|
||||
*/
|
||||
#define P9_XATTR_SIZE_MAX 65536
|
||||
#else
|
||||
#error Missing definition for P9_XATTR_SIZE_MAX for this host system
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -455,8 +455,8 @@ if 'CONFIG_GIO' in config_host
|
||||
endif
|
||||
lttng = not_found
|
||||
if 'ust' in get_option('trace_backends')
|
||||
lttng = dependency('lttng-ust', required: true, method: 'pkg-config',
|
||||
kwargs: static_kwargs)
|
||||
lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
|
||||
method: 'pkg-config', kwargs: static_kwargs)
|
||||
endif
|
||||
pixman = not_found
|
||||
if have_system or have_tools
|
||||
@ -2881,7 +2881,7 @@ if get_option('b_lto')
|
||||
if get_option('cfi')
|
||||
pagevary_flags += '-fno-sanitize=cfi-icall'
|
||||
endif
|
||||
pagevary = static_library('page-vary-common', sources: pagevary,
|
||||
pagevary = static_library('page-vary-common', sources: pagevary + genh,
|
||||
c_args: pagevary_flags)
|
||||
pagevary = declare_dependency(link_with: pagevary)
|
||||
endif
|
||||
|
@ -29,8 +29,8 @@ def generate(events, backend, group):
|
||||
'#undef TRACEPOINT_PROVIDER',
|
||||
'#define TRACEPOINT_PROVIDER qemu',
|
||||
'',
|
||||
'#undef TRACEPOINT_INCLUDE_FILE',
|
||||
'#define TRACEPOINT_INCLUDE_FILE ./%s' % include,
|
||||
'#undef TRACEPOINT_INCLUDE',
|
||||
'#define TRACEPOINT_INCLUDE "./%s"' % include,
|
||||
'',
|
||||
'#if !defined (TRACE_%s_GENERATED_UST_H) || \\' % group.upper(),
|
||||
' defined(TRACEPOINT_HEADER_MULTI_READ)',
|
||||
|
@ -136,7 +136,7 @@ static uint32_t cc_calc_subu(uint64_t borrow_out, uint64_t result)
|
||||
|
||||
static uint32_t cc_calc_add_64(int64_t a1, int64_t a2, int64_t ar)
|
||||
{
|
||||
if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar > 0)) {
|
||||
if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar >= 0)) {
|
||||
return 3; /* overflow */
|
||||
} else {
|
||||
if (ar < 0) {
|
||||
@ -151,7 +151,7 @@ static uint32_t cc_calc_add_64(int64_t a1, int64_t a2, int64_t ar)
|
||||
|
||||
static uint32_t cc_calc_sub_64(int64_t a1, int64_t a2, int64_t ar)
|
||||
{
|
||||
if ((a1 > 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
|
||||
if ((a1 >= 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
|
||||
return 3; /* overflow */
|
||||
} else {
|
||||
if (ar < 0) {
|
||||
@ -196,7 +196,7 @@ static uint32_t cc_calc_comp_64(int64_t dst)
|
||||
|
||||
static uint32_t cc_calc_add_32(int32_t a1, int32_t a2, int32_t ar)
|
||||
{
|
||||
if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar > 0)) {
|
||||
if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar >= 0)) {
|
||||
return 3; /* overflow */
|
||||
} else {
|
||||
if (ar < 0) {
|
||||
@ -211,7 +211,7 @@ static uint32_t cc_calc_add_32(int32_t a1, int32_t a2, int32_t ar)
|
||||
|
||||
static uint32_t cc_calc_sub_32(int32_t a1, int32_t a2, int32_t ar)
|
||||
{
|
||||
if ((a1 > 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
|
||||
if ((a1 >= 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
|
||||
return 3; /* overflow */
|
||||
} else {
|
||||
if (ar < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user