Re: CVS commit: src/sbin/cgdconfig

2022-05-17 Thread Robert Elz
Please test it. In HEAD today, and last week, and for probably a long time back into the past, /sbin/cgdconfig has threads, and /rescue/cgdconfig does not. I don"t know when argon2 support was added, or how to use it, but if you do, it should be simple to create an cgd in vnd using one, and then

Re: CVS commit: src/sbin/cgdconfig

2022-05-17 Thread nia
On Mon, May 16, 2022 at 09:10:40AM +, Taylor R Campbell wrote: > Surely `disabling threads' just means cgdconfig can't take advantage > of parallelism to compute the same function in less time, not that > cgdconfig computes a different function or fails to compute the same > function, no? >

Re: CVS commit: src/sbin/cgdconfig

2022-05-16 Thread Robert Elz
Date:Mon, 16 May 2022 09:10:40 + From:Taylor R Campbell Message-ID: <20220516090946.a3c4660...@jupiter.mumble.net> | > Please re-enable threads. They influence the output hash | > so by disabling threads you stop people from being able | > to decrypt their

Re: CVS commit: src/sbin/cgdconfig

2022-05-16 Thread Christos Zoulas
> On May 16, 2022, at 5:10 AM, Taylor R Campbell wrote: > >> Date: Mon, 16 May 2022 04:49:22 + >> From: nia >> >> On Sun, May 15, 2022 at 03:53:27PM -0400, Christos Zoulas wrote: >>> Log Message: >>> Build argon2 inline so that crunched programs work. I also disabled threads >>> for now;

Re: CVS commit: src/sbin/cgdconfig

2022-05-16 Thread Taylor R Campbell
> Date: Mon, 16 May 2022 04:49:22 + > From: nia > > On Sun, May 15, 2022 at 03:53:27PM -0400, Christos Zoulas wrote: > > Log Message: > > Build argon2 inline so that crunched programs work. I also disabled threads > > for now; we can put them back if needed. > > Please re-enable threads.

Re: CVS commit: src/sbin/cgdconfig

2022-05-15 Thread nia
On Sun, May 15, 2022 at 03:53:27PM -0400, Christos Zoulas wrote: > Log Message: > Build argon2 inline so that crunched programs work. I also disabled threads > for now; we can put them back if needed. Please re-enable threads. They influence the output hash so by disabling threads you stop people

Re: CVS commit: src/sbin/cgdconfig

2021-11-29 Thread Joerg Sonnenberger
On Sun, Nov 28, 2021 at 07:42:55AM -0800, Jason Thorpe wrote: > > > > On Nov 27, 2021, at 6:01 PM, Christos Zoulas wrote: > > > > Module Name:src > > Committed By: christos > > Date: Sun Nov 28 02:01:30 UTC 2021 > > > > Modified Files: > > src/sbin/cgdconfig:

Re: CVS commit: src/sbin/cgdconfig

2021-11-28 Thread Christos Zoulas
> On Nov 28, 2021, at 11:57 AM, Roland Illig wrote: > > Am 28.11.2021 um 17:37 schrieb Jason Thorpe: >>> On Nov 28, 2021, at 8:05 AM, Christos Zoulas >>> wrote: >>> >>> 1. which compilation flag should we add -pthread to? CFLAGS or >>> COPTS? What about c++? >> >> GCC defines some preprocessor

Re: CVS commit: src/sbin/cgdconfig

2021-11-28 Thread Roland Illig
Am 28.11.2021 um 17:37 schrieb Jason Thorpe: On Nov 28, 2021, at 8:05 AM, Christos Zoulas wrote: 1. which compilation flag should we add -pthread to? CFLAGS or COPTS? What about c++? GCC defines some preprocessor macros in response to -pthread, so … CPPFLAGS? Perhaps a better choice is to

Re: CVS commit: src/sbin/cgdconfig

2021-11-28 Thread Jason Thorpe
> On Nov 28, 2021, at 8:05 AM, Christos Zoulas wrote: > > The change is correct; this is how it is done everywhere else in the tree. > You are right about -pthread doing more than adding -lpthread, but > in that case, the -pthread should be added to CFLAGS/COPTS etc, > not LDADD so that it

Re: CVS commit: src/sbin/cgdconfig

2021-11-28 Thread Christos Zoulas
The change is correct; this is how it is done everywhere else in the tree. You are right about -pthread doing more than adding -lpthread, but in that case, the -pthread should be added to CFLAGS/COPTS etc, not LDADD so that it is effective during the compilation phase too, not just the link

Re: CVS commit: src/sbin/cgdconfig

2021-11-28 Thread Jason Thorpe
> On Nov 27, 2021, at 6:01 PM, Christos Zoulas wrote: > > Module Name: src > Committed By: christos > Date: Sun Nov 28 02:01:30 UTC 2021 > > Modified Files: > src/sbin/cgdconfig: Makefile > > Log Message: > -lpthread to LDADD (fixes lint build) This change is wrong. The

Re: CVS commit: src/sbin/cgdconfig

2018-12-29 Thread Christoph Badura
On Sat, Dec 29, 2018 at 01:33:23PM +, Alexander Nasonov wrote: > Christoph Badura wrote: > > On Thu, Dec 27, 2018 at 10:41:55PM +, Alexander Nasonov wrote: > > > Perhaps the simplest change would be to pass an unresolved (original) > > > name when composing a paramsfile. E.g. > > > > > >

Re: CVS commit: src/sbin/cgdconfig

2018-12-29 Thread Christoph Badura
On Thu, Dec 27, 2018 at 10:41:55PM +, Alexander Nasonov wrote: > Perhaps the simplest change would be to pass an unresolved (original) > name when composing a paramsfile. E.g. > > /etc/cgd/NAME=mylabel > /etc/cgd/ROOT.e Alas, this will break existing installations that e.g. use /etc/cgd/dkNN

Re: CVS commit: src/sbin/cgdconfig

2018-12-27 Thread Alexander Nasonov
Christoph Badura wrote: > Using /etc/cgd/ROOT. has the advantage that the cgd will configure > if the root device changes name, thus upholding POLA. > > E.g. moving disks from a controller that attaches sd(4)s to one that > attaches ld(4)s. I believe you can see that when dd'ing an image from >

Re: CVS commit: src/sbin/cgdconfig

2018-12-27 Thread Christoph Badura
On Thu, Dec 27, 2018 at 09:53:44PM +, Alexander Nasonov wrote: > Alexander Nasonov wrote: > > XXX Default paramsfile for NAME=label is /etc/cgd/dkNN (resolved wedge > > partition) and /etc/cgd/ROOT. for ROOT.. This isn't yet > > documented. IMO, it should be the other way around:

Re: CVS commit: src/sbin/cgdconfig

2018-07-27 Thread Alexander Nasonov
Robert Elz wrote: > Module Name: src > Committed By: kre > Date: Sat May 5 11:28:44 UTC 2018 > > Modified Files: > src/sbin/cgdconfig: cgdconfig.c > > Log Message: > Check whether the cgd device selected is available to be > configured,that is, not already in use, before

Re: CVS commit: src/sbin/cgdconfig

2018-05-09 Thread Alexander Nasonov
matthew green wrote: > "Alexander Nasonov" writes: > > XXX Using memset for wiping isn't a good idea because memset is likely > > optimised away by gcc. This should be revisited. > > use explicit_memset(3)? Yes, we should change memsets of sensitive buffers to explicit_memset but we also should

re: CVS commit: src/sbin/cgdconfig

2018-05-09 Thread matthew green
"Alexander Nasonov" writes: > Module Name: src > Committed By: alnsn > Date: Wed May 9 18:11:56 UTC 2018 > > Modified Files: > src/sbin/cgdconfig: cgdconfig.8 cgdconfig.c > > Log Message: > Add '-e' option (echo the passphrase) and wipe the passphrase after use. > > XXX Using

Re: CVS commit: src/sbin/cgdconfig

2018-05-09 Thread Robert Elz
Date:Wed, 9 May 2018 08:59:55 +0100 From:Alexander Nasonov Message-ID: <20180509075955.GA7743@neva> | Adding (argc > 0) check before calling opendisk1 fixes the crash. Thanks - and I see what is wrong now, but (for whatever reason) that did not

Re: CVS commit: src/sbin/cgdconfig

2018-05-09 Thread Alexander Nasonov
Alexander Nasonov wrote: > (gdb) b opendisk1 > (gdb) run -p > Starting program: > /home/alnsn/netbsd-current/clean/src/sbin/cgdconfig/obj/cgdconfig -p > > Breakpoint 1, 0x7f7ff78111f6 in opendisk1 () from /lib/libutil.so.7 > (gdb) x/s $rdi > 0x0: # path=NULL Adding (argc > 0) check

Re: CVS commit: src/sbin/cgdconfig

2018-05-09 Thread Alexander Nasonov
Robert Elz wrote: > Date:Tue, 8 May 2018 19:15:28 +0100 > From:Alexander Nasonov > Message-ID: <20180508180815.GA5990@neva> > > | I think it broke the tool. If you run > | > | cgdconfig -p > | > | it will crash. > > Sorry, I cannot

Re: CVS commit: src/sbin/cgdconfig

2018-05-08 Thread Robert Elz
Date:Tue, 8 May 2018 19:15:28 +0100 From:Alexander Nasonov Message-ID: <20180508180815.GA5990@neva> | I think it broke the tool. If you run | | cgdconfig -p | | it will crash. Sorry, I cannot reproduce this, it looks to work OK to me. Can

Re: CVS commit: src/sbin/cgdconfig

2018-05-08 Thread Robert Elz
Date:Tue, 8 May 2018 19:15:28 +0100 From:Alexander Nasonov Message-ID: <20180508180815.GA5990@neva> | I think it broke the tool. If you run | cgdconfig -p | it will crash. I shall take a look. kre

Re: CVS commit: src/sbin/cgdconfig

2018-05-08 Thread Alexander Nasonov
Robert Elz wrote: > Module Name: src > Committed By: kre > Date: Sat May 5 11:28:44 UTC 2018 > > Modified Files: > src/sbin/cgdconfig: cgdconfig.c > > Log Message: > Check whether the cgd device selected is available to be > configured,that is, not already in use, before