7976 libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory

Review Request #403 — Created March 17, 2017 and submitted

tsoome
illumos-gate
7976
3101ea6...
general
https://reviews.freebsd.org/D9547

Tested with reading efi-system partition, and tested with loading smartos from FAT partition (SMARTOS standard usb image with loader added).

  • 0
  • 0
  • 3
  • 0
  • 3
Description From Last Updated
tsoome
rm
  1. In general, this is okay, but the memory failure semantics here need to be cleaned up more genearlly.

  2. usr/src/boot/lib/libstand/dosfs.c (Diff revision 1)
     
     
    Can you confirm that ioget will always read io_size bytes or fail?
  3. usr/src/boot/lib/libstand/dosfs.c (Diff revision 1)
     
     
    Is there any way we can move the frees for the fs argument to the context of the caller? It's a bit confusing when we don't allocate it.
    
    The fact that we do this here has caused me to discover that if any of the other function in dos_open() fail, we'll not properly free the fs.
    
    I'm fine with that being a separate bug.
    1. I think this should be fixed now by author:)

  4. usr/src/boot/lib/libstand/dosfs.c (Diff revision 1)
     
     
    What prevents overflow of this multiplication? Note in dos_read_fatblk() we use a daddr_t for this which is large enough to have two ints multiplied together.
    1. I think the issue is solved now by author, as the value in *c is validated.

  5. 
      
tsoome
tsoome
tsoome
tsoome
rm
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...