qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] df67aa: migration: add remaining params->has_


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] df67aa: migration: add remaining params->has_* = true in m...
Date: Tue, 02 Aug 2022 12:13:03 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: df67aa3e61e2c83459da7d815962d9706f1528fc
      
https://github.com/qemu/qemu/commit/df67aa3e61e2c83459da7d815962d9706f1528fc
  Author: Leonardo Bras <leobras@redhat.com>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: add remaining params->has_* = true in migration_instance_init()

Some of params->has_* = true are missing in migration_instance_init, this
causes migrate_params_check() to skip some tests, allowing some
unsupported scenarios.

Fix this by adding all missing params->has_* = true in
migration_instance_init().

Fixes: 69ef1f36b0 ("migration: define 'tls-creds' and 'tls-hostname' migration 
parameters")
Fixes: 1d58872a91 ("migration: do not wait for free thread")
Fixes: d2f1d29b95 ("migration: add support for a "tls-authz" migration 
parameter")
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220726010235.342927-1-leobras@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 777f53c75983dd10756f5dbfc8af50fe11da81c1
      
https://github.com/qemu/qemu/commit/777f53c75983dd10756f5dbfc8af50fe11da81c1
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M migration/ram.c
    M migration/trace-events

  Log Message:
  -----------
  Revert "migration: Simplify unqueue_page()"

This reverts commit cfd66f30fb0f735df06ff4220e5000290a43dad3.

The simplification of unqueue_page() introduced a bug that sometimes
breaks migration on s390x hosts.

The problem is not fully understood yet, but since we are already in
the freeze for QEMU 7.1 and we need something working there, let's
revert this patch for the upcoming release. The optimization can be
redone later again in a proper way if necessary.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2099934
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220802061949.331576-1-thuth@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: ead34f64f97d11626774a57863ca285a7ddc0d18
      
https://github.com/qemu/qemu/commit/ead34f64f97d11626774a57863ca285a7ddc0d18
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Assert that migrate_multifd_compression() returns an in-range value

Coverity complains that when we use the return value from
migrate_multifd_compression() as an array index:
  multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()];

that this might overrun the array (which is declared to have size
MULTIFD_COMPRESSION__MAX).  This is because the function return type
is MultiFDCompression, which is an autogenerated enum.  The code
generator includes the "one greater than the maximum possible value"
MULTIFD_COMPRESSION__MAX in the enum, even though this is not
actually a valid value for the enum, and this makes Coverity think
that migrate_multifd_compression() could return that __MAX value and
index off the end of the array.

Suppress the Coverity error by asserting that the value we're going
to return is within range.

Resolves: Coverity CID 1487239, 1487254
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220721115207.729615-2-peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 4bcb7de072fd8ab9de40b24aac00c7b6659f7f7d
      
https://github.com/qemu/qemu/commit/4bcb7de072fd8ab9de40b24aac00c7b6659f7f7d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M migration/block.c

  Log Message:
  -----------
  migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

When we use BLK_MIG_BLOCK_SIZE in expressions like
block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication
is done as 32 bits, because both operands are 32 bits.  Coverity
complains about possible overflows because we then accumulate that
into a 64 bit variable.

Define BLK_MIG_BLOCK_SIZE as unsigned long long using the ULL suffix.
The only two current uses of it with this problem are both in
block_save_pending(), so we could just cast to uint64_t there, but
using the ULL suffix is simpler and ensures that we don't
accidentally introduce new variants of the same issue in future.

Resolves: Coverity CID 1487136, 1487175
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220721115207.729615-3-peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: a21ba54dd5ca38cd05da9035fc65374d7af54f13
      
https://github.com/qemu/qemu/commit/a21ba54dd5ca38cd05da9035fc65374d7af54f13
  Author: Vivek Goyal <vgoyal@redhat.com>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  virtiofsd: Disable killpriv_v2 by default

We are having bunch of issues with killpriv_v2 enabled by default. First
of all it relies on clearing suid/sgid bits as needed by dropping
capability CAP_FSETID. This does not work for remote filesystems like
NFS (and possibly others).

Secondly, we are noticing other issues related to clearing of SGID
which leads to failures for xfstests generic/355 and generic/193.

Thirdly, there are other issues w.r.t caching of metadata (suid/sgid)
bits in fuse client with killpriv_v2 enabled. Guest can cache that
data for sometime even if cleared on server.

Second and Third issue are fixable. Just that it might take a little
while to get it fixed in kernel. First one will probably not see
any movement for a long time.

Given these issues, killpriv_v2 does not seem to be a good candidate
for enabling by default. We have already disabled it by default in
rust version of virtiofsd.

Hence this patch disabled killpriv_v2 by default. User can choose to
enable it by passing option "-o killpriv_v2".

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <YuPd0itNIAz4tQRt@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


  Commit: 430a388ef4a6e02e762a9c5f86c539f886a6a61a
      
https://github.com/qemu/qemu/commit/430a388ef4a6e02e762a9c5f86c539f886a6a61a
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M migration/block.c
    M migration/migration.c
    M migration/ram.c
    M migration/trace-events
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  Merge tag 'pull-migration-20220802c' of https://gitlab.com/dagrh/qemu into 
staging

Migration fixes pull 2022-08-02

Small migration (and virtiofsd) fixes.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAmLpR80ACgkQBRYzHrxb
# /edDiQ//VWx6VFpq3j/cFe+aZudCJWbHD5HI8e0wABoCAMzfYnRRq5pMP7DaVy/x
# Su0Lr6AO7vqSZzAqjsSm4DLQJHYM28YXxo0un/aJvnOZFGiXJzFe9OIE1LUwekQe
# g6OrsyhOAf7wHY9MsoC6RRitKdSo/z7YZYZY6wEv2cyIJDda1+b9jpD6mWADQ2z1
# 7eU5T0Kxfg2nArgF1MwgMWzPzjw4xN6BbqLLkWKdf3RD8Vl0BOdwxfXPDECqouUi
# 08vcNB4jRV7WSJ5mnOEW2EMQvgmUkSe9HUhMhkD39LmbeeJ4a84oRoKZkQuvrb1h
# qsbwoMlWhg8nxqyqB7ChTUw/27V3lfzlr/k6r6ExXsDL+zUwJXg4LrFuzyaqWdb2
# vH5cp/mZkSho+PcIF+KeFQMEj51yV/y0ucU4JWwyyKCnGoJYofmZnBWG2czGOotq
# 2qX44srufFkTDISpZ+NVUsaFl06nTrS7W9aTZdISYpGuxzHphOtrnYj8Pqqdwv4B
# F6CyNmUcVbLLnGIRASYYEYMByfptmiRQgGhOtv1IJyYgzIgg0PJQUR5Dbjgb96vR
# 0jhvLucKAkBrQaxkxxMVuIUJ9JdLeVbyEaSrc38qfr3FinRt8rgNr0mnFPAcNS7s
# oAy4Ei9jZ3MoAITs/JD+ODglC/f58o0oHaSA6RFrOxmxxkrXowk=
# =b2BF
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 02 Aug 2022 08:50:37 AM PDT
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" 
[full]

* tag 'pull-migration-20220802c' of https://gitlab.com/dagrh/qemu:
  virtiofsd: Disable killpriv_v2 by default
  migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long
  migration: Assert that migrate_multifd_compression() returns an in-range value
  Revert "migration: Simplify unqueue_page()"
  migration: add remaining params->has_* = true in migration_instance_init()

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/0399521e5333...430a388ef4a6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]