qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] pci *_by_mask() coverity fix
@ 2022-07-26 16:32 Peter Maydell
  2022-07-26 16:32 ` [PATCH 1/2] pci: Remove unused pci_get_*_by_mask() functions Peter Maydell
  2022-07-26 16:32 ` [PATCH 2/2] pci: Sanity check mask argument to pci_set_*_by_mask() Peter Maydell
  0 siblings, 2 replies; 9+ messages in thread
From: Peter Maydell @ 2022-07-26 16:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin, Marcel Apfelbaum

This patchset fixes a Coverity nit relating to the
pci_set_*_by_mask() helper functions, where we might shift off the
end of a variable if the caller passes in a bogus mask argument.
Patch 2 is the coverity fix (adding an assert() to help Coverity
out a bit and to catch potential future actual bugs). Patch 1
removes the _get_ versions of the functions, because they've been
in the tree for a decade and never had any callers at any point
in those 10 years :-)

thanks
-- PMM

Peter Maydell (2):
  pci: Remove unused pci_get_*_by_mask() functions
  pci: Sanity check mask argument to pci_set_*_by_mask()

 include/hw/pci/pci.h | 48 +++++++++++++++-----------------------------
 1 file changed, 16 insertions(+), 32 deletions(-)

-- 
2.25.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-08-17 12:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26 16:32 [PATCH 0/2] pci *_by_mask() coverity fix Peter Maydell
2022-07-26 16:32 ` [PATCH 1/2] pci: Remove unused pci_get_*_by_mask() functions Peter Maydell
2022-07-26 22:27   ` Richard Henderson
2022-07-26 16:32 ` [PATCH 2/2] pci: Sanity check mask argument to pci_set_*_by_mask() Peter Maydell
2022-07-26 21:29   ` Philippe Mathieu-Daudé via
2022-07-26 22:30   ` Richard Henderson
2022-07-27 10:26     ` Peter Maydell
2022-08-17 10:48       ` Michael S. Tsirkin
2022-08-17 12:31         ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).