Project

General

Profile

Bug #7847

loader: disk io should not use alloca()

Added by Toomas Soome almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2017-02-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The BIOS version of the loader needs to use low memory with BIOS interrupts. Since the current loader code+data+stack is in low memory (0xa000 - value from 0x413), with small code base the alloca() was quite ok. However, as the feature list has grown in time, it has become clear the alloca() is not something we can use, because it provides no way to validate the allocation. Unfortunately there are only limited options left right now. As an alternate, we have free page (4KB), which will provide us an safe area.

FreeBSD patch: https://svnweb.freebsd.org/base?view=revision&revision=313349

Also available in: Atom PDF