Re: Segments

Liste des GroupesRevenir à c arch 
Sujet : Re: Segments
De : antispam (at) *nospam* fricas.org (Waldek Hebisch)
Groupes : comp.arch
Date : 16. Jan 2025, 17:46:17
Autres entêtes
Organisation : To protect and to server
Message-ID : <vmbd4n$3v6su$3@paganini.bofh.team>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
David Brown <david.brown@hesbynett.no> wrote:
On 16/01/2025 13:35, Michael S wrote:
On Thu, 16 Jan 2025 12:36:45 +0100
David Brown <david.brown@hesbynett.no> wrote:
 
On 15/01/2025 21:59, Thomas Koenig wrote:
Michael S <already5chosen@yahoo.com> schrieb:
On Wed, 15 Jan 2025 18:00:34 -0000 (UTC)
Thomas Koenig <tkoenig@netcologne.de> wrote:
 

As you can guess, in kernel drivers VLA are unwelcome.
 
I can imagine that they are - but I really don't understand why.  I've
never understood why people think there is something "dangerous" about
VLAs, or why they think using heap allocations is somehow "safer".

VLA normally allocate on the stack.  Which at first glance look
great.  But once one realize how small are stacks in modern
systems (compared to whole memory), this no longer looks good.
Basically, to use VLA one needs rather small bound on maximal
size of array.  Given such bound always allocating maximal
size is simpler.  Without _small_ bound on size heap is
safer, as it is desined to handle also big allocations.

In the past I was a fan of VLA and stack allocation in general.
But I saw enough bug reports due to programs exceeding their
stack limits that I changed my view.

I do not know about Windows, but IIUC in some period Linux limit
for kernel stack was something like 2 kB (single page shared
with some other per-process data structures).  I think it
was increased later, but even moderate size arrays are
unwelcame on kernel stack due to size limits.

VMTs are, may
be, tolerable (I wonder what is current policy of Linux and BSD
kernels), but hardly desirable.

IMO VMT-s are vastly superior to raw pointers, but to fully
get their advantages one would need better tools.  Also,
kernel needs to deal with variable size arrays embedded in
various data structures.  This is possible using pointers,
but current VMT-s are too weak for many such uses.

--
                              Waldek Hebisch

Date Sujet#  Auteur
1 Oct 24 * Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)387MitchAlsup1
1 Oct 24 `* Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)386Thomas Koenig
1 Oct 24  +* Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)379MitchAlsup1
2 Oct 24  i+* Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)377Brett
3 Oct 24  ii`* Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)376Lawrence D'Oliveiro
3 Oct 24  ii +- Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)1Brett
3 Oct 24  ii +- Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)1Anton Ertl
3 Oct 24  ii `* Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)373David Brown
3 Oct 24  ii  `* Byte ordering (was: Whether something is RISC or not)372Anton Ertl
3 Oct 24  ii   +- Re: Byte ordering (was: Whether something is RISC or not)1David Brown
3 Oct 24  ii   +* Re: Byte ordering (was: Whether something is RISC or not)369Lawrence D'Oliveiro
4 Oct 24  ii   i+- Re: Byte ordering1Lynn Wheeler
4 Oct 24  ii   i+* Re: Byte ordering (was: Whether something is RISC or not)365David Brown
4 Oct 24  ii   ii`* Re: Byte ordering (was: Whether something is RISC or not)364Anton Ertl
4 Oct 24  ii   ii +* Re: Byte ordering5BGB
5 Oct 24  ii   ii i`* Re: Byte ordering4MitchAlsup1
5 Oct 24  ii   ii i +* Re: Byte ordering2BGB
5 Oct 24  ii   ii i i`- Re: Byte ordering1Lawrence D'Oliveiro
5 Oct 24  ii   ii i `- Re: Byte ordering1Lawrence D'Oliveiro
5 Oct 24  ii   ii +* Re: Byte ordering (was: Whether something is RISC or not)13Lawrence D'Oliveiro
5 Oct 24  ii   ii i`* Re: Byte ordering (was: Whether something is RISC or not)12Brett
5 Oct 24  ii   ii i `* Re: Byte ordering (was: Whether something is RISC or not)11Anton Ertl
5 Oct 24  ii   ii i  `* Re: Byte ordering (was: Whether something is RISC or not)10Michael S
6 Oct 24  ii   ii i   +- Re: Byte ordering1Terje Mathisen
6 Oct 24  ii   ii i   `* Re: Byte ordering (was: Whether something is RISC or not)8Brett
7 Oct 24  ii   ii i    `* Re: Byte ordering (was: Whether something is RISC or not)7Lawrence D'Oliveiro
7 Oct 24  ii   ii i     `* Re: Byte ordering (was: Whether something is RISC or not)6Brett
7 Oct 24  ii   ii i      `* Re: Byte ordering (was: Whether something is RISC or not)5Michael S
7 Oct 24  ii   ii i       +* Re: Byte ordering2Stefan Monnier
7 Oct 24  ii   ii i       i`- Re: Byte ordering1Michael S
7 Oct 24  ii   ii i       `* Re: Byte ordering (was: Whether something is RISC or not)2Lawrence D'Oliveiro
8 Oct 24  ii   ii i        `- Re: Byte ordering1Terje Mathisen
6 Oct 24  ii   ii `* Re: Byte ordering345David Brown
6 Oct 24  ii   ii  `* Re: Byte ordering344Anton Ertl
6 Oct 24  ii   ii   +* Re: Byte ordering189John Dallman
7 Oct 24  ii   ii   i+* Re: Byte ordering20Lawrence D'Oliveiro
8 Oct 24  ii   ii   ii`* Re: Byte ordering19John Dallman
9 Oct 24  ii   ii   ii +- VMS/NT memory management (was: Byte ordering)1Stefan Monnier
15 Oct 24  ii   ii   ii +* Re: Byte ordering2Lawrence D'Oliveiro
15 Oct 24  ii   ii   ii i`- Re: Byte ordering1MitchAlsup1
15 Oct 24  ii   ii   ii `* Re: Byte ordering15Lawrence D'Oliveiro
15 Oct 24  ii   ii   ii  +* Re: Byte ordering3Michael S
15 Oct 24  ii   ii   ii  i+- Re: Byte ordering1John Dallman
18 Oct 24  ii   ii   ii  i`- Re: Byte ordering1Lawrence D'Oliveiro
15 Oct 24  ii   ii   ii  +* Re: Byte ordering9John Dallman
16 Oct 24  ii   ii   ii  i+* Re: Byte ordering7George Neuner
16 Oct 24  ii   ii   ii  ii`* Re: Byte ordering6Terje Mathisen
16 Oct 24  ii   ii   ii  ii `* Re: Byte ordering5David Brown
17 Oct 24  ii   ii   ii  ii  +* Re: Byte ordering2George Neuner
17 Oct 24  ii   ii   ii  ii  i`- Re: Byte ordering1David Brown
17 Oct 24  ii   ii   ii  ii  `* Re: clouds, not Byte ordering2John Levine
17 Oct 24  ii   ii   ii  ii   `- Re: clouds, not Byte ordering1David Brown
18 Oct 24  ii   ii   ii  i`- Re: Byte ordering1Lawrence D'Oliveiro
16 Oct 24  ii   ii   ii  `* Re: Byte ordering2Paul A. Clayton
18 Oct 24  ii   ii   ii   `- Re: Microkernels & Capabilities (was Re: Byte ordering)1Lawrence D'Oliveiro
7 Oct 24  ii   ii   i`* 80286 protected mode168Anton Ertl
7 Oct 24  ii   ii   i +* Re: 80286 protected mode5Lars Poulsen
7 Oct 24  ii   ii   i i`* Re: 80286 protected mode4Terje Mathisen
7 Oct 24  ii   ii   i i +- Re: 80286 protected mode1Michael S
7 Oct 24  ii   ii   i i `* Re: 80286 protected mode2Lawrence D'Oliveiro
8 Oct 24  ii   ii   i i  `- Re: 80286 protected mode1Terje Mathisen
7 Oct 24  ii   ii   i +* Re: 80286 protected mode3Brett
7 Oct 24  ii   ii   i i`* Re: 80286 protected mode2Michael S
7 Oct 24  ii   ii   i i `- Re: 80286 protected mode1Brett
7 Oct 24  ii   ii   i +- Re: 80286 protected mode1Lawrence D'Oliveiro
8 Oct 24  ii   ii   i +* Re: 80286 protected mode152MitchAlsup1
8 Oct 24  ii   ii   i i+* Re: 80286 protected mode4Lawrence D'Oliveiro
8 Oct 24  ii   ii   i ii`* Re: 80286 protected mode3MitchAlsup1
9 Oct 24  ii   ii   i ii +- Re: 80286 protected mode1David Brown
15 Oct 24  ii   ii   i ii `- Re: 80286 protected mode1Lawrence D'Oliveiro
8 Oct 24  ii   ii   i i`* Re: 80286 protected mode147Anton Ertl
8 Oct 24  ii   ii   i i +- Re: 80286 protected mode1Robert Finch
9 Oct 24  ii   ii   i i `* Re: 80286 protected mode145David Brown
9 Oct 24  ii   ii   i i  +* Re: 80286 protected mode79MitchAlsup1
9 Oct 24  ii   ii   i i  i`* Re: 80286 protected mode78David Brown
9 Oct 24  ii   ii   i i  i `* Re: 80286 protected mode77Stephen Fuld
10 Oct 24  ii   ii   i i  i  +* Re: 80286 protected mode2MitchAlsup1
10 Oct 24  ii   ii   i i  i  i`- Re: 80286 protected mode1David Brown
10 Oct 24  ii   ii   i i  i  +- Re: 80286 protected mode1David Brown
11 Oct 24  ii   ii   i i  i  `* Re: 80286 protected mode73Tim Rentsch
15 Oct 24  ii   ii   i i  i   `* Re: 80286 protected mode72Stefan Monnier
15 Oct 24  ii   ii   i i  i    +* Re: 80286 protected mode30MitchAlsup1
16 Oct 24  ii   ii   i i  i    i+* Re: 80286 protected mode25MitchAlsup1
16 Oct 24  ii   ii   i i  i    ii+* Re: C and turtles, 80286 protected mode13John Levine
16 Oct 24  ii   ii   i i  i    iii+* Re: C and turtles, 80286 protected mode7MitchAlsup1
16 Oct 24  ii   ii   i i  i    iiii`* Re: C and turtles, 80286 protected mode6John Levine
17 Oct 24  ii   ii   i i  i    iiii `* Re: C and turtles, 80286 protected mode5Thomas Koenig
20 Oct 24  ii   ii   i i  i    iiii  `* Re: C and turtles, 80286 protected mode4Lawrence D'Oliveiro
20 Oct 24  ii   ii   i i  i    iiii   `* Re: C and turtles, 80286 protected mode3George Neuner
22 Oct 24  ii   ii   i i  i    iiii    `* Re: C and turtles, 80286 protected mode2Tim Rentsch
22 Oct 24  ii   ii   i i  i    iiii     `- Re: C and turtles, 80286 protected mode1George Neuner
16 Oct 24  ii   ii   i i  i    iii+- Re: C and turtles, 80286 protected mode1David Brown
16 Oct 24  ii   ii   i i  i    iii`* Re: C and turtles, 80286 protected mode4Paul A. Clayton
17 Oct 24  ii   ii   i i  i    iii +- Re: C and turtles, 80286 protected mode1David Brown
20 Oct 24  ii   ii   i i  i    iii `* Re: C and turtles, 80286 protected mode2Lawrence D'Oliveiro
20 Oct 24  ii   ii   i i  i    iii  `- Re: C and turtles, 80286 protected mode1Paul A. Clayton
16 Oct 24  ii   ii   i i  i    ii+* Re: 80286 protected mode7Thomas Koenig
16 Oct 24  ii   ii   i i  i    iii+* Re: 80286 protected mode2MitchAlsup1
17 Oct 24  ii   ii   i i  i    iiii`- Re: 80286 protected mode1Tim Rentsch
17 Oct 24  ii   ii   i i  i    iii`* Re: 80286 protected mode4Tim Rentsch
17 Oct 24  ii   ii   i i  i    iii `* Re: fine points of dynamic memory allocation, not 80286 protected mode3John Levine
17 Oct 24  ii   ii   i i  i    ii+* Re: 80286 protected mode3George Neuner
17 Oct 24  ii   ii   i i  i    ii`- Re: 80286 protected mode1Tim Rentsch
16 Oct 24  ii   ii   i i  i    i+* Re: 80286 protected mode3David Brown
17 Oct 24  ii   ii   i i  i    i`- Re: 80286 protected mode1Tim Rentsch
16 Oct 24  ii   ii   i i  i    `* Re: 80286 protected mode41David Brown
9 Oct 24  ii   ii   i i  +* Re: 80286 protected mode51Thomas Koenig
13 Oct 24  ii   ii   i i  `* Re: 80286 protected mode14Anton Ertl
8 Oct 24  ii   ii   i `* Re: 80286 protected mode6John Levine
3 Jan 25  ii   ii   `* Re: Byte ordering154Waldek Hebisch
6 Oct 24  ii   i`* Re: Byte ordering (was: Whether something is RISC or not)2Michael S
3 Oct 24  ii   `- Re: Byte ordering (was: Whether something is RISC or not)1John Dallman
2 Oct 24  i`- Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)1Thomas Koenig
2 Oct 24  +* Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)5David Schultz
3 Oct 24  `- Re: Whether something is RISC or not (Re: PDP-8 theology, not Concertina II Progress)1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal