Page MenuHomeFreeBSD
Feed Advanced Search

Feb 10 2017

tsoome added a comment to D9520: loader: implement MEDIA_FILEPATH_DP support in efipart.

Once you get someone to verify this works on an ARM device, approved.

Feb 10 2017, 4:49 PM
tsoome retitled D9520: loader: implement MEDIA_FILEPATH_DP support in efipart from to loader: implement MEDIA_FILEPATH_DP support in efipart.
Feb 10 2017, 10:23 AM

Feb 8 2017

tsoome closed D9496: loader: possible NULL pointer dereference in bcache.c by committing rS313451: loader: possible NULL pointer dereference in bcache.c.
Feb 8 2017, 6:33 PM
tsoome committed rS313451: loader: possible NULL pointer dereference in bcache.c.
loader: possible NULL pointer dereference in bcache.c
Feb 8 2017, 6:33 PM
tsoome retitled D9496: loader: possible NULL pointer dereference in bcache.c from to loader: possible NULL pointer dereference in bcache.c.
Feb 8 2017, 5:25 PM
tsoome committed rS313442: loader: possible NULL pointer dereference in efipart.c.
loader: possible NULL pointer dereference in efipart.c
Feb 8 2017, 3:52 PM
tsoome closed D9490: loader: possible NULL pointer dereference in efipart.c by committing rS313442: loader: possible NULL pointer dereference in efipart.c.
Feb 8 2017, 3:52 PM
tsoome retitled D9490: loader: possible NULL pointer dereference in efipart.c from to loader: possible NULL pointer dereference in efipart.c.
Feb 8 2017, 2:05 PM

Feb 7 2017

tsoome added a comment to D5992: Add chain loader support for loader.

Can you add some instructions or a man page explaining how to use it? (and how one would test it)

Feb 7 2017, 8:40 PM

Feb 6 2017

tsoome committed rS313355: MFC r309369,310850,310853:.
MFC r309369,310850,310853:
Feb 6 2017, 10:03 PM
tsoome committed rS313353: MFC r310845: boot2 will deadlock if extended keys are used on text input.
MFC r310845: boot2 will deadlock if extended keys are used on text input
Feb 6 2017, 8:57 PM
tsoome committed rS313349: loader: disk io should not use alloca().
loader: disk io should not use alloca()
Feb 6 2017, 6:44 PM
tsoome closed D9455: loader: disk io should not use alloca() by committing rS313349: loader: disk io should not use alloca().
Feb 6 2017, 6:44 PM
tsoome committed rS313348: loader: biosdisk fix for 2+TB disks.
loader: biosdisk fix for 2+TB disks
Feb 6 2017, 6:30 PM
tsoome closed D8595: loader biosdisk fix for 2+TB disks. by committing rS313348: loader: biosdisk fix for 2+TB disks.
Feb 6 2017, 6:30 PM
tsoome updated the diff for D8595: loader biosdisk fix for 2+TB disks..

off_t -> uint64_t

Feb 6 2017, 11:14 AM
tsoome updated the diff for D8595: loader biosdisk fix for 2+TB disks..

svn update to 313337.

Feb 6 2017, 11:10 AM
tsoome committed rS313337: loader: 313329 missed ZFS guard in loader/main.c.
loader: 313329 missed ZFS guard in loader/main.c
Feb 6 2017, 10:58 AM
tsoome closed D9458: loader: 313329 missed ZFS guard in loader/main.c by committing rS313337: loader: 313329 missed ZFS guard in loader/main.c.
Feb 6 2017, 10:58 AM
tsoome retitled D9458: loader: 313329 missed ZFS guard in loader/main.c from to loader: 313329 missed ZFS guard in loader/main.c.
Feb 6 2017, 10:10 AM
tsoome committed rS313333: loader: Replace EFI part devices..
loader: Replace EFI part devices.
Feb 6 2017, 9:19 AM
tsoome closed D8581: Replace EFI part devices. by committing rS313333: loader: Replace EFI part devices..
Feb 6 2017, 9:19 AM
tsoome committed rS313332: loader: bcache read ahead block count should take account the large sectors.
loader: bcache read ahead block count should take account the large sectors
Feb 6 2017, 8:58 AM
tsoome closed D9179: loader: bcache read ahead block count should take account the large sectors by committing rS313332: loader: bcache read ahead block count should take account the large sectors.
Feb 6 2017, 8:58 AM
tsoome updated the diff for D8581: Replace EFI part devices..

svn update to 313329

Feb 6 2017, 8:51 AM
tsoome closed D8594: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE. by committing rS313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE..
Feb 6 2017, 8:27 AM
tsoome committed rS313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE..
loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE.
Feb 6 2017, 8:27 AM

Feb 5 2017

tsoome added inline comments to D8594: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE..
Feb 5 2017, 10:05 PM
tsoome retitled D9455: loader: disk io should not use alloca() from to loader: disk io should not use alloca().
Feb 5 2017, 6:04 PM

Feb 4 2017

tsoome added a comment to D9430: Use -Os when compiling all bootloaders, not just some.
In D9430#194891, @imp wrote:

In the past we've only used this where it makes sense.
That's because in the past -Os has often resulted in either mis-compiled code or has resulted in larger binaries than w/o it.
I suppose it is OK, but I'm leery since this touches every single architecture.

Feb 4 2017, 10:38 AM

Feb 3 2017

tsoome added a comment to D9430: Use -Os when compiling all bootloaders, not just some.
In D9430#194891, @imp wrote:

In the past we've only used this where it makes sense.
That's because in the past -Os has often resulted in either mis-compiled code or has resulted in larger binaries than w/o it.
I suppose it is OK, but I'm leery since this touches every single architecture.

Feb 3 2017, 9:02 PM
tsoome added a comment to D9430: Use -Os when compiling all bootloaders, not just some.

Check also D7600 - I did try to take on -Os there, but it is a bit mixed up with crypto stuff. Maybe some ideas are useful in your work.

Feb 3 2017, 9:00 PM
tsoome committed rS313166: loader: libefi/env.c warnings in arm build.
loader: libefi/env.c warnings in arm build
Feb 3 2017, 4:39 PM
tsoome closed D9422: loader: libefi/env.c warnings in arm build by committing rS313166: loader: libefi/env.c warnings in arm build.
Feb 3 2017, 4:39 PM
tsoome added inline comments to D9422: loader: libefi/env.c warnings in arm build.
Feb 3 2017, 4:31 PM
tsoome added a comment to D9422: loader: libefi/env.c warnings in arm build.

make buildworld TARGET_ARCH=armv6 is clean.

Feb 3 2017, 2:27 PM
tsoome retitled D9422: loader: libefi/env.c warnings in arm build from to loader: libefi/env.c warnings in arm build.
Feb 3 2017, 10:18 AM

Feb 2 2017

tsoome updated the diff for D9179: loader: bcache read ahead block count should take account the large sectors.

Inserted the comment about idea behind the RE size setup.

Feb 2 2017, 11:07 AM
tsoome updated the diff for D5992: Add chain loader support for loader.

svn update to 313091.

Feb 2 2017, 10:23 AM

Feb 1 2017

tsoome updated the diff for D8594: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE..

svn update to current state.

Feb 1 2017, 8:59 PM
tsoome committed rS313047: loader: disk/part api needs to use uint64_t offsets.
loader: disk/part api needs to use uint64_t offsets
Feb 1 2017, 8:11 PM
tsoome closed D8710: loader: disk/part api needs to use uint64_t offsets by committing rS313047: loader: disk/part api needs to use uint64_t offsets.
Feb 1 2017, 8:11 PM
tsoome updated the diff for D8710: loader: disk/part api needs to use uint64_t offsets.

svn update to revision 313042.

Feb 1 2017, 9:03 AM
tsoome committed rS313042: loader.efi environment related cleanups.
loader.efi environment related cleanups
Feb 1 2017, 8:47 AM
tsoome closed D9165: loader.efi environment related cleanups by committing rS313042: loader.efi environment related cleanups.
Feb 1 2017, 8:47 AM

Jan 23 2017

tsoome updated the diff for D9165: loader.efi environment related cleanups.

realloc() need to use temporary variable for result check, or
we will get memory leak.

Jan 23 2017, 1:27 PM
tsoome added inline comments to D9165: loader.efi environment related cleanups.
Jan 23 2017, 11:12 AM
tsoome updated the diff for D9165: loader.efi environment related cleanups.

use realloc(), add missing \n.

Jan 23 2017, 11:11 AM

Jan 18 2017

tsoome updated the diff for D8710: loader: disk/part api needs to use uint64_t offsets.

usb disk ioctl should provide DIOCGSECTORSIZE and DIOCGMEDIASIZE instead of
IOCTL_GET_BLOCK_SIZE and IOCTL_GET_BLOCKS (which are not used by anything).

Jan 18 2017, 9:19 AM
tsoome updated the diff for D8581: Replace EFI part devices..

rebase on r312374, updated the NULL checks on efi_devpath_last_node()
and efi_devpath_trim().

Jan 18 2017, 8:37 AM
tsoome committed rS312374: loader: efi devpath api usage should be more aware of NULL pointers.
loader: efi devpath api usage should be more aware of NULL pointers
Jan 18 2017, 8:18 AM
tsoome closed D9203: loader: efi devpath api usage should be more aware of NULL pointers by committing rS312374: loader: efi devpath api usage should be more aware of NULL pointers.
Jan 18 2017, 8:18 AM

Jan 16 2017

tsoome updated the diff for D9165: loader.efi environment related cleanups.

fixed the copyright line

Jan 16 2017, 9:58 PM
tsoome retitled D9203: loader: efi devpath api usage should be more aware of NULL pointers from to loader: efi devpath api usage should be more aware of NULL pointers.
Jan 16 2017, 9:19 PM
tsoome closed D9192: loader: move device path definitions to include/efidevp.h by committing rS312314: loader: move device path definitions to include/efidevp.h.
Jan 16 2017, 8:57 PM
tsoome committed rS312314: loader: move device path definitions to include/efidevp.h.
loader: move device path definitions to include/efidevp.h
Jan 16 2017, 8:57 PM
tsoome added inline comments to D9192: loader: move device path definitions to include/efidevp.h.
Jan 16 2017, 8:14 PM

Jan 15 2017

tsoome added a reviewer for D9192: loader: move device path definitions to include/efidevp.h: jhb.
Jan 15 2017, 8:48 PM
tsoome retitled D9192: loader: move device path definitions to include/efidevp.h from to loader: move device path definitions to include/efidevp.h.
Jan 15 2017, 8:45 PM
tsoome committed rS312237: loader.efi: find_currdev() can leak memory.
loader.efi: find_currdev() can leak memory
Jan 15 2017, 8:03 PM
tsoome closed D9191: loader.efi: find_currdev() can leak memory by committing rS312237: loader.efi: find_currdev() can leak memory.
Jan 15 2017, 8:03 PM
tsoome retitled D9191: loader.efi: find_currdev() can leak memory from to loader.efi: find_currdev() can leak memory.
Jan 15 2017, 7:31 PM

Jan 14 2017

tsoome added a comment to D9179: loader: bcache read ahead block count should take account the large sectors.

Approved for commit

Maybe wait 72 hours for other reviewers though

Jan 14 2017, 6:13 PM
tsoome retitled D9179: loader: bcache read ahead block count should take account the large sectors from to loader: bcache read ahead block count should take account the large sectors.
Jan 14 2017, 5:29 PM
tsoome added a comment to D7589: EFI boot1 and loader Refactoring.

With partition - filesystem mapping we can get the device handle without much issue - the handle stack has handles from FS down to partition and disk handle and the api to access the next handle from stack is there.

With zfs the situation is much more complicated as it is dual disk and file system and we need interface to access BE list and to switch the "current" filesystem on top of the "disk", and UEFI api itself does not help us there. It is possible to create specific protocol on top of zfs pool to implement an mechanism to get information about BE's and to switch, but it means that instead of reducing complexity, we are adding more.... note that the dataset list specifying BE's can be quite long, on my dev host I currently do have 73 entries.

Also, as I already wrote, for human operating the machine, it is really important to know exactly what I'm going to boot from.

So what I did was use the COMPONENT_NAME2_PROTOCOL interface to report back the names of the devices. The raw device to EFI layer now installs a COMPONENT_NAME2_PROTOCOL interface when it installs the SIMPLE_FILE_SYSTEM_PROTOCOL interface.

The COMPONENT_NAME2_PROTOCOL interface currently uses code borrowed from the dev_print methods from the efipart and zfs underlying drivers. We could possibly refactor the dev_print method or add a new one in the future to make this a cleaner integration, but I want to avoid adding more refactorings than necessary here.

In some cases (such as when the firmware has installed a SIMPLE_FILE_SYSTEM_PROTOCOL), you'll get a handle with no COMPONENT_NAME2_PROTOCOL. In this case, it does the default behavior from before.

Also, on verbose mode, it prints out EFI device paths as well.

Jan 14 2017, 4:24 PM

Jan 13 2017

tsoome added a comment to D7589: EFI boot1 and loader Refactoring.

ok, got it built, and initial test. And there is this problem...

OK lsdev

EFI0:    EFI(SIMPLE_FILE_SYSTEM)
EFI1:    EFI(SIMPLE_FILE_SYSTEM)
EFI2:    EFI(SIMPLE_FILE_SYSTEM)
EFI3:    EFI(SIMPLE_FILE_SYSTEM)
EFI4:    EFI(SIMPLE_FILE_SYSTEM)
EFI5:    EFI(SIMPLE_FILE_SYSTEM)
EFI6:    EFI(SIMPLE_FILE_SYSTEM)
EFI7:    EFI(SIMPLE_FILE_SYSTEM)

net devices:

net0:

OK

Yeah, that's problematic. I guess we're back to the question of what should go here: EFI device paths, or something else?

There is an EFI interface that allows a descriptive name to be attached to an arbitrary EFI_HANDLE. Perhaps this could be added as part of the probing process.

Second problem is that the devices are sorted by file system type, So first I get my 4 EFI System partitions (I have 4 disks on this VM), then the rest.

I gather they should be sorted by disk or partition, then? This should be relatively easy to achieve.

Third one is that for some reason it does list root directory, but not subdirectories - probably because:

? 270 dev
? 5 opt
? 20 kernel
? 3 code
? 2 raid
? 2 rpool
? 187 lib

the ls -l does see the size, but not an type, note this is zfs.

Probably an oversight. Actually, I seem to recall something about the EFI_SIMPLE_FILE_SYSTEM interface making you have to open a file to find out its type. I probably intended to add in file types later, but never did.

And finally, for some reasons sometimes the ls was running really slow - not always.

But the disk and file system identification is huge issue, because from current snapshot I can not get even the size hints;)

So, it is very impressive work, but it will take a lot still:) Well, it should be possible to use the disk+part interface I did and relate the file systems with actual partitions... but still there is huge question about identification, and for zfs case - as an admin, I really can not lose the boot environments....

OK, seems I've got some more work to do.

Jan 13 2017, 6:05 PM
tsoome updated the diff for D9165: loader.efi environment related cleanups.

libefi/Makefile needs to build efi.c even without BOOT_FORTH

Jan 13 2017, 2:22 PM
tsoome updated the diff for D9165: loader.efi environment related cleanups.

ficlEfiSetenv() already does initialize the string variables

Jan 13 2017, 1:54 PM
tsoome added a comment to D8710: loader: disk/part api needs to use uint64_t offsets.
In D8710#189382, @ae wrote:

I don't remember why I chose off_t, but AFAIR, daddr_t is signed and used in many places.
Also there was a small tool in the tools/tools/bootparttest, that may need in some changes, but it seems it is already broken by some early change.

Jan 13 2017, 1:51 PM
tsoome updated the diff for D8710: loader: disk/part api needs to use uint64_t offsets.

updated struct dentry

Jan 13 2017, 11:05 AM
tsoome added inline comments to D9165: loader.efi environment related cleanups.
Jan 13 2017, 7:19 AM

Jan 12 2017

tsoome retitled D9165: loader.efi environment related cleanups from to loader.efi environment related cleanups.
Jan 12 2017, 11:21 PM
tsoome updated the diff for D8581: Replace EFI part devices..

Updated to revision 311995.

Jan 12 2017, 8:53 PM

Jan 11 2017

tsoome accepted D9132: Make EFI_RESERVED_SERVICE a proper prototype.
Jan 11 2017, 7:52 PM

Dec 30 2016

tsoome closed D9003: loader: nandfs calls strategy with one extra argument. by committing rS310853: loader: nandfs calls strategy with one extra argument..
Dec 30 2016, 8:01 PM
tsoome committed rS310853: loader: nandfs calls strategy with one extra argument..
loader: nandfs calls strategy with one extra argument.
Dec 30 2016, 8:01 PM
tsoome retitled D9003: loader: nandfs calls strategy with one extra argument. from to loader: nandfs calls strategy with one extra argument..
Dec 30 2016, 7:45 PM
tsoome committed rS310850: dosfs support in libstand is broken since r298230.
dosfs support in libstand is broken since r298230
Dec 30 2016, 7:06 PM
tsoome closed D8644: loader: dosfs can corrupt memory by committing rS310850: dosfs support in libstand is broken since r298230.
Dec 30 2016, 7:06 PM
tsoome closed D8608: boot2 will deadlock if extended keys are used on text input by committing rS310845: boot2 will deadlock if extended keys are used on text input.
Dec 30 2016, 6:22 PM
tsoome committed rS310845: boot2 will deadlock if extended keys are used on text input.
boot2 will deadlock if extended keys are used on text input
Dec 30 2016, 6:22 PM

Dec 28 2016

tsoome accepted D8929: btxldr: process all PT_LOAD segments, not just the first two.

LGTM

Dec 28 2016, 1:31 PM
tsoome added inline comments to D8929: btxldr: process all PT_LOAD segments, not just the first two.
Dec 28 2016, 7:30 AM
tsoome added inline comments to D8929: btxldr: process all PT_LOAD segments, not just the first two.
Dec 28 2016, 6:36 AM

Dec 22 2016

tsoome added a reviewer for D8491: libstand: verify value provided by nfs.read_size: rpokala.
Dec 22 2016, 9:46 AM
tsoome updated the diff for D8491: libstand: verify value provided by nfs.read_size.

Factored out the set_nfs_read_size(), as the r305588 did miss the fact
we have not one but two versions of nfs_getrootfh() and we need to set
the nfs_read_size in both.

Dec 22 2016, 9:43 AM

Dec 18 2016

tsoome added a reviewer for D8644: loader: dosfs can corrupt memory: bapt.
Dec 18 2016, 11:00 PM
tsoome added a reviewer for D8608: boot2 will deadlock if extended keys are used on text input: bapt.
Dec 18 2016, 10:51 PM

Dec 12 2016

tsoome accepted D8740: remove network mask calculation for Classful network.

Seems good, I think.

Dec 12 2016, 4:15 PM

Dec 10 2016

tsoome updated the diff for D8581: Replace EFI part devices..

Filter out nested partitions. At least AMI does create device tree like:
../Sata(..)/HD(1,GPT,...)/HD(1,MBR,...) for PMBR entry.

Dec 10 2016, 3:31 PM
tsoome added a comment to D8740: remove network mask calculation for Classful network.

IMO it seems to make sense, but there is the question, how much testing have you done, any class[less] tests?

Dec 10 2016, 12:11 PM

Dec 9 2016

tsoome added a comment to D8740: remove network mask calculation for Classful network.

There is an problem - not enough context. You can use arcanist, or just tell svn diff to include more {all} lines.

Dec 9 2016, 12:19 PM

Dec 7 2016

tsoome added a comment to D8710: loader: disk/part api needs to use uint64_t offsets.
In D8710#180823, @jhb wrote:

size_t doesn't work since it is not always 64-bits. OTOH, uoff_t gives an unsigned off_t so it might be a natural fit for having an unsigned off_t-sized value.

Dec 7 2016, 5:10 PM

Dec 6 2016

tsoome added a comment to D7589: EFI boot1 and loader Refactoring.

ok, got it built, and initial test. And there is this problem...

Dec 6 2016, 12:06 AM

Dec 5 2016

tsoome added a comment to D7589: EFI boot1 and loader Refactoring.

OK, based on others' reproduction of tsoome's issue on -hackers, I have a credible diagnostic theory.

The new EFI code will try to attach filesystem drivers to every partition, and will end up trying every driver on any partition that doesn't actually contain a filesystem it can recognize. The most obvious example of this would be freebsd-boot partitions containing BIOS boot code. Another would be something containing a non-filesystem. If there's a bug in the dosfs code, this would likely trigger it.

The reason I couldn't reproduce it is that my UFS partition got detected as UFS first, and my dosfs partition was bound by the firmware, so it already had an EFI_SIMPLE_FILESYSTEM interface before the boot code ran (so it didn't probe the partition).

The coup-de-gras here would be to either commit the fix for the dosfs bug, or else disable the dosfs driver and see if it still hangs.

Another issue: since the UEFI spec guarantees that a driver exists which attaches an EFI_SIMPLE_FILESYSTEM interface to any FAT32 partition, do we really need our own dosfs driver in the EFI boot loader? I would think not.

Dec 5 2016, 2:56 PM
tsoome added a comment to D7589: EFI boot1 and loader Refactoring.

tsoome, can I get you to build and test with the extra_logging branch on my github repo: https://github.com/emc2/freebsd

The CFT turned up someone who's having the same error, and I have a few possible root causes I suspect. The extra_logging branch has some extra logging that should help track it down.

Dec 5 2016, 1:37 PM

Dec 4 2016

tsoome added a comment to D8710: loader: disk/part api needs to use uint64_t offsets.
In D8710#180507, @imp wrote:

So why not size_t in all the right places?

Dec 4 2016, 11:40 PM
tsoome updated the diff for D8710: loader: disk/part api needs to use uint64_t offsets.

bd_ioctl changed off_t to uint64_t

Dec 4 2016, 6:14 PM
tsoome retitled D8710: loader: disk/part api needs to use uint64_t offsets from to loader: disk/part api needs to use uint64_t offsets.
Dec 4 2016, 12:55 PM

Dec 1 2016

tsoome committed rS309370: Backing out r309368 as it got commited prematurely as we still do not.
Backing out r309368 as it got commited prematurely as we still do not
Dec 1 2016, 8:32 PM