Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2023 02:28:12 +0900
From:      Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
To:        Zhenlei Huang <zlei@FreeBSD.org>
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:  <20231110022812.ad04ffa521262e377fcb99ea@dec.sakura.ne.jp>
In-Reply-To: <07168C68-9F81-443C-AFB6-24958BB01F9E@FreeBSD.org>
References:  <07168C68-9F81-443C-AFB6-24958BB01F9E@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 10 Nov 2023 00:10:13 +0800
Zhenlei Huang <zlei@FreeBSD.org> wrote:

> Hi,
> 
> This is *NOT* joking.
> 
> 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`.
> 
> 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?
> 
> I'm proposing https://reviews.freebsd.org/D42530 to do not allow unloading
> the kernel. It is by intuition.
> 
> What do you think ?
> 
> 
> Best regards,
> Zhenlei

Possibly too paranoid, but the summery on D42530 looks a bit confusing.
Would better to be

 'The userland or kernel shall not unload the module "kernel".'

or

 'The userland or kernel shall not unload the "kernel" module.'

.

The original SUMMARY could be read as, in meaning, 'The userland or
kernel shall not unload *.ko.'

*.ko is sometimes called as "kernel module", although it stants for
"kernel object".

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20231110022812.ad04ffa521262e377fcb99ea>