Page MenuHomeFreeBSD

loader: Simplify build a little
ClosedPublic

Authored by imp on Feb 15 2024, 12:07 AM.
Tags
None
Referenced Files
F100689457: D43914.diff
Fri, Oct 18, 9:59 AM
Unknown Object (File)
Fri, Sep 20, 7:45 AM
Unknown Object (File)
Thu, Sep 19, 12:37 PM
Unknown Object (File)
Sep 16 2024, 10:29 PM
Unknown Object (File)
Sep 7 2024, 5:32 AM
Unknown Object (File)
Sep 4 2024, 4:53 AM
Unknown Object (File)
Aug 31 2024, 1:31 PM
Unknown Object (File)
Aug 5 2024, 11:22 PM
Subscribers

Details

Summary

Confine -DDISK_DEBUG to biosdisc.c, the only file it affects.
Use modern variable arrays instead of alloca and add a sanity
size minimum for biospnp nodes. These nodes are tiny enough that
we needn't do a malloc/free pair: the stack is fine.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 56034
Build 52923: arc lint + arc unit

Event Timeline

alloca or local variable does allocate from stack (which may be in collision with bss), the opther option there to get low memory allocation is to use bio_alloc() and bio_free().

This revision is now accepted and ready to land.Feb 15 2024, 8:21 AM

alloca or local variable does allocate from stack (which may be in collision with bss), the opther option there to get low memory allocation is to use bio_alloc() and bio_free().

Pnp nodes are like 32 bytes... and must be in the lower MB.

In D43914#1001826, @imp wrote:

alloca or local variable does allocate from stack (which may be in collision with bss), the opther option there to get low memory allocation is to use bio_alloc() and bio_free().

Pnp nodes are like 32 bytes... and must be in the lower MB.

Yep, same for bio_alloc - we currently do use it for disk io bounce buffer allocations.

This revision was automatically updated to reflect the committed changes.