NetBSD Problem Report #43832

From jakllsch@siwenna.kollasch.net  Thu Sep  2 21:27:15 2010
Return-Path: <jakllsch@siwenna.kollasch.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 0430663BC5B
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  2 Sep 2010 21:27:14 +0000 (UTC)
Message-Id: <20100902212713.1CC7E106F2B@siwenna.kollasch.net>
Date: Thu,  2 Sep 2010 21:27:13 +0000 (UTC)
From: jakllsch@kollasch.net
Reply-To: jakllsch@kollasch.net
To: gnats-bugs@gnats.NetBSD.org
Subject: ssp causes common names to be defines
X-Send-Pr-Version: 3.95

>Number:         43832
>Category:       lib
>Synopsis:       stack protector causes 'read' to be a #define
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 02 21:30:01 +0000 2010
>Closed-Date:    Thu Jan 20 15:57:01 +0000 2011
>Last-Modified:  Thu Jan 20 15:57:01 +0000 2011
>Originator:     Jonathan A. Kollasch
>Release:        NetBSD 5.1_RC1
>Organization:
>Environment:
System: NetBSD siwenna.kollasch.net 5.1_RC1 NetBSD 5.1_RC1 (SIWENNA) #29: Mon Aug 23 23:38:05 UTC 2010 root@siwenna.kollasch.net:/local/siwenna/20100403/src/sys/arch/i386/compile/SIWENNA i386
Architecture: i386
Machine: i386
>Description:
Qemu can't be compiled with -fstack-protector (the default) because SSP
on NetBSD #defines read(2) in that case.   Qemu uses 'read' as a structure
element name.
>How-To-Repeat:
Build qemu git:
audio/audio.c:1166: error: 'struct audio_pcm_ops' has no member named '__read_alias
>Fix:
unknown

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: lib-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: lib/43832: ssp causes common names to be defines
Date: Fri, 3 Sep 2010 18:02:31 +0900

 > >Synopsis:       stack protector causes 'read' to be a #define
  :
 > audio/audio.c:1166: error: 'struct audio_pcm_ops' has no member named '__read_alias

 Not a real fix, but I have a set of files for qemu-0.13.0-rc0 on pkgsrc:
 http://www.ceres.dti.ne.jp/tsutsui/netbsd/pkgsrc-emulators-qemu-0.13.0-rc0.tar.gz
 that includes patches like:
 > -    bytes = sw->hw->pcm_ops->read (sw, buf, size);
 > +    bytes = (*sw->hw->pcm_ops->read)(sw, buf, size);

 Of course it won't be acceptable by third parties and
 we should have proper fix for __ssp_alias_func() in <ssp/unistd.h>.
 ---
 Izumi Tsutsui

From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/43832 CVS commit: pkgsrc/emulators/qemu
Date: Wed, 27 Oct 2010 13:24:10 +0000

 Module Name:	pkgsrc
 Committed By:	tsutsui
 Date:		Wed Oct 27 13:24:10 UTC 2010

 Modified Files:
 	pkgsrc/emulators/qemu: Makefile PLIST distinfo
 	pkgsrc/emulators/qemu/patches: patch-aa patch-ba patch-dd patch-ee
 Added Files:
 	pkgsrc/emulators/qemu/patches: patch-ef patch-eg patch-eh patch-ei
 	    patch-ej patch-ek patch-el patch-em patch-en patch-eo patch-ep
 	    patch-eq patch-er patch-es
 Removed Files:
 	pkgsrc/emulators/qemu/patches: patch-ab patch-dk

 Log Message:
 Update qemu to 0.13.0.  PR pkg/43994
 "Looks good" from wiz@ and obache@.

 ChangeLog for 0.13.0 is not updated but there is a list in announcement:

 This release consists of over 2,500 commits from 145 contributors.

 Some major features were added in this release including:

 - vhost-net: kernel-accelerating network backend for virtio devices (using KVM)
 - qmp: significant improvements covering most monitor commands
 - vnc: introduction of new encodings that dramatically improve bandwidth
   (part of GSoC project)
 - ivshmem: new shared memory device allowing multiple guests to share
   a memory region
 - mips: introduction of fulong mini-pc
 - virtio-9p: introduction of a paravirtual file system passthrough mechanism
 - hpet: many enhancements
 - target-s390: support for s390 usermode emulation
 - many more features and bug fixes

 A special note about QMP support in 0.13.0. QMP is still considered
 experimental in 0.13.0. There are no plans to change the protocol
 in an incompatible way but there are likely to be missing features.

 ChangeLog for version 0.12.5:

  - audio/alsa: Handle SND_PCM_STATE_SETUP in alsa_poll_handler
  - block: Handle multiwrite errors only when all requests have completed
  - block: Fix early failure in multiwrite
  - vpc: Use bdrv_(p)write_sync for metadata writes
  - vmdk: Use bdrv_(p)write_sync for metadata writes
  - qcow2: Use bdrv_(p)write_sync for metadata writes
  - qcow: Use bdrv_(p)write_sync for metadata writes
  - block: Add bdrv_(p)write_sync
  - qcow2: Restore L1 entry on l2_allocate failure
  - block/vdi: Fix image opening and creation for odd disk sizes
  - block/vpc: Fix conversion from size to disk geometry
  - qcow2: Remove abort on free_clusters failure
  - vmdk: Fix COW
  - qcow2: Fix creation of large images
  - vmdk: fix double free
  - qemu-options: add documentation for stdio signal=on|off
  - target-arm : fix parallel saturated subtraction implementation
  - target-arm : fix thumb2 parallel add/sub opcode decoding
  - target-arm: fix addsub/subadd implementation
  - target-i386: fix xchg rax,r8
  - block/vvfat.c: fix warnings with _FORTIFY_SOURCE
  - audio/alsa: Spelling typo (paramters)
  - target-mips: fix DINSU instruction
  - Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE
  - qcow2: Fix corruption after error in update_refcount
  - qcow2: Fix corruption after refblock allocation
  - block: Fix multiwrite with overlapping requests
  - qcow2: Fix error handling in l2_allocate
  - qcow2: Clear L2 table cache after write error
  - ide: Fix ide_dma_cancel
  - usb-bus: fix no params
  - Avoid crash on '-usbdevice <device>' without parameters
  - Fix -usbdevice crash
  - Fix multiboot compilation
  - Fix missing symbols in .rel/.rela.plt sections
  - target-ppc: fix RFI by clearing some bits of MSR
  - Fix typo in balloon help
  - arm_timer: fix oneshot mode
  - arm_timer: reload timer when enabled
  - qemu-sockets: avoid strlen of NULL pointer
  - block: fix aio_flush segfaults for read-only protocols (e.g. curl)
  - virtio-blk: fix barrier support
  - block: fix sector comparism in multiwrite_req_compare
  - pci: irq_state vmstate breakage
  - qemu-img: use the heap instead of the huge stack array for win32

 Pkgsrc changes:

 patch-aa
 patch-ao
 patch-ba
 patch-de
 patch-ed
  - lifted from previous (some adjustments per upstream changes)

 patch-ab
  - removed (looks similar fix applied in upstream)

 patch-dd
  - adjust configure for location of man page dir (as previous)
  - fix detection for arm hosts

 patch-dk
  - removed (looks no longer applicable due to reorganized upstream)

 patch-ee
  - remove old e1000.c fix (pulled up to upstream)
  - pull block/sheepdog.c build fix on *BSD hosts from upstream

 patch-ef
 patch-eg
 patch-eh
 patch-ei
  - workaround for conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
    (PR lib/43832: ssp causes common names to be defines)

 patch-ej
  - pull build/warning fixes in ui/vnc-enc-tight.c from upstream

 patch-ek
  - pull ATA PIO fix (by jakllsch@) from upstream
  - pull warning fix from upstream

 patch-el
  - workaround for missing C99 FP macro on netbsd-4
    (PR pkg/42899, but od(1) fixes for netbsd-4 not included)

 patch-em
 patch-en
  - build fix on NetBSD/arm host using gcc-4.1.3
    (built qemu binary on NetBSD/hpcarm host fails though)

 patch-eo
 patch-ep
 patch-er
 patch-es
  - pull ESP SCSI DMA fixes (that might affect sparc) from upstream

 patch-eq
  - pull ESP SCSI DMA fixes from upstream
  - disable broken ARC JAZZ floppy that causes hang on MIPS NT 4.0 guest

 Makefile
  - bump DISTNAME
  - add makeinfo to USE_TOOLS
    XXX: gets "qemu-doc.texi:7: warning: unrecognized encoding name `UTF-8'."
  - adjust SUBST_FILES.qaudio per upstream changes
  - enable nbd support *BSD per upstream update

 PLIST
 distinfo
  - update per each file


 To generate a diff of this commit:
 cvs rdiff -u -r1.73 -r1.74 pkgsrc/emulators/qemu/Makefile
 cvs rdiff -u -r1.22 -r1.23 pkgsrc/emulators/qemu/PLIST
 cvs rdiff -u -r1.60 -r1.61 pkgsrc/emulators/qemu/distinfo
 cvs rdiff -u -r1.7 -r1.8 pkgsrc/emulators/qemu/patches/patch-aa
 cvs rdiff -u -r1.13 -r0 pkgsrc/emulators/qemu/patches/patch-ab
 cvs rdiff -u -r1.2 -r1.3 pkgsrc/emulators/qemu/patches/patch-ba \
     pkgsrc/emulators/qemu/patches/patch-ee
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/emulators/qemu/patches/patch-dd
 cvs rdiff -u -r1.5 -r0 pkgsrc/emulators/qemu/patches/patch-dk
 cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/qemu/patches/patch-ef \
     pkgsrc/emulators/qemu/patches/patch-eg \
     pkgsrc/emulators/qemu/patches/patch-eh \
     pkgsrc/emulators/qemu/patches/patch-ei \
     pkgsrc/emulators/qemu/patches/patch-ej \
     pkgsrc/emulators/qemu/patches/patch-ek \
     pkgsrc/emulators/qemu/patches/patch-el \
     pkgsrc/emulators/qemu/patches/patch-em \
     pkgsrc/emulators/qemu/patches/patch-en \
     pkgsrc/emulators/qemu/patches/patch-eo \
     pkgsrc/emulators/qemu/patches/patch-ep \
     pkgsrc/emulators/qemu/patches/patch-eq \
     pkgsrc/emulators/qemu/patches/patch-er \
     pkgsrc/emulators/qemu/patches/patch-es

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Thu, 20 Jan 2011 10:57:01 -0500
State-Changed-Why:
fixed, thanks


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.