Skip to content

Commit

Permalink
Merge commit 'c9159fe9aa9abe24115ea4d16127179e9cb07e22' into upstream…
Browse files Browse the repository at this point in the history
…-merge

* commit 'c9159fe9aa9abe24115ea4d16127179e9cb07e22': (83 commits)
  Remove libhw
  rtc: implement century byte
  rtc: map CMOS index 0x37 to 0x32 on read and writes
  rtc: fix overflow in mktimegm
  qtest: implement QTEST_STOP
  qemu-barrier: Fix compiler version check for future gcc versions
  doc: update HACKING wrt strncpy/pstrcpy
  hw/r2d: add comment: this strncpy use is ok
  qcow2: mark this file's sole strncpy use as justified
  acpi: remove strzcpy (strncpy-identical) function; just use strncpy
  libcacard/vcard_emul_nss: use pstrcpy in place of strncpy
  qemu-ga: prefer pstrcpy: consistently NUL-terminate ifreq.ifr_name
  vscsi: avoid unwarranted strncpy
  virtio-9p: avoid unwarranted uses of strncpy
  bt: replace fragile snprintf use and unwarranted strncpy
  ui/vnc: simplify and avoid strncpy
  linux-user: remove two unchecked uses of strdup
  ppc: avoid buffer overrun: use pstrcpy, not strncpy
  os-posix: avoid buffer overrun
  lm32: avoid buffer overrun
  ...

Conflicts:
	hw/Makefile.objs

Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
matosatti committed Oct 11, 2012
2 parents 487a26a + c9159fe commit caaef9b
Show file tree
Hide file tree
Showing 113 changed files with 4,286 additions and 854 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ trace-dtrace.dtrace
*-linux-user
*-bsd-user
libdis*
libhw32
libhw64
libuser
linux-headers/asm
qapi-generated
Expand Down
9 changes: 5 additions & 4 deletions HACKING
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ emulators.

4. String manipulation

Do not use the strncpy function. According to the man page, it does
*not* guarantee a NULL-terminated buffer, which makes it extremely dangerous
to use. Instead, use functionally equivalent function:
void pstrcpy(char *buf, int buf_size, const char *str)
Do not use the strncpy function. As mentioned in the man page, it does *not*
guarantee a NULL-terminated buffer, which makes it extremely dangerous to use.
It also zeros trailing destination bytes out to the specified length. Instead,
use this similar function when possible, but note its different signature:
void pstrcpy(char *dest, int dest_buf_size, const char *src)

Don't use strcat because it can't check for buffer overflows, but:
char *pstrcat(char *buf, int buf_size, const char *s)
Expand Down
5 changes: 5 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,11 @@ M: Gerd Hoffmann <[email protected]>
S: Maintained
F: hw/usb*

VFIO
M: Alex Williamson <[email protected]>
S: Supported
F: hw/vfio*

vhost
M: Michael S. Tsirkin <[email protected]>
S: Supported
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)

qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)

QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
QEMULIBS=libuser libdis libdis-user

clean:
# avoid old build problems by removing potentially incorrect old files
Expand Down
23 changes: 0 additions & 23 deletions Makefile.hw

This file was deleted.

9 changes: 3 additions & 6 deletions Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,13 @@ common-obj-y += hw/
common-obj-y += ui/
common-obj-y += bt-host.o bt-vhci.o

common-obj-y += dma-helpers.o
common-obj-y += iov.o acl.o
common-obj-$(CONFIG_POSIX) += compatfd.o
common-obj-y += notify.o event_notifier.o
common-obj-y += qemu-timer.o qemu-timer-common.o
common-obj-y += qtest.o
common-obj-y += vl.o

common-obj-$(CONFIG_SLIRP) += slirp/

Expand All @@ -115,11 +118,6 @@ user-obj-y += qemu-user.o
user-obj-y += $(trace-obj-y)
user-obj-y += qom/

######################################################################
# libhw

hw-obj-y = vl.o dma-helpers.o qtest.o hw/

######################################################################
# libdis
# NOTE: the disassembler code is only needed for debugging
Expand Down Expand Up @@ -240,7 +238,6 @@ vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
QEMU_CFLAGS+=$(GLIB_CFLAGS)

nested-vars += \
hw-obj-y \
qga-obj-y \
block-obj-y \
qom-obj-y \
Expand Down
4 changes: 0 additions & 4 deletions Makefile.target
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ include ../config-host.mak
include config-devices.mak
include config-target.mak
include $(SRC_PATH)/rules.mak
ifneq ($(HWDIR),)
include $(HWDIR)/config.mak
endif

$(call set-vpath, $(SRC_PATH))
ifdef CONFIG_LINUX
Expand Down Expand Up @@ -157,7 +154,6 @@ all-obj-y += $(addprefix ../, $(universal-obj-y))
ifdef CONFIG_SOFTMMU
all-obj-y += $(addprefix ../, $(common-obj-y))
all-obj-y += $(addprefix ../libdis/, $(libdis-y))
all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
all-obj-y += $(addprefix ../, $(trace-obj-y))
else
all-obj-y += $(addprefix ../libuser/, $(user-obj-y))
Expand Down
Loading

0 comments on commit caaef9b

Please sign in to comment.