Re: Build 32 bit binaries on amd64

2012-08-21 Thread C. Bergström
On 08/21/12 09:32 AM, Dan McGregor wrote: Hi. I've been working on porting compiler-rt/clang's support for address sanitization (asan) to FreeBSD. So far I have it building and it appears to work properly, however the build system expects to be able to build 32 bit binaries on amd64. amd64

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Wojciech Puchar
Even without this tagging, the code to do a structure level copy of 6 bytes is going to be tiny... true. just to make sure it will be absolutely portable how about bcopymacaddress(dst,src) and then define it whatever you find it fastest on any architecture?

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Konstantin Belousov
On Mon, Aug 20, 2012 at 08:32:41PM -0600, Dan McGregor wrote: Hi. I've been working on porting compiler-rt/clang's support for address sanitization (asan) to FreeBSD. So far I have it building and it appears to work properly, however the build system expects to be able to build 32 bit

Re: Replacing BIND with unbound

2012-08-21 Thread Dag-Erling Smørgrav
Doug Barton do...@freebsd.org writes: Dag-Erling, do you have a timeline for getting started on the ldns/unbound import? I imported the code into the vendor tree, but did not proceed any further as there was still no firm consensus at the time. I believe the conclusion - to the extent that

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Marius Strobl
On Mon, Aug 20, 2012 at 05:46:12PM +0300, Mitya wrote: Hi. I found some overhead code in /src/sys/net/if_ethersubr.c and /src/sys/netgraph/ng_ether.c It contains strings, like bcopy(src, dst, ETHER_ADDR_LEN); When src and dst are struct ether_addr*, and ETHER_ADDR_LEN equal 6. This code

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Luigi Rizzo
On Tue, Aug 21, 2012 at 12:26:30PM +0200, Marius Strobl wrote: ... Why we are use bcopy(), to copy only 6 bytes? Answer - in some architectures we are can not directly copy unaligned data. I propose this solution. In file /usr/src/include/net/ethernet.h add this lines: static

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Marius Strobl
On Mon, Aug 20, 2012 at 01:20:29PM -0600, Warner Losh wrote: On Aug 20, 2012, at 1:17 PM, Wojciech Puchar wrote: or use ++. i think it is always aligned to 2 bytes and this should produce usable code on any CPU? should be 6 instructions on MIPS and PPC IMHO. We should tag it as

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Mitya
20.08.2012 22:20, Warner Losh написал: On Aug 20, 2012, at 1:17 PM, Wojciech Puchar wrote: or use ++. i think it is always aligned to 2 bytes and this should produce usable code on any CPU? should be 6 instructions on MIPS and PPC IMHO. We should tag it as __aligned(2) then, no? If so,

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Mitya
21.08.2012 14:26, Marius Strobl написал: On Mon, Aug 20, 2012 at 01:20:29PM -0600, Warner Losh wrote: On Aug 20, 2012, at 1:17 PM, Wojciech Puchar wrote: or use ++. i think it is always aligned to 2 bytes and this should produce usable code on any CPU? should be 6 instructions on MIPS and

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Warner Losh
On Aug 21, 2012, at 5:26 AM, Marius Strobl wrote: On Mon, Aug 20, 2012 at 01:20:29PM -0600, Warner Losh wrote: On Aug 20, 2012, at 1:17 PM, Wojciech Puchar wrote: or use ++. i think it is always aligned to 2 bytes and this should produce usable code on any CPU? should be 6

Help needed with possible kernel memory leak (FreeBSD 9.0 Release)

2012-08-21 Thread Remme
Hi All, Please help to solve a kernel memory leak problem. After few weeks searching forums and googling any help is welcome. Here is the problem description: We are installed the latest 9.0 FreeBSD with all recent patches. Ports tree is also up to date. Host running a nginx, php-fpm, memcached,

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread John Baldwin
On Monday, August 20, 2012 10:46:12 am Mitya wrote: Hi. I found some overhead code in /src/sys/net/if_ethersubr.c and /src/sys/netgraph/ng_ether.c It contains strings, like bcopy(src, dst, ETHER_ADDR_LEN); When src and dst are struct ether_addr*, and ETHER_ADDR_LEN equal 6. This code call

Re: Build 32 bit binaries on amd64

2012-08-21 Thread John Baldwin
On Tuesday, August 21, 2012 4:49:30 am Konstantin Belousov wrote: On Mon, Aug 20, 2012 at 08:32:41PM -0600, Dan McGregor wrote: Hi. I've been working on porting compiler-rt/clang's support for address sanitization (asan) to FreeBSD. So far I have it building and it appears to work

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Dan McGregor
My solution is certainly fairly hacky, I just took inspiration from NetBSD. I wanted to see if it could be done. While I was there I did identify several files that should be common between i386 and amd64, such as exec.h. Since reading your email I started looking at the x86 common code, and

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Warner Losh
On Aug 21, 2012, at 1:42 AM, Wojciech Puchar wrote: Even without this tagging, the code to do a structure level copy of 6 bytes is going to be tiny... true. just to make sure it will be absolutely portable how about bcopymacaddress(dst,src) and then define it whatever you find

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Dan McGregor
I think I agree now. The more code shared between archtectures the better. I've committed some patches to my github freebsd fork that merge exec.h, asm.h and ucontex.h into x86. I'll probably do more later tonight. On 21 August 2012 07:44, John Baldwin j...@freebsd.org wrote: On Tuesday,

Re: Help needed with possible kernel memory leak (FreeBSD 9.0 Release)

2012-08-21 Thread Adrian Chadd
FWIW - there's lots of statistics and some dtrace scripts + output here. So for those knowlegable in this area, this forum thread is well worth your time. Adrian On 21 August 2012 07:42, Remme adscomp...@gmail.com wrote: Hi All, Please help to solve a kernel memory leak problem. After few

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Adrian Chadd
Hi, What about just creating an ETHER_ADDR_COPY(dst, src) and putting that in a relevant include file, then hide the ugliness there? The same benefits will likely appear when copying wifi MAC addresses to/from headers. Thanks, I'm glad someone noticed this. Adrian

Re: Replacing BIND with unbound

2012-08-21 Thread Bjoern A. Zeeb
On Tue, 21 Aug 2012, Dag-Erling Smørgrav wrote: Doug Barton do...@freebsd.org writes: Dag-Erling, do you have a timeline for getting started on the ldns/unbound import? I imported the code into the vendor tree, but did not proceed any further as there was still no firm consensus at the time.

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Nathan Whitehorn
On 08/21/12 08:44, John Baldwin wrote: On Tuesday, August 21, 2012 4:49:30 am Konstantin Belousov wrote: On Mon, Aug 20, 2012 at 08:32:41PM -0600, Dan McGregor wrote: Hi. I've been working on porting compiler-rt/clang's support for address sanitization (asan) to FreeBSD. So far I have it

Re: Replacing BIND with unbound

2012-08-21 Thread Doug Barton
On 8/21/2012 10:11 AM, Bjoern A. Zeeb wrote: On Tue, 21 Aug 2012, Dag-Erling Smørgrav wrote: Doug Barton do...@freebsd.org writes: Dag-Erling, do you have a timeline for getting started on the ldns/unbound import? I imported the code into the vendor tree, but did not proceed any further

Re: Replacing BIND with unbound

2012-08-21 Thread Bjoern A. Zeeb
On Tue, 21 Aug 2012, Doug Barton wrote: On 8/21/2012 10:11 AM, Bjoern A. Zeeb wrote: On Tue, 21 Aug 2012, Dag-Erling Smørgrav wrote: Doug Barton do...@freebsd.org writes: Dag-Erling, do you have a timeline for getting started on the ldns/unbound import? I imported the code into the vendor

Re: Replacing BIND with unbound

2012-08-21 Thread Doug Barton
On 8/21/2012 11:08 AM, Bjoern A. Zeeb wrote: On Tue, 21 Aug 2012, Doug Barton wrote: Neither importing ldns nor removing BIND is going to have any effect on the stub resolver library in libc. Yes it does as if we are not carefull, we'll neither have a _proper_ validating caching resolver

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Bruce Evans
On Mon, Aug 20, 2012 at 05:46:12PM +0300, Mitya wrote: Hi. I found some overhead code in /src/sys/net/if_ethersubr.c and /src/sys/netgraph/ng_ether.c It contains strings, like bcopy(src, dst, ETHER_ADDR_LEN); When src and dst are struct ether_addr*, and ETHER_ADDR_LEN equal 6. Only

Re: Build 32 bit binaries on amd64

2012-08-21 Thread Dan McGregor
How do the unified powerpc headers work? Is it just one architecture for both PowerPC and 64 bit PowerPC? If so, was that tijl's ultimate goal? One architecture for i386 and AMD64? On the unifying headers front, I've make a bunch of progress towards merging i386 and amd64 headers into x86;

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Bruce Evans
luigi wrote: even more orthogonal: I found that copying 8n + (5, 6 or 7) bytes was much much slower than copying a multiple of 8 bytes. For n=0, 1,2,4,8 bytes are efficient, other cases are slow (turned into 2 or 3 different writes). The netmap code uses a pkt_copy routine that does

Re: Replace bcopy() to update ether_addr

2012-08-21 Thread Bruce Evans
jhb wrote: On Monday, August 20, 2012 10:46:12 am Mitya wrote: ... I propose this solution. In file /usr/src/include/net/ethernet.h add this lines: static inline void ether_addr_copy(ether_addr* src, ether_addr* dst) { #if defined(__i386__) || defined(__amd64__) *dst =

Re: projects/armv6 merged to HEAD

2012-08-21 Thread George Neville-Neil
On Aug 17, 2012, at 05:24 , Robert Watson rwat...@freebsd.org wrote: On Thu, 16 Aug 2012, Oleksandr Tymoshenko wrote: projects/armv6 branch was merged to HEAD and should be considered dead now. This patch is a result of a joint effort by many people. Including but not limited to: