Re: ccd error with two large components

2024-03-03 Thread Michael van Elst
roland.il...@gmx.de (Roland Illig) writes:

>That's this line:

>> unit =3D *(const int *)newp;

>I don't know at which point newp is validated; maybe that validation is
>missing in this case, although I'd expect it to be in the common sysctl
>infrastructure code.


newp is valid, it's a userland pointer that gets dereferenced by the
kernel. Without SMAP that probably even worked on x86.






Re: ccd error with two large components

2024-03-03 Thread Roland Illig
Am 03.03.2024 um 19:55 schrieb Paul Goyette:
> I have two 2TB nvme devices, configured with ``ccdconfig ccd0 64
> none /dev/dk1 /dev/dk0''
> then i mount the ccd on /mnt
> and then ccdconfig -g goes boom!!
>
>   prevented access to 0x7f7fff9e7fbc (SMAP)
>   ccd_info_sysctl+77
>
> The instruction decode at that point is
>
>   movl 0(%r8), %esi

That's this line:

> unit = *(const int *)newp;

I don't know at which point newp is validated; maybe that validation is
missing in this case, although I'd expect it to be in the common sysctl
infrastructure code.


ccd error with two large components

2024-03-03 Thread Paul Goyette
I have two 2TB nvme devices, configured with ``ccdconfig ccd0 64 
none /dev/dk1 /dev/dk0''

then i mount the ccd on /mnt
and then ccdconfig -g goes boom!!

prevented access to 0x7f7fff9e7fbc (SMAP)
ccd_info_sysctl+77

The instruction decode at that point is

movl 0(%r8), %esi

(The rest of the backtrace isn't very interesting, just the
sysctl dispatch.)

Any clues?



+-+--+--+
| Paul Goyette (.sig) | PGP Key fingerprint: | E-mail addresses:|
| (Retired)   | 1B11 1849 721C 56C8 F63A | p...@whooppee.com|
| Software Developer  | 6E2E 05FD 15CE 9F2D 5102 | pgoye...@netbsd.org  |
| & Network Engineer  |  | pgoyett...@gmail.com |
+-+--+--+