Re: [PATCH v2] osdep/linux: Fix md array device enumeration

2021-10-14 Thread Daniel Kiper
On Wed, Oct 13, 2021 at 06:21:26PM -0700, Kees Cook wrote: > On October 11, 2021 8:02:18 AM PDT, Daniel Kiper wrote: > >On Thu, Oct 07, 2021 at 04:33:16PM -0700, Kees Cook wrote: > >> GET_ARRAY_INFO's info.nr_disks does not map to GET_DISK_INFO's > >> disk.number, which is an internal kernel index

Re: [PATCH v2] osdep/linux: Fix md array device enumeration

2021-10-13 Thread Kees Cook
On October 11, 2021 8:02:18 AM PDT, Daniel Kiper wrote: >On Thu, Oct 07, 2021 at 04:33:16PM -0700, Kees Cook wrote: >> GET_ARRAY_INFO's info.nr_disks does not map to GET_DISK_INFO's >> disk.number, which is an internal kernel index. If an array has had drives >> added, removed, etc, there may be

Re: [PATCH v2] osdep/linux: Fix md array device enumeration

2021-10-11 Thread Daniel Kiper
On Thu, Oct 07, 2021 at 04:33:16PM -0700, Kees Cook wrote: > GET_ARRAY_INFO's info.nr_disks does not map to GET_DISK_INFO's > disk.number, which is an internal kernel index. If an array has had drives > added, removed, etc, there may be gaps in GET_DISK_INFO's results. But > since the consumer of d

[PATCH v2] osdep/linux: Fix md array device enumeration

2021-10-07 Thread Kees Cook
GET_ARRAY_INFO's info.nr_disks does not map to GET_DISK_INFO's disk.number, which is an internal kernel index. If an array has had drives added, removed, etc, there may be gaps in GET_DISK_INFO's results. But since the consumer of devicelist cannot tolerate gaps (it expects to walk a NULL-terminate