Ядро Linux работает только в режиме ядра

242
위잉위잉

Перенос ядра Linux на архитектуру, которая не имеет режимов выполнения ( всегда находится в режиме ядра ) и не имеет MMU, выглядит как очень незащищенная система. Можно ли заставить Linux работать в этой среде? И если это возможно, было бы бессмысленно? так как вся безопасность, обеспечиваемая Linux, теряется, будет ли разумнее рассмотреть другие альтернативы?

0
См. [Встраиваемое подмножество ядра Linux] (https://en.wikipedia.org/wiki/Embeddable_Linux_Kernel_Subset), также [страница «введения» официального веб-сайта] (http://elks.sourceforge.net/introduction.html). a CVn 8 лет назад 0

1 ответ на вопрос

1
Scott
  • There's no technological reason why it would be impossible.  In the 1980s, IBM released the the IBM PC and the PC XT, which were based on the Intel 8088 processor (a predecessor of the 8086 and the x86 line), which had no protected mode: it was always able to do everything.  (It had a very simplistic memory management scheme that allowed it to access a 220-byte physical address space with a 16-bit virtual address space.)

    And yet there was a version of Unix for the XT.  True, any process could access all of memory (or initiate I/O directly), but it was not easy to do that from a C program.  Users knew that it wasn't really secure, but at least it had fake security.  It was in competition (in a sense) with DOS (and maybe the very earliest versions of Windows), which had no security, so, if anything, Unix came out ahead on that issue.

    It may be necessary to make some changes to Linux to make it not choke on the primitive hardware, but this would probably be as simple as deactivating the code that tries to put user processes into user mode, etc.  There might even be an #ifdef for it.

  • Security, of course, isn't Linux's only feature: it's the functionality.  Where else other than a Unix (and I include things like Cygwin in that) would you find awk, sed, pipes, and useless cats?  More to the point, you have two basic options for a computer like that:

    • Use it as a paperweight or a doorstop, or
    • use it as a computer.

    And it you choose to use it as a computer, why not put Linux on it?

Of course you would not want to connect it to the Internet, ever.

Похожие вопросы