Re: dc(1): smaller jump table

2017-11-26 Thread Otto Moerbeek
Thanks for the diffs. I'll try to process them this week starting with the more simple ones, -Otto On Sun, Nov 26, 2017 at 07:23:24PM +, kshe wrote: > Hi, > > The jump table used in dc/bcode.c is technically off by one, which leads > to the following harmless inconsistency: > >

Re: freezero(3) for stdio's internal buffers

2017-11-26 Thread kshe
On Mon, 27 Nov 2017 00:42:01 +, Theo de Raadt wrote: > This needs worst-case performance measurements. The only instances where performance could be a problem are in vfprintf.c and vfwprintf.c, where the calls happen inside a loop; but for these, in fact, the best solution would be to use

Re: hide wpakey from root by default

2017-11-26 Thread Stefan Sperling
On Mon, Nov 27, 2017 at 01:31:17AM +0100, Stefan Sperling wrote: > On Sun, Nov 26, 2017 at 06:17:14PM +0100, Jeremie Courreges-Anglas wrote: > > > > I don't think anything has been committed regarding this issue, right? > > Nope. > > I've been discussing this with people in person. > Will

Re: nc: exit client after server shutdown socket

2017-11-26 Thread Klemens Nanni
On Mon, Nov 27, 2017 at 12:37:16AM +0100, Alexander Bluhm wrote: > On Sun, Nov 26, 2017 at 09:58:48PM +0100, Klemens Nanni wrote: > > On Sun, Nov 26, 2017 at 09:17:11PM +0100, Alexander Bluhm wrote: > > > On Sun, Nov 26, 2017 at 03:52:33PM +0100, Klemens Nanni wrote: > > > > nc as client keeps

Re: freezero(3) for stdio's internal buffers

2017-11-26 Thread Theo de Raadt
This needs worst-case performance measurements.

Re: hide wpakey from root by default

2017-11-26 Thread Stefan Sperling
On Sun, Nov 26, 2017 at 06:17:14PM +0100, Jeremie Courreges-Anglas wrote: > > I don't think anything has been committed regarding this issue, right? Nope. I've been discussing this with people in person. Will summarize those discussions and send a new diff soon. (We've just got net in the

Re: freezero(3) for stdio's internal buffers

2017-11-26 Thread kshe
On Sun, 26 Nov 2017 19:56:03 +, kshe wrote: > Hi, > > Shortly after recallocarray(3) was introduced, it was put into use for > several objects internal to the stdio library "to avoid leaving detritus > in memory when resizing buffers". However, in the end, this memory is > still released by

Re: nc: exit client after server shutdown socket

2017-11-26 Thread Alexander Bluhm
On Sun, Nov 26, 2017 at 09:58:48PM +0100, Klemens Nanni wrote: > On Sun, Nov 26, 2017 at 09:17:11PM +0100, Alexander Bluhm wrote: > > On Sun, Nov 26, 2017 at 03:52:33PM +0100, Klemens Nanni wrote: > > > nc as client keeps sending after the server shutdown the socket: > > > > Yes, that is a half

Re: nc: exit client after server shutdown socket

2017-11-26 Thread Klemens Nanni
On Sun, Nov 26, 2017 at 09:17:11PM +0100, Alexander Bluhm wrote: > On Sun, Nov 26, 2017 at 03:52:33PM +0100, Klemens Nanni wrote: > > nc as client keeps sending after the server shutdown the socket: > > Yes, that is a half closed connection. Server has shutdown, but > client is still sending.

Remove MALLOC_DEBUG left overs

2017-11-26 Thread Klemens Nanni
dlg@ removed MALLOC_DEBUG about two weeks ago but malloc(9) still has it, I see no point in documenting absent features so let's remove those bits until reimplemented. I stripped another usage in ddb(4) but left the remaining two users in tree unchanged as they haven't been touched since their

Re: ksh(1): kill the "version" function

2017-11-26 Thread Jeremie Courreges-Anglas
On Sun, Nov 26 2017, Theo Buehler wrote: > On Sun, Nov 26, 2017 at 08:18:04PM +0100, Anton Lindqvist wrote: >> While at it, another gem: in Vi normal mode typing ^V inserts the >> version string. Does not seem to be documented either. > > Yes, can we please zap it? It's

Re: ksh(1): kill the "version" function

2017-11-26 Thread Theo Buehler
On Sun, Nov 26, 2017 at 08:18:04PM +0100, Anton Lindqvist wrote: > While at it, another gem: in Vi normal mode typing ^V inserts the > version string. Does not seem to be documented either. Yes, can we please zap it? It's utterly annoying, as I regularly trigger it when I want to edit the command

Re: nc: exit client after server shutdown socket

2017-11-26 Thread Alexander Bluhm
On Sun, Nov 26, 2017 at 03:52:33PM +0100, Klemens Nanni wrote: > nc as client keeps sending after the server shutdown the socket: Yes, that is a half closed connection. Server has shutdown, but client is still sending. This is a TCP feature made accessible by the nc tool. > tedu@ introduced

dc(1): smaller jump table

2017-11-26 Thread kshe
Hi, The jump table used in dc/bcode.c is technically off by one, which leads to the following harmless inconsistency: $ printf '\376' | dc dc: \xfe (0376) is unimplemented $ printf '\377' | dc dc: internal error: opcode 255 This could be fixed by making it hold

dc(1): simplify print_ascii()

2017-11-26 Thread kshe
Hi, The sign of a BIGNUM is irrelevant when inspecting its bit representation. Also, the construct if (BN_is_negative(v)) BN_set_negative(v, 0); was already redundant since a mere BN_set_negative(v, 0); would have been enough to do the same thing. In any

dc(1): earlier pledge

2017-11-26 Thread kshe
Hi, There is no need to keep "rpath" when executing scripts given as arguments to the `-e' option if no additional file was supplied. Index: dc.c === RCS file: /cvs/src/usr.bin/dc/dc.c,v retrieving revision 1.18 diff -u -p -r1.18

freezero(3) for stdio's internal buffers

2017-11-26 Thread kshe
Hi, Shortly after recallocarray(3) was introduced, it was put into use for several objects internal to the stdio library "to avoid leaving detritus in memory when resizing buffers". However, in the end, this memory is still released by plain free(3) calls. The same reason that motivated the

dc(1) mishandles fractional input in bases other than 10

2017-11-26 Thread kshe
Hi, The following behaviour seems unacceptable to me. $ dc -e '16dio .C .C0 f' .C0 .B $ dc -e '8dio .3 .30 .300 f' .3000 .275 .23 This bug affects all bases other than 10 and increasing the scale with the `k' command does not prevent it.

sed.1: miscellaneous corrections

2017-11-26 Thread kshe
Hi, I noticed a certain number of inaccuracies within the manual page for sed. The diff below corrects to most obvious ones, although further improvements are certainly possible. Additionally, the script given in the EXAMPLES section being already quite unnecessarily contrived (as it does in

dc(1): dead store

2017-11-26 Thread kshe
Hi, This assignment is useless. Index: bcode.c === RCS file: /cvs/src/usr.bin/dc/bcode.c,v retrieving revision 1.51 diff -u -p -r1.51 bcode.c --- bcode.c 26 Feb 2017 11:29:55 - 1.51 +++ bcode.c 26 Oct 2017 04:44:01

dc(1): minor cleanup

2017-11-26 Thread kshe
Hi, The diff below encompasses three unrelated minor changes. 1. Merge the not_equal(), not_less() and not_greater() functions into their caller; these functions cannot be called from the jump table, so it is confusing to define them as if they could. 2. Make warnings consistent by using

dc(1): floor(log_10(x)) should not cost more than O(log(log(x)))

2017-11-26 Thread kshe
Hi, The `Z' command can be a handy shortcut for computing logarithms; as such, for example, it is the basis of the implementation of bc(1)'s `l' function. However, the algorithm currently used in count_digits() is too naive to be really useful, becoming rapidly much slower than what would be

Re: ksh(1): kill the "version" function

2017-11-26 Thread Anton Lindqvist
On Sun, Nov 26, 2017 at 07:27:37PM +0100, Jeremie Courreges-Anglas wrote: > On Tue, Nov 21 2017, Anton Lindqvist wrote: > > Hi, > > While writing tests for the Emacs editing mode in ksh I discovered some > > potential errors in the manual: > > > > - Sync the order of key

Re: ksh(1): kill the "version" function

2017-11-26 Thread Ingo Schwarze
Hi Jeremie, Jeremie Courreges-Anglas wrote on Sun, Nov 26, 2017 at 07:27:37PM +0100: > Here's a diff to remove that function. OK schwarze@. > If people want to keep and > document it I would not object, but I don't really see the point. Indeed. It is part of a specific interactive module, so

Re: hide wpakey from root by default

2017-11-26 Thread Ted Unangst
Jeremie Courreges-Anglas wrote: > > I don't think anything has been committed regarding this issue, right? this looks ok to me.

ksh(1): kill the "version" function

2017-11-26 Thread Jeremie Courreges-Anglas
On Tue, Nov 21 2017, Anton Lindqvist wrote: > Hi, > While writing tests for the Emacs editing mode in ksh I discovered some > potential errors in the manual: > > - Sync the order of key bindings in emacs.c with the manual > > - ^W is bound to delete-word-backward and not

Re: openssl s_time, speed: use monotime for absolute interval measurement

2017-11-26 Thread Jeremie Courreges-Anglas
On Sun, Nov 26 2017, Jeremie Courreges-Anglas wrote: > On Sat, Nov 25 2017, Brent Cook wrote: >> Thanks guys. This will make enabling this on the odder platforms in >> portable easier. > > NB: if we want to able to mix app_tminterval() for real and user time,

Re: openssl s_time, speed: use monotime for absolute interval measurement

2017-11-26 Thread Jeremie Courreges-Anglas
On Sat, Nov 25 2017, Brent Cook wrote: > Thanks guys. This will make enabling this on the odder platforms in > portable easier. NB: if we want to able to mix app_tminterval() for real and user time, the static storage used for "start" should be different. This is not the case

Re: hide wpakey from root by default

2017-11-26 Thread Jeremie Courreges-Anglas
I don't think anything has been committed regarding this issue, right? On Sat, Nov 18 2017, Stuart Henderson wrote: > On 2017/11/17 18:28, Ted Unangst wrote: >> Stefan Sperling wrote: >> > Or is modifying ifconfig sufficient? >> > We are more concerned about textual

Re: diff for ssh/sftp/scp -j

2017-11-26 Thread Holger Mikolon
> Date: Sun, 26 Nov 2017 02:09:13 > From: Sebastian Benoit > To: Holger Mikolon > Cc: tech@openbsd.org > Subject: Re: diff for ssh/sftp/scp -j > > Holger Mikolon(hol...@mikolon.com) on 2017.11.25 23:16:54 +0100: > > Hi tech@ > > > > at work I can ssh

armv7/sxie: enable phy-supply

2017-11-26 Thread Artturi Alm
Hi, unless i failed w/grep, only 4 boards with dts in u-boot/linux need this, but i've got one of those, so this would be much appreciated:) -Artturi diff --git a/sys/arch/armv7/sunxi/sxie.c b/sys/arch/armv7/sunxi/sxie.c index 116fda5f8d7..b5edab31a09 100644 --- a/sys/arch/armv7/sunxi/sxie.c

Re: Could not savecore after reproducible crash - solved

2017-11-26 Thread Jeremie Courreges-Anglas
On Sun, Nov 26 2017, Christopher Zimmermann wrote: > This 'crash' can be prevented by turning ddb.console off. So there's still a bug. ddb.console=1 shouldn't crash the host. :) > Sorry for the noise. > I'm still wondering why I could not recover the dump. (No idea

Re: FUSE: fuse_lookup doesn't check access on create

2017-11-26 Thread Martin Pieuchot
On 26/11/17(Sun) 20:19, Helg wrote: > Hi tech@ > > It should not be possible to create a file or directory if write > permission is denied on the parent directory of the file or directory to > be created. However, FUSE does not perform an access check when the new > vnode lookup is performed and

nc: exit client after server shutdown socket

2017-11-26 Thread Klemens Nanni
nc as client keeps sending after the server shutdown the socket: $ /dev/null Connection closed by foreign host. [1] + Done nc -Nl 5000 < /dev/null With the following diff nc will properly exit again as it used to. Feedback? diff --git

Re: Regulators as sensors?

2017-11-26 Thread Artturi Alm
On Tue, Nov 21, 2017 at 10:31:47PM +0100, Mark Kettenis wrote: > The diff below exposes voltage regulators as sensors. This makes it > easy to look at the current settings of these regulators. The > downside is that these aren't really sensors as the voltages are not > actually measured. > >

FUSE: fuse_lookup doesn't check access on create

2017-11-26 Thread Helg
Hi tech@ It should not be possible to create a file or directory if write permission is denied on the parent directory of the file or directory to be created. However, FUSE does not perform an access check when the new vnode lookup is performed and always allows files and directory to be created

Re: Could not savecore after reproducible crash - solved

2017-11-26 Thread Christopher Zimmermann
This 'crash' can be prevented by turning ddb.console off. Sorry for the noise. I'm still wondering why I could not recover the dump. -- http://gmerlin.de OpenPGP: http://gmerlin.de/christopher.pub F190 D013 8F01 AA53 E080 3F3C F17F B0A1 D44E 4FEE

Re: diff for ssh/sftp/scp -j

2017-11-26 Thread Jiri B
On Sat, Nov 25, 2017 at 11:16:54PM +0100, Holger Mikolon wrote: > Hi tech@ > > at work I can ssh (hence cvs) to public servers only via a ProxyCommand > specified in /etc/ssh/ssh_config. > > However, with the ProxyCommand set I cannot ssh into servers in the > internal network. So I end up

Could not savecore after reproducible crash

2017-11-26 Thread Christopher Zimmermann
Hi, I can reliably reproduce a panic in the isa serial com port driver, but cannot recover the dumped core -> savecore: no core dump. The serial console log is attached below. What else can I try? Christopher ddb> show registers ds 0x10 es 0x10 fs

libfuse: support -f option

2017-11-26 Thread Helg
This patch adds support for the -f option, which forces the FUSE file system to run in the foreground. This is useful for debugging and adds a missing feature to the library. ok? Index: fuse.c === RCS file: