Re: CVS commit: src/sys/dev/pci

2012-08-30 Thread Masanobu SAITOH
Hi. (2012/08/30 7:06), Paul Goyette wrote: On Wed, 29 Aug 2012, Paul Goyette wrote: On Wed, 29 Aug 2012, Manuel Bouyer wrote: Module Name:src Committed By:bouyer Date:Wed Aug 29 20:39:24 UTC 2012 Modified Files: src/sys/dev/pci: if_wm.c if_wmreg.h Log Message: Make

Re: CVS commit: src/sys/dev/pci

2012-08-30 Thread Paul Goyette
On Thu, 30 Aug 2012, Masanobu SAITOH wrote: BTW, reason I am asking is that I had previously (about a year or so ago) needed to disable the offload functions on the 82574 because it wasn't working. This commit seems to imply that it fixes only the I350 so I was wondering if some other change

Re: CVS commit: src

2012-08-30 Thread Christos Zoulas
In article 20120830121650.5695217...@cvs.netbsd.org, Matthias Drochner source-changes-d@NetBSD.org wrote: -=-=-=-=-=- Module Name: src Committed By: drochner Date: Thu Aug 30 12:16:49 UTC 2012 Modified Files: src/include: string.h src/lib/libc/string: Makefile.inc

Re: CVS commit: src

2012-08-30 Thread M.Drochner
Why not explicit_memset() consttime_memcmp()? memset() and memcmp()'s semantics both don't fit too well: The former forces to carry that mostly useless fill pattern argument around, which could be in the way of optimization. memcmp() promises to be usable for alphabetical sorting which would

Re: CVS commit: src/usr.bin/config

2012-08-30 Thread Izumi Tsutsui
Modified Files: src/usr.bin/config: config.1 main.c Log Message: make config -x look at the booted kernel first. Probably it's better to use #if !defined(HAVE_NBTOOL_CONFIG_H) rather than #ifdef __NetBSD__ ? --- Izumi Tsutsui

Re: CVS commit: src/sys/dev/pci

2012-08-30 Thread Manuel Bouyer
On Thu, Aug 30, 2012 at 04:54:19AM -0700, Paul Goyette wrote: On Thu, 30 Aug 2012, Masanobu SAITOH wrote: BTW, reason I am asking is that I had previously (about a year or so ago) needed to disable the offload functions on the 82574 because it wasn't working. This commit seems to imply that

Re: CVS commit: src

2012-08-30 Thread Christos Zoulas
On Aug 30, 2:51pm, m.droch...@fz-juelich.de (m.droch...@fz-juelich.de) wrote: -- Subject: Re: CVS commit: src | memset() and memcmp()'s semantics both don't fit too well: | The former forces to carry that mostly useless fill pattern argument around, | which could be in the way of optimization.

Re: CVS commit: src/usr.bin/config

2012-08-30 Thread Christos Zoulas
On Aug 31, 12:02am, tsut...@ceres.dti.ne.jp (Izumi Tsutsui) wrote: -- Subject: Re: CVS commit: src/usr.bin/config | Probably it's better to use #if !defined(HAVE_NBTOOL_CONFIG_H) | rather than #ifdef __NetBSD__ ? I'll have to think about it a little more (i.e. what's the scenario of building

Re: CVS commit: src

2012-08-30 Thread Joerg Sonnenberger
On Thu, Aug 30, 2012 at 02:12:24PM +, Christos Zoulas wrote: I would prefer not to proliferate the b* function names in the future. Why not explicit_memset() consttime_memcmp()? It is not like the old b* functions have clear semantics or consistent prototypes! I fully agree. Joerg

Re: CVS commit: src

2012-08-30 Thread David Holland
On Thu, Aug 30, 2012 at 11:44:41AM -0400, Christos Zoulas wrote: | memcmp() promises to be usable for alphabetical sorting which would make | a constant-time algorithm needlessly complicated and is not of use for | the intended applications. memcmp() does not promise alphabetical

Re: CVS commit: src

2012-08-30 Thread Taylor R Campbell
Date: Thu, 30 Aug 2012 18:01:06 + From: David Holland dholland-sourcechan...@netbsd.org On Thu, Aug 30, 2012 at 11:44:41AM -0400, Christos Zoulas wrote: int consttime_memcmp(const void *s1, const void *s2, size_t n) [snip] so, I evidently missed this: what's

Re: CVS commit: src

2012-08-30 Thread Taylor R Campbell
Date: Thu, 30 Aug 2012 11:44:41 -0400 From: chris...@zoulas.com (Christos Zoulas) memcmp() does not promise alphabetical sorting. It just promises to do the byte comparison as unsigned so that the results are consistent. It is not complicated to do this at all, for example: int

Re: CVS commit: src

2012-08-30 Thread David Holland
On Thu, Aug 30, 2012 at 06:03:28PM +, Taylor R Campbell wrote: On Thu, Aug 30, 2012 at 11:44:41AM -0400, Christos Zoulas wrote: int consttime_memcmp(const void *s1, const void *s2, size_t n) [snip] so, I evidently missed this: what's consttime about this?

Re: CVS commit: src

2012-08-30 Thread Christos Zoulas
In article 20120830170609.14dd160...@jupiter.mumble.net, Taylor R Campbell campbell+netbsd-source-change...@mumble.net wrote: Date: Thu, 30 Aug 2012 11:44:41 -0400 From: chris...@zoulas.com (Christos Zoulas) memcmp() does not promise alphabetical sorting. It just promises to do the

Re: CVS commit: src

2012-08-30 Thread Taylor R Campbell
Date: Thu, 30 Aug 2012 18:44:31 + (UTC) From: chris...@astron.com (Christos Zoulas) In article 20120830170609.14dd160...@jupiter.mumble.net, Taylor R Campbell campbell+netbsd-source-change...@mumble.net wrote: Date: Thu, 30 Aug 2012 11:44:41 -0400 From:

Re: CVS commit: src

2012-08-30 Thread Taylor R Campbell
Date: Thu, 30 Aug 2012 19:51:13 +0100 From: David Laight da...@l8s.co.uk FWIW which versions of memset() aren't 'constant time' ? Apart from ones that try not to dirty pages. The issue with memset isn't timing attacks, but rather that the C compiler is likely to optimize away the

Re: CVS commit: src

2012-08-30 Thread David Laight
On Thu, Aug 30, 2012 at 07:03:43PM +, Taylor R Campbell wrote: The issue with memset isn't timing attacks, but rather that the C compiler is likely to optimize away the apparently useless memset from code that looks like this, and thereby leave keys floating about in RAM: {

Re: CVS commit: src

2012-08-30 Thread David Holland
On Thu, Aug 30, 2012 at 06:39:35PM +, Taylor R Campbell wrote: Date: Thu, 30 Aug 2012 18:32:34 + From: David Holland dholland-sourcechan...@netbsd.org On Thu, Aug 30, 2012 at 06:03:28PM +, Taylor R Campbell wrote: It means that the time it takes does not vary