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

#1

Updated by Electric Monk almost 4 years ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

git commit 560b2482e2c940112b49e908c56ce8a4860f3f9b

commit  560b2482e2c940112b49e908c56ce8a4860f3f9b
Author: Toomas Soome <tsoome@me.com>
Date:   2017-02-09T15:51:56.000Z

    7847 loader: disk io should not use alloca()
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF