Re: Race in disk_attach_callback?

2022-09-02 Thread Klemens Nanni
On Mon, Aug 29, 2022 at 07:51:24PM +, Miod Vallat wrote: > > What's the status on this diff? > > I'm waiting for review from at least one of the softraid suspects prior > to putting this in, in case there are further cinematics to address. Sounds like a good idea. In the meantime, while

Re: Race in disk_attach_callback?

2022-08-29 Thread Miod Vallat
> What's the status on this diff? I'm waiting for review from at least one of the softraid suspects prior to putting this in, in case there are further cinematics to address.

Re: Race in disk_attach_callback?

2022-08-25 Thread Klemens Nanni
On Thu, Aug 18, 2022 at 08:29:13AM +, Klemens Nanni wrote: > On Wed, Aug 17, 2022 at 07:03:50AM +, Miod Vallat wrote: > > > What is the result if root runs disklabel, and forces it to all zeros? > > > > If the root duid is all zeroes, then the only way to refer to the root > > disk is to

Re: Race in disk_attach_callback?

2022-08-18 Thread Klemens Nanni
On Tue, Aug 16, 2022 at 09:03:55PM +, Miod Vallat wrote: > > after a prompt from stsp@ and florian@, reporting that newfs_msdos > > fails when given an $duid.i argument, I set down to see what could be > > going on. My test using an USB stick failed to reprdouce the problem. > > Then I started

Re: Race in disk_attach_callback?

2022-08-18 Thread Klemens Nanni
On Wed, Aug 17, 2022 at 07:03:50AM +, Miod Vallat wrote: > > What is the result if root runs disklabel, and forces it to all zeros? > > If the root duid is all zeroes, then the only way to refer to the root > disk is to use its /dev/{s,w}d* device name, as zero duids are ignored. I like

Re: Race in disk_attach_callback?

2022-08-17 Thread Miod Vallat
> What is the result if root runs disklabel, and forces it to all zeros? If the root duid is all zeroes, then the only way to refer to the root disk is to use its /dev/{s,w}d* device name, as zero duids are ignored. If you set a zero duid in disklabel(8), setdisklabel() in the kernel will

Re: Race in disk_attach_callback?

2022-08-17 Thread Theo de Raadt
Miod Vallat wrote: > Come to think further about it, I think it is better for diskmap to > always trust disk drivers to either : > - not have any label (dk_label == NULL, or points to zeroed memory) > or > - have a valid label (duid is not zeroes). What is the result if root runs disklabel, and

Re: Race in disk_attach_callback?

2022-08-17 Thread Miod Vallat
Come to think further about it, I think it is better for diskmap to always trust disk drivers to either : - not have any label (dk_label == NULL, or points to zeroed memory) or - have a valid label (duid is not zeroes). The following diff thus relaxes the logic to always trust dk_label->d_uid,

Re: Race in disk_attach_callback?

2022-08-16 Thread Miod Vallat
> after a prompt from stsp@ and florian@, reporting that newfs_msdos > fails when given an $duid.i argument, I set down to see what could be > going on. My test using an USB stick failed to reprdouce the problem. > Then I started using a vnd, and that shows the issue (once in a > while). The

Re: Race in disk_attach_callback?

2022-07-13 Thread Stefan Sperling
On Wed, Jul 13, 2022 at 02:18:53PM +0200, Otto Moerbeek wrote: > Hi, > > after a prompt from stsp@ and florian@, reporting that newfs_msdos > fails when given an $duid.i argument, I set down to see what could be > going on. My test using an USB stick failed to reprdouce the problem. > Then I

Re: Race in disk_attach_callback?

2022-07-13 Thread Otto Moerbeek
On Wed, Jul 13, 2022 at 02:18:53PM +0200, Otto Moerbeek wrote: > Hi, > > after a prompt from stsp@ and florian@, reporting that newfs_msdos > fails when given an $duid.i argument, I set down to see what could be > going on. My test using an USB stick failed to reprdouce the problem. > Then I

Race in disk_attach_callback?

2022-07-13 Thread Otto Moerbeek
Hi, after a prompt from stsp@ and florian@, reporting that newfs_msdos fails when given an $duid.i argument, I set down to see what could be going on. My test using an USB stick failed to reprdouce the problem. Then I started using a vnd, and that shows the issue (once in a while). The feeling is