Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread patrick keshishian
Question, comment and a potential bug ... On Wed, Jul 16, 2014 at 04:54:49AM +, Doug Hogan wrote: === RCS file: /cvs/src/sys/arch/amd64/amd64/est.c,v retrieving revision 1.33 diff -u -p -d -r1.33 est.c ---

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Jean-Philippe Ouellet
For the cases where it's more than just nitems * sizeof(item), maybe it wouldn't be a bad idea to have something like: static __inline int MULT_OVERFLOWS(int x, int y) { const intmax_t max = 1UL sizeof(size_t) * 4; return ((x = max || y = max) x 0 SIZE_MAX / x y); } (or

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Doug Hogan
On Tue, Jul 15, 2014 at 11:34:01PM -0700, patrick keshishian wrote: For obvious cases such as this, is it worth converting? Maybe not. I left it since it is an array. might be safer to change this (in a separate diff) to: dc-dc_bs = mallocarray(ri-ri_rows, ri-ri_cols *

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Alexandre Ratchov
On Wed, Jul 16, 2014 at 04:54:49AM +, Doug Hogan wrote: + if ((fake_table = mallocarray(3, sizeof(struct est_op), It's not necessary to use mallocarray() for well known constants. Few examples below. --- sys/arch/i386/i386/est.c 12 Jul 2014 18:44:41 - 1.43 +++

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Gustav Fransson Nyvell
On 07/15/14 23:55, Philip Guenther wrote: On Tue, Jul 15, 2014 at 6:20 AM, Gustav Fransson Nyvell gus...@nyvell.se mailto:gus...@nyvell.se wrote: On 07/15/14 11:13, Peter Hessler wrote: On 2014 Jul 15 (Tue) at 10:25:49 +0200 (+0200), Gustav Fransson Nyvell wrote:

LibreSSL and GOST crypto

2014-07-16 Thread Dmitry Eremin-Solenikov
Hello, I have started looking into GOST (re)implementation for LibreSSL. I would like to know, how much do you want for LibreSSL to mimic the OpenSSL behaviour. Originally (thanks CryptoCom) GOST algorithms were implemented as a separate OpenSSL engine (to ease certification, to ease replacing

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Stuart Henderson
On 2014/07/16 09:53, Gustav Fransson Nyvell wrote: Hm, no, .xinitrc itself is the process that calls fork etc since it uses a lib that does this. Do you mean that you have replaced .xinitrc, which is documented as a file that should be a shell script, with binary object code? If so, the

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Philip Guenther
On Wed, Jul 16, 2014 at 2:53 AM, Gustav Fransson Nyvell gus...@nyvell.se wrote: On 07/15/14 23:55, Philip Guenther wrote: On Tue, Jul 15, 2014 at 6:20 AM, Gustav Fransson Nyvell gus...@nyvell.se wrote: On 07/15/14 11:13, Peter Hessler wrote: On 2014 Jul 15 (Tue) at 10:25:49 +0200

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Gustav Fransson Nyvell
On 07/16/14 10:31, Stuart Henderson wrote: On 2014/07/16 09:53, Gustav Fransson Nyvell wrote: Hm, no, .xinitrc itself is the process that calls fork etc since it uses a lib that does this. Do you mean that you have replaced .xinitrc, which is documented as a file that should be a shell script,

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Gustav Fransson Nyvell
On 07/16/14 10:31, Philip Guenther wrote: On Wed, Jul 16, 2014 at 2:53 AM, Gustav Fransson Nyvell gus...@nyvell.se mailto:gus...@nyvell.se wrote: On 07/15/14 23:55, Philip Guenther wrote: On Tue, Jul 15, 2014 at 6:20 AM, Gustav Fransson Nyvell gus...@nyvell.se

Re: LibreSSL portable 2.0.2 released.

2014-07-16 Thread Martin Hecht
On 07/16/2014 05:40 AM, Bob Beck wrote: We have release an update, LibreSSL 2.0.2 This release addresses the Linux forking and pid wrap issue reported recently in the press. As noted before, we welcome feedback from the broader community. Enjoy -Bob Hi, with 2.0.2 on Xubuntu 12.04 I

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Philip Guenther
On Wed, Jul 16, 2014 at 3:45 AM, Gustav Fransson Nyvell gus...@nyvell.se wrote: On 07/16/14 10:31, Philip Guenther wrote: On Wed, Jul 16, 2014 at 2:53 AM, Gustav Fransson Nyvell gus...@nyvell.se wrote: On 07/15/14 23:55, Philip Guenther wrote: ... So let's try that question

Re: LibreSSL portable 2.0.2 released.

2014-07-16 Thread Mark Kettenis
Date: Wed, 16 Jul 2014 11:03:12 +0200 From: Martin Hecht he...@hlrs.de On 07/16/2014 05:40 AM, Bob Beck wrote: We have release an update, LibreSSL 2.0.2 This release addresses the Linux forking and pid wrap issue reported recently in the press. As noted before, we welcome

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Gustav Fransson Nyvell
Oh, I see, that's exactly what's happened: you've hacked ksh to call a library that forks and your .xinitrc stopped working as a result. Doctor, it hurts when I poke myself with a fork() So don't do that! Philip Guenther No wonder you don't have time to code. -- This e-mail is

Re: Changing a running process' cmd name/argv[0]

2014-07-16 Thread Philip Guenther
On Wed, Jul 16, 2014 at 4:26 AM, Gustav Fransson Nyvell gus...@nyvell.se wrote: Oh, I see, that's exactly what's happened: you've hacked ksh to call a library that forks and your .xinitrc stopped working as a result. Doctor, it hurts when I poke myself with a fork() So don't do that!

Re: /etc/services records for squid cvsyncd

2014-07-16 Thread Craig R. Skinner
On 2014-07-15 Tue 22:11 PM |, Antoine Jacoutot wrote: I run both squid and cvsyncd and never needed these entries. Doubtful anyone _needs_ the Microsoft-SQL-* entries. Index: etc/services === RCS file:

Re: DNS control port additions to /etc/services

2014-07-16 Thread Craig R. Skinner
On 2014-07-15 Tue 16:04 PM |, Theo de Raadt wrote: On Tue, Jul 15, 2014 at 12:22:37PM +0100, Craig R. Skinner wrote: Suggestion of add NSD, Unbound BIND control ports to /etc/services: Makes sense to me. Anyone want to OK this? Index: etc/services

Re: DNS control port additions to /etc/services

2014-07-16 Thread Stuart Henderson
On 2014/07/16 11:02, Craig R. Skinner wrote: On 2014-07-15 Tue 16:04 PM |, Theo de Raadt wrote: On Tue, Jul 15, 2014 at 12:22:37PM +0100, Craig R. Skinner wrote: Suggestion of add NSD, Unbound BIND control ports to /etc/services: Makes sense to me. Anyone want to OK this?

Re: LibreSSL and GOST crypto

2014-07-16 Thread Dmitry Eremin-Solenikov
Hello, On Wed, Jul 16, 2014 at 12:29 PM, Dmitry Eremin-Solenikov dbarysh...@gmail.com wrote: I have started looking into GOST (re)implementation for LibreSSL. I would like to know, how much do you want for LibreSSL to mimic the OpenSSL behaviour. I have been pointed that I did not formulate

Re: LibreSSL and GOST crypto

2014-07-16 Thread Theo de Raadt
On Wed, Jul 16, 2014 at 12:29 PM, Dmitry Eremin-Solenikov dbarysh...@gmail.com wrote: I have started looking into GOST (re)implementation for LibreSSL. I would like to know, how much do you want for LibreSSL to mimic the OpenSSL behaviour. I have been pointed that I did not formulate

Re: LibreSSL portable 2.0.2 released.

2014-07-16 Thread Bob Beck
please commit that mark On Wed, Jul 16, 2014 at 3:14 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Wed, 16 Jul 2014 11:03:12 +0200 From: Martin Hecht he...@hlrs.de On 07/16/2014 05:40 AM, Bob Beck wrote: We have release an update, LibreSSL 2.0.2 This release addresses the

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Theo de Raadt
I would really really prefer if we can keep these as const*const conversions instead of const, const. We will see performance losses from doing this operation at runtime. On Wed, Jul 16, 2014 at 04:54:49AM +, Doug Hogan wrote: + if ((fake_table = mallocarray(3, sizeof(struct

Re: improve srandomdev

2014-07-16 Thread Lorenzo Beretta
On 07/13/2014 06:31 PM, Jean-Philippe Ouellet wrote: On Sun, Jul 13, 2014 at 04:03:53PM +0200, Brent Cook wrote: On Jul 13, 2014, at 3:58 PM, Ted Unangst t...@tedunangst.com wrote: @@ -411,6 +404,9 @@ static long random_l(void) { int32_t i; + + if (use_arc4random) +

Re: improve srandomdev

2014-07-16 Thread Theo de Raadt
On 07/13/2014 06:31 PM, Jean-Philippe Ouellet wrote: On Sun, Jul 13, 2014 at 04:03:53PM +0200, Brent Cook wrote: On Jul 13, 2014, at 3:58 PM, Ted Unangst t...@tedunangst.com wrote: @@ -411,6 +404,9 @@ static long random_l(void) { int32_t i; + + if (use_arc4random) +

Re: LibreSSL portable 2.0.2 released.

2014-07-16 Thread Mark Kettenis
From: Bob Beck b...@openbsd.org Date: Wed, 16 Jul 2014 07:55:16 -0600 please commit that mark committed to cvs (with HAVE_GETAUXVAL instead of HAVE_AUXVAL) guess one of you can do the magic to get this into the git repo? On Wed, Jul 16, 2014 at 3:14 AM, Mark Kettenis

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Mark Kettenis
From: Theo de Raadt dera...@cvs.openbsd.org Date: Wed, 16 Jul 2014 08:18:34 -0600 I would really really prefer if we can keep these as const*const conversions instead of const, const. Indeed, conversion to mallocarray only makes sence if one of the multiplication operands is a variable.

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Theo de Raadt
From: Theo de Raadt dera...@cvs.openbsd.org Date: Wed, 16 Jul 2014 08:18:34 -0600 I would really really prefer if we can keep these as const*const conversions instead of const, const. Indeed, conversion to mallocarray only makes sence if one of the multiplication operands is a

Re: PATCH: further kernel malloc - mallocarray

2014-07-16 Thread Theo de Raadt
static __inline int MULT_OVERFLOWS(int x, int y) { const intmax_t max = 1UL sizeof(size_t) * 4; return ((x = max || y = max) x 0 SIZE_MAX / x y); } (or maybe a macro version) in some public header someplace, and associated assertions it where applicable. The coding

mg: [macro.c:41]: (error) Memory pointed to by 'lp1' is freed twice.

2014-07-16 Thread Han Boetes
I recently used cppcheck on mg and I got this message: [macro.c:41]: (error) Memory pointed to by 'lp1' is freed twice. Looking at the code: /* free lines allocated for string arguments */ if (maclhead != NULL) { for (lp1 = maclhead-l_fp; lp1 != maclhead; lp1 = lp2) {

Re: LibreSSL portable 2.0.2 released.

2014-07-16 Thread Bob Beck
yep - running it now, it takes a few minutes On Wed, Jul 16, 2014 at 8:28 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: From: Bob Beck b...@openbsd.org Date: Wed, 16 Jul 2014 07:55:16 -0600 please commit that mark committed to cvs (with HAVE_GETAUXVAL instead of HAVE_AUXVAL) guess

Re: LibreSSL portable 2.0.2 released.

2014-07-16 Thread Jan Engelhardt
We have release an update, LibreSSL 2.0.2 This release addresses the Linux forking and pid wrap issue reported recently in the press. The newly-added /tests/asn1test fails to complete successfully under Linux when built as 32-bit object, in either a 32-bit userspace or on a multiarch. $

Re: mg: [macro.c:41]: (error) Memory pointed to by 'lp1' is freed twice.

2014-07-16 Thread Miod Vallat
I recently used cppcheck on mg and I got this message: [macro.c:41]: (error) Memory pointed to by 'lp1' is freed twice. Looking at the code: /* free lines allocated for string arguments */ if (maclhead != NULL) { for (lp1 = maclhead-l_fp; lp1 != maclhead; lp1 = lp2) {

Re: LibreSSL portable 2.0.2 released.

2014-07-16 Thread Miod Vallat
The newly-added /tests/asn1test fails to complete successfully under Linux when built as 32-bit object, in either a 32-bit userspace or on a multiarch. Indeed; the test was not 32-bit friendly. A length of 340 is correct in that case; I have fixed the test so that it behaves the same way on

[patch] sys/dev/ic/mfi.c

2014-07-16 Thread patrick keshishian
Hi, I think is a bug in sys/dev/ic/mfi.c noticed during PATCH: further kernel malloc - mallocarray review[1] I see the mallocarray() patch seems to have been applied. Want to make sure if this is in fact a bug, that it is not overlooked. Ignore if this is noise. Cheers, --patrick [1]

Re: lynx: disable old protocols

2014-07-16 Thread patric conant
What about the other direction, what about all the poeple who believe that lynx is the end-all, be-all choice for secure browsing, because they believe that it's the only browser that is held to the audit standards of being included in OpenBSD base. If it isn't, isn't there a responsibility to

Re: Probably you already know but http://www.openbsd.org/cgi-bin/cvsweb/ is returning HTTP 403 Forbidden

2014-07-16 Thread Bob Beck
I've disabled it due to persistant DOS attacks. It may come back later. On Wed, Jul 16, 2014 at 12:11 PM, Rafael Neves rafaelne...@gmail.com wrote: Hi Beck, Probably you already know http://www.openbsd.org/cgi-bin/cvsweb/ is returning HTTP 403 Forbidden. This is recent, maybe two or three

Re: improve srandomdev

2014-07-16 Thread Theo de Raadt
That is false. Please read the actual code. The new variation uses srandomdev() as an indicator that random() gets hooked direct to arc4random. The guts of the algorithm are never used again. I did, that's why fwiw and needed, as in look, you fixed a bug without noticing. Oh, ok.

Re: lynx: disable old protocols

2014-07-16 Thread Theo de Raadt
On Wed, 2014-07-16 at 13:56 -0500, patric conant wrote: I'd also like to point out that Shawn has broken the social contract here, it's well known that it's generally considered rude to direct developers, in this forum. Every single free or open-source software project I have ever used has

Re: usr.bin/man: use getlist(char *) instead of hand-rolled equivalent in config(char *)

2014-07-16 Thread Kent R. Spillner
*Bump* On Jul 10, 2014, at 12:34, Kent R. Spillner kspill...@acm.org wrote: Ping. On Wed, Jun 04, 2014 at 10:01:12AM -0500, Kent R. Spillner wrote: config(char *) contains a hand-rolled version of getlist(char *). The only difference is that the hand-rolled version includes a NULL

Re: ffs2 boot

2014-07-16 Thread Kent R. Spillner
*Bump* On Jul 10, 2014, at 12:33, Kent R. Spillner kspill...@acm.org wrote: Ping. On Thu, May 01, 2014 at 01:22:56PM -0500, Kent R. Spillner wrote: After sending my previous reply I noticed that you already committed your diff, so here are my comments again in the form of a proper diff:

Re: lynx: disable old protocols

2014-07-16 Thread STeve Andre'
On 07/16/14 17:00, Shawn K. Quinn wrote: On Wed, 2014-07-16 at 13:56 -0500, patric conant wrote: I'd also like to point out that Shawn has broken the social contract here, it's well known that it's generally considered rude to direct developers, in this forum. Every single free or open-source

Miscellaneous LibreSSL portability fixes

2014-07-16 Thread Jonas 'Sortie' Termansen
Hi, I ported libressl to my custom hobby OS and it has been a pleasant experience. Nonetheless, I did run into some minor portability problems that I wish to share: * apps/Makefile.am.tpl links libcrypto and libssl in the wrong order. The libssl library depends on libcrypto and libcrypto

Re: lynx: disable old protocols

2014-07-16 Thread Adam Thompson
For the rest of us who prefer to use software instead of demanding changes, this simply means using OpenBSD in a strictly-isolated environment becomes a bit more difficult. I'm still not willing to use Linux LiveCDs in certain environments for the most part, and I'll just get used to having

Re: lynx: disable old protocols

2014-07-16 Thread Theo de Raadt
For the rest of us who prefer to use software instead of demanding changes, this simply means using OpenBSD in a strictly-isolated environment becomes a bit more difficult. This statement makes no sense. Why would you strictly isolate the environment? Because you want security. In that

Re: Miscellaneous LibreSSL portability fixes

2014-07-16 Thread Steven Chamberlain
Hi, On 16/07/14 23:02, Jonas 'Sortie' Termansen wrote: * Consider using _DEFAULT_SOURCE or _ALL_SOURCE as feature macros on unknown platforms. * crypto/compat/issetugid_linux.c is used on non-Linux platforms. This fail on including glibc internal headers which is hardly elegant. Those

Re: lynx: disable old protocols

2014-07-16 Thread Amit Kulkarni
On Wed, Jul 16, 2014 at 4:00 PM, Shawn K. Quinn skqu...@rushpost.com wrote: On Wed, 2014-07-16 at 13:56 -0500, patric conant wrote: I'd also like to point out that Shawn has broken the social contract here, it's well known that it's generally considered rude to direct developers, in this

Re: Miscellaneous LibreSSL portability fixes

2014-07-16 Thread Brent Cook
Wow, this is a lot to go through, but I really do appreciate it. It may take me a bit to sort through these, Could send them to me as discrete patches (e.g. like a git send-email patch series)? That would make them easier to sort through and apply individually? On Jul 16, 2014, at 5:02 PM,

Re: Miscellaneous LibreSSL portability fixes

2014-07-16 Thread Philip Guenther
On Thu, 17 Jul 2014, Jonas 'Sortie' Termansen wrote: I ported libressl to my custom hobby OS and it has been a pleasant experience. Nonetheless, I did run into some minor portability problems that I wish to share: To respond to selected items... * apps/Makefile.am.tpl links libcrypto and

Re: Miscellaneous LibreSSL portability fixes

2014-07-16 Thread Bob Beck
Hi Jonas, While you make a few good points and they will be considered, but really, custom hobby os is not really on our radar right now. We have our hands full enough with portable dealing with the major distros and libc's, and fending off all the haters. On Wed, Jul 16, 2014 at 4:02 PM, Jonas

Re: Miscellaneous LibreSSL portability fixes

2014-07-16 Thread Bob Beck
Steve, sorry, but GNU/kFreeBSD is not going to happen right now. We are too busy with other things. On Wed, Jul 16, 2014 at 6:26 PM, Steven Chamberlain ste...@pyro.eu.org wrote: Hi, On 16/07/14 23:02, Jonas 'Sortie' Termansen wrote: * Consider using _DEFAULT_SOURCE or _ALL_SOURCE as feature

Re: Probably you already know but http://www.openbsd.org/cgi-bin/cvsweb/ is returning HTTP 403 Forbidden

2014-07-16 Thread patrick keshishian
On 7/16/14, Bob Beck b...@obtuse.com wrote: I've disabled it due to persistant DOS attacks. It may come back later. wait ... what? you helping'em? :P --patrick On Wed, Jul 16, 2014 at 12:11 PM, Rafael Neves rafaelne...@gmail.com wrote: Hi Beck, Probably you already know

Re: Probably you already know but http://www.openbsd.org/cgi-bin/cvsweb/ is returning HTTP 403 Forbidden

2014-07-16 Thread Philip Guenther
On Wed, Jul 16, 2014 at 11:01 PM, patrick keshishian pkesh...@gmail.com wrote: On 7/16/14, Bob Beck b...@obtuse.com wrote: I've disabled it due to persistant DOS attacks. It may come back later. wait ... what? you helping'em? :P In the times that you've come back from 15 hours of travel