Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2023 17:07:03 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        FreeBSD Current <current@freebsd.org>, Konstantin Belousov <kib@freebsd.org>, Doug Rabson <dfr@FreeBSD.org>
Subject:   Re: kldunload kernel: How should the kernel behave when it is requested to unload itself
Message-ID:  <118579DF-2A14-4305-8DF1-24F4FE2EC8B6@FreeBSD.org>
In-Reply-To: <20231110022812.ad04ffa521262e377fcb99ea@dec.sakura.ne.jp>
References:  <07168C68-9F81-443C-AFB6-24958BB01F9E@FreeBSD.org> <20231110022812.ad04ffa521262e377fcb99ea@dec.sakura.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Nov 10, 2023, at 1:28 AM, Tomoaki AOKI <junchoon@dec.sakura.ne.jp> =
wrote:
>=20
> On Fri, 10 Nov 2023 00:10:13 +0800
> Zhenlei Huang <zlei@FreeBSD.org> wrote:
>=20
>> Hi,
>>=20
>> This is *NOT* joking.
>>=20
>> While working on https://reviews.freebsd.org/D42527 I realized the
>> module kernel also has userrefs, that is to say, userland can request
>> to unload kernel, aka `kldunload kernel`.
>>=20
>> This is interesting. Well no doubt that the loader can unload kernel.
>> Then after the kernel is loaded and has been initialized (SYSINIT), =
how
>> should it behave when it get an unload request?
>>=20
>> I'm proposing https://reviews.freebsd.org/D42530 to do not allow =
unloading
>> the kernel. It is by intuition.
>>=20
>> What do you think ?
>>=20
>>=20
>> Best regards,
>> Zhenlei
>=20
> Possibly too paranoid, but the summery on D42530 looks a bit =
confusing.
> Would better to be
>=20
> 'The userland or kernel shall not unload the module "kernel".'
>=20
> or
>=20
> 'The userland or kernel shall not unload the "kernel" module.'
>=20
> .
>=20
> The original SUMMARY could be read as, in meaning, 'The userland or
> kernel shall not unload *.ko.'
>=20
> *.ko is sometimes called as "kernel module", although it stants for
> "kernel object".

Thanks for point that out. I'll polish before committing it.

>=20
> --=20
> Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?118579DF-2A14-4305-8DF1-24F4FE2EC8B6>