[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 188df5: chardev/char-mux: shift unsigned long
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 188df5: chardev/char-mux: shift unsigned long to avoid 32-... |
Date: |
Mon, 02 Dec 2024 08:16:22 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 188df56eab8ed960e407762e31a35fc666355132
https://github.com/qemu/qemu/commit/188df56eab8ed960e407762e31a35fc666355132
Author: Roman Penyaev <r.peniaev@gmail.com>
Date: 2024-12-02 (Mon, 02 Dec 2024)
Changed paths:
M chardev/char-mux.c
Log Message:
-----------
chardev/char-mux: shift unsigned long to avoid 32-bit overflow
Allthough the size of MAX_MUX is equal to 4 and likely will never
change, this patch changes type of constant to unsigned long to
be on the safe side.
Also add a static compile check that MAX_MUX never bigger than
`sizeof(d->mux_bitset) * BITS_PER_BYTE`.
Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Reviewed-by: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Cc: qemu-devel@nongnu.org
Message-ID: <20241129103239.464061-2-r.peniaev@gmail.com>
Commit: e6214fd6d48e704ed3aed6ea2053a9756d0ca13f
https://github.com/qemu/qemu/commit/e6214fd6d48e704ed3aed6ea2053a9756d0ca13f
Author: Roman Penyaev <r.peniaev@gmail.com>
Date: 2024-12-02 (Mon, 02 Dec 2024)
Changed paths:
M chardev/char-mux.c
Log Message:
-----------
chardev/char-mux: make boolean bit check instead of find_next_bit()
This patch simplifies (and makes less confusing) bit checks by
replacing `find_next_bit()` calls with boolean AND operation.
Resolves: Coverity CID 1563776
Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Reviewed-by: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Cc: qemu-devel@nongnu.org
Message-ID: <20241129103239.464061-3-r.peniaev@gmail.com>
Commit: 412df552860f196f0dd51f5cd621ce721705caa5
https://github.com/qemu/qemu/commit/412df552860f196f0dd51f5cd621ce721705caa5
Author: Peter Maydell <peter.maydell@linaro.org>
Date: 2024-12-02 (Mon, 02 Dec 2024)
Changed paths:
M chardev/char-mux.c
Log Message:
-----------
Merge tag 'chr-pull-request' of https://gitlab.com/marcandre.lureau/qemu into
staging
chardev patch queue
# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmdNp4EcHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5WsaD/92DwK0nKM7HqbqQOHN
# lR715V8ve16+mWYZnWA4jQvclFUigg0Xbxl6d6adsK5QnW2nDGgjf3cXsCngUx7K
# jNCmynQrpmUx7a7BRgXylEl5zN/HLeVvk2Qb4Jg8EAkRK0utK1Aerlx6CV2fzbR/
# zDslP+C7ELk9evNwWx6PZRgeOii0sL7lto67J4a5Iri2IU4yi9zI/irEIxeE4cDT
# P3KFXYsgbm86VC6HaOBWw5+d5JyPr2hVHxvKMpI4YNyU/f2RHdhfqgsLS1gms2Yz
# JBuh8DpIq0E+rdQp4ofH5SBPuOFxg7SgDFAyqgHerDd4uAwUafyOfAEVy2hpZmNT
# 3JlavSMb2SFhWboMUu9B+gRHC+sc7YCoPZEhaIaciW3XaC/S1JJi/fvB8gcugBDs
# lgTUIDEsXLMcgXaFNKbRXpuLG5eXRnzaQ4Y9Gr/3yEvY8eSZ6+x3EDwSMGfg/Ta1
# OW+h09AvWfJR5eZ13x+5CCMFRs8RgQN/D+mxYt3cZ/SdNSBci/4By54IGEgGCCM8
# xoTAqcd2kbpHg2S/MTx7O7OPNC38TbUaOWDR6u0qO0ZXqZA6OdlC+g/Z1uu7ZMqA
# FkOTQZuDDgOOhpsmLy4v3nKmFBQNJAPVyfph88DE1QyrU5nVCS55lyTy/ZH2hayL
# RCVbI20jrgEJoi44EFdFu6QP/Q==
# =0vex
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 02 Dec 2024 12:26:41 GMT
# gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg: issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>"
[full]
# gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>"
[full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5
* tag 'chr-pull-request' of https://gitlab.com/marcandre.lureau/qemu:
chardev/char-mux: make boolean bit check instead of find_next_bit()
chardev/char-mux: shift unsigned long to avoid 32-bit overflow
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Compare: https://github.com/qemu/qemu/compare/72b88908d12e...412df552860f
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications