lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55157495.3050208@iki.fi>
Date:	Fri, 27 Mar 2015 15:17:41 +0000
From:	Antti Kantee <pooka@....fi>
To:	Richard Weinberger <richard@....at>,
	Hajime Tazaki <tazaki@...e.ad.jp>
CC:	linux-arch@...r.kernel.org, arnd@...db.de, corbet@....net,
	cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
	iamjoonsoo.kim@....com, akpm@...ux-foundation.org,
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [RFC PATCH 00/11] an introduction of library operating system
 for Linux (LibOS)

On 27/03/15 09:21, Richard Weinberger wrote:
> Am 27.03.2015 um 07:34 schrieb Hajime Tazaki:
>>>> it (arch/lib) is a hardware-independent architecture which
>>>> provides necessary features to the remainder of kernel code,
>>>> isn't it ?
>>>
>>> The stuff in arch/ is the code to glue the kernel to
>>> a specific piece of hardware.
>>> Your code does something between. You duplicate kernel core features
>>> to make a specific piece of code work in userland.
>>
>> indeed, 'something between' would be an appropriate word.
>
> Just an idea popping out of my head...

Let me try to offer some insight.  I've been working on something 
similar in mainline NetBSD for almost 8 years now, so in addition to 
ideas popping into my head I've also tested them out in the real world. 
  I do think that all operating systems should be structured to support 
a lib mode, and hopefully integrating Hajime's work into Linux will get 
on the right track.

> What about putting libos into tools/testing/ and make it much more generic and framework alike.
> With more generic I mean that libos could be a stubbing framework for the kernel.
> i.e. you specify the subsystem you want to test/stub and the framework helps you doing so.
> A lot of the stubs you're placing in arch/lib could be auto-generated as the
> vast majority of all kernel methods you stub are no-ops which call only lib_assert(false).
>
> Using that approach only very few kernel core components have to be duplicated and
> actually implemented by hand.
> Hence, less maintenance overhead and libos is not broken all the time.

Stubbing things might be the way to get things initially rolling, but 
you don't want to aim for that or spend energy on fancy ways to do it. 
Autogenerating stubs only means that the libos will build, not that it 
won't be broken.  Figuring out how to make the libos as close to 
zero-maintenance as possible is indeed the trick.

What I ended up doing is coining the term "anykernel architecture", 
which simply means that in addition to the monolithic architecture, the 
kernel can now be used as in exokernel, microkernel, multikernel, etc. 
(which are really just different frontends for the lib mode).  I'd 
recommend diving head-first into the issue and thinking "how can we 
adjust the kernel architecture to support the libos mode" instead of 
"how can we tip-toe around the kernel and invent clever ways to stub 
things".  The anykernel is not really that different from a monolithic 
kernel once you figure out which bits are important, and support will 
not require a whole lot of "duplicated" code.  There are practically no 
stubs in the NetBSD implementation; somewhere between 0 and 20 depending 
on what you count as a stub.  There is a few thousand lines of 
"duplicated" code, the majority of which is a direct result of the rump 
kernel (which is the name of the libos mode) running on top of an 
external thread scheduler, so that code from the monolithic kernel 
doesn't apply.

Continuous testing is paramount.  Running the kernel as a lib provides 
an unparalleled method for testing most of the kernel.  It will improve 
testing capabilities dramatically, and on the flipside it will keep the 
libos working.  Everyone wins.

   - antti
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ