amd64/86229: Missing recvmsg syscall in freebsd32 API causes sshd crash on amd64

Phil Regnauld regnauld at catpipe.net
Tue Nov 1 01:30:20 PST 2005


The following reply was made to PR amd64/86229; it has been noted by GNATS.

From: Phil Regnauld <regnauld at catpipe.net>
To: bug-followup at FreeBSD.org, jhb at freebsd.org
Cc:  
Subject: Re: amd64/86229: Missing recvmsg syscall in freebsd32 API causes sshd crash on amd64
Date: Tue, 1 Nov 2005 10:19:20 +0100

 John Baldwin <jhb at FreeBSD.org> wrote:
 > 
 > I haven't tested it on amd64 at all (hopefully the freebsd32 part 
 > compiles :-P), but here is a patch to add a kern_recvit() function and use it 
 > to implement freebsd32_recvmsg().  Note that I'm not sure that some other 
 > functions like sendmsg() actually work correctly for freebsd32 as they are 
 > copying in a 32-bit msghdr and expecting it to be a 64-bit msghdr.
 > 
 > http://www.FreeBSD.org/~jhb/patches/freebsd32_recvmsg.patch
 
 Hi there,
 
 Didn't get to test on HEAD yet...  I am attempting to patch 6.0 first (that's
 what I run on the production box).  It fails there -- is it easily fixable
 or should I just drop it and try -CURRENT ?
 
 During kernel build:
 
 cc -c -O2 -frename-registers -pipe -fno-strict-aliasing  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -std=c99  -nostdinc -I-  -I. -I../../.. -I../../../contrib/dev/acpica -I../../../contrib/altq -I../../../contrib/ipfilter -I../../../contrib/pf -I../../../contrib/dev/ath -I../../../contrib/dev/ath/freebsd -I../../../contrib/ngatm -I../../../dev/twa -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -f no-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000  -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Werror  ../../../compat/freebsd32/freebsd32_misc.c
 ../../../compat/freebsd32/freebsd32_misc.c: In function `freebsd32_copyiniov':
 ../../../compat/freebsd32/freebsd32_misc.c:820: error: request for member `iov_base' in something not a structure or union
 ../../../compat/freebsd32/freebsd32_misc.c:821: error: request for member `iov_len' in something not a structure or union
 ../../../compat/freebsd32/freebsd32_misc.c: In function `freebsd32_copyinmsghdr':
 ../../../compat/freebsd32/freebsd32_misc.c:855: warning: passing arg 1 of `freebsd32_copyiniov' makes pointer from integer without a cast
 ../../../compat/freebsd32/freebsd32_misc.c: In function `freebsd32_copyoutmsghdr':
 ../../../compat/freebsd32/freebsd32_misc.c:870: error: `error' undeclared (first use in this function)
 ../../../compat/freebsd32/freebsd32_misc.c:870: error: (Each undeclared identifier is reported only once
 ../../../compat/freebsd32/freebsd32_misc.c:870: error: for each function it appears in.)
 ../../../compat/freebsd32/freebsd32_misc.c: At top level:
 ../../../compat/freebsd32/freebsd32_misc.c:877: warning: function declaration isn't a prototype
 ../../../compat/freebsd32/freebsd32_misc.c: In function `freebsd32_recvmsg':
 ../../../compat/freebsd32/freebsd32_misc.c:889: error: dereferencing pointer to incomplete type
 ../../../compat/freebsd32/freebsd32_misc.c:892: error: invalid type argument of `->'
 ../../../compat/freebsd32/freebsd32_misc.c:893: error: invalid type argument of `->'
 ../../../compat/freebsd32/freebsd32_misc.c:896: error: dereferencing pointer to incomplete type
 ../../../compat/freebsd32/freebsd32_misc.c:899: error: dereferencing pointer to incomplete type
 ../../../compat/freebsd32/freebsd32_misc.c:902: error: dereferencing pointer to incomplete type
 ../../../compat/freebsd32/freebsd32_misc.c:884: warning: unused variable `msg32'
 
 
 
 -- 
   _ _ |_ | regnauld at catpipe.net                   catpipe Systems ApS   |
  (_(_||_ |          *BSD solutions, consulting, development             |
          | Tlf.: +45 7021 0050                  http://www.catpipe.net/ |


More information about the freebsd-amd64 mailing list