imp (Warner Losh)
User

Projects

User Details

User Since
Jun 2 2014, 4:20 PM (194 w, 6 d)

Recent Activity

Today

imp committed rS330007: loader.conf is loader agnostic, so remove 4th references..
loader.conf is loader agnostic, so remove 4th references.
Mon, Feb 26, 3:17 AM
imp committed rS330006: Take a meat cleaver to defaults/loader.conf.
Take a meat cleaver to defaults/loader.conf
Mon, Feb 26, 3:17 AM
imp committed rS330005: Go back to one loader.conf.
Go back to one loader.conf
Mon, Feb 26, 3:17 AM
imp committed rS330004: Add NO_OBJ to those directories that don't make anything..
Add NO_OBJ to those directories that don't make anything.
Mon, Feb 26, 3:16 AM
imp added a comment to D14465: Create sysctl hw.model on ARM.
In D14465#304163, @ian wrote:

It would actually be nice to export the board/system model string from FDT data as well, but we'd have to make a new hw.<something> oid name for it since the obvious name was already taken to mean "cpu type".

Mon, Feb 26, 12:01 AM · ARM

Sat, Feb 24

imp accepted D14198: Prevent getty(8) from looping if the device node doesn't exist..

OK.

Sat, Feb 24, 4:05 PM
imp accepted D14478: liblua: Implement write support.

With all the comments, this has gotten hard to follow, but from what I am reading it looks good to me.

Sat, Feb 24, 2:06 AM
imp added a comment to D14494: The console name has to match the /dev name for /dev/console to work..

This is opposite the direction taken already. The low-level console is defined in terms of hardware resources only. The uart(4) driver will map the low-level console to the newbus device during bus enumeration. The unit number is not a hardware resource. It's a newbus device property.

As such, the changes are architecturally wrong. Instead, we need support for setting or changing the name in the consider structure during bus enumeration. If that basic support is already there (say, by virtue of the kernel not using the name until after bus enumeration) then the fix is to set the name during bus enumeration when we have a device that maps the the low-level console.

Sat, Feb 24, 12:14 AM

Fri, Feb 23

imp abandoned D14494: The console name has to match the /dev name for /dev/console to work..

OK. This was caused by loading uart int the boot loader and having it in the kernel. Abandoning.

Fri, Feb 23, 11:48 PM
imp added a reviewer for D14494: The console name has to match the /dev name for /dev/console to work.: jhb.
Fri, Feb 23, 11:31 PM
imp added reviewers for D14494: The console name has to match the /dev name for /dev/console to work.: ed, marcel.
Fri, Feb 23, 11:31 PM
imp created D14494: The console name has to match the /dev name for /dev/console to work..
Fri, Feb 23, 11:30 PM
imp committed rS329866: Use bool instead of int for predicate functions relating to work.
Use bool instead of int for predicate functions relating to work
Fri, Feb 23, 4:07 PM
imp accepted D14482: libsa: Const-ify buffer argument of write(2) analog.
Fri, Feb 23, 2:47 PM
imp accepted D14483: Fix sysutils/smartmontools following Sr329824.

Looks good to me.

Fri, Feb 23, 2:21 PM
imp added a comment to D14478: liblua: Implement write support.

great start

Fri, Feb 23, 5:29 AM
imp committed rS329860: Floaty McFloatface is funnier....
Floaty McFloatface is funnier...
Fri, Feb 23, 4:06 AM
imp committed rS329859: Do not include float interfaces when using libsa..
Do not include float interfaces when using libsa.
Fri, Feb 23, 4:04 AM
imp committed rS329858: When the LUA_FLOAT_TYPE != LUA_FLOAT_INT64, we can't reference float.
When the LUA_FLOAT_TYPE != LUA_FLOAT_INT64, we can't reference float
Fri, Feb 23, 4:04 AM
imp closed D14472: When the LUA_FLOAT_TYPE != LUA_FLOAT_INT64, we can't reference float or double so ifdef that code out when the numbers aren't float at all..
Fri, Feb 23, 4:04 AM
imp committed rS329857: Centralize lua defines.
Centralize lua defines
Fri, Feb 23, 4:04 AM

Thu, Feb 22

imp added a comment to D14471: ubldr: Bump heap size from 512K to 8MB.
In D14471#303486, @ian wrote:

ubldr will find an unused block of space large enough to load the kernel into, and is smart enough to avoid loading it over top of itself or its own heap. There's nothing that prevents running into the stack (which is uboot's stack, at the very top of physical ram), but generally $loadaddr in uboot is somewhere near the bottom of ram and the vast majority of the memory on the board is available between the ubldr heap and stack.

Whether 8mb is a good number depends on whether ubldr is used on any small-memory systems. When I said "even 8mb would work fine" in irc the other day, I was thinking in terms of doing a smoke-test to see if increasing the heap fixed the problem. It might be interesting to see how much ubldr is really using, which can probably be done by defining ZALLOCDEBUG and calling zallocstats() just before launching the kernel. Maybe 2mb is more than enough.

Thu, Feb 22, 8:35 PM
imp accepted D14473: userboot: add callbacks to set unrestricted guest mode.
Thu, Feb 22, 7:27 PM · bhyve
imp accepted D14471: ubldr: Bump heap size from 512K to 8MB.

I think this is fine, but what does it do to the minimum sized we can boot on? And does this interfere with where we load the kernel? Is there an overlap? Of is that just a u-boot issue?

Thu, Feb 22, 7:11 PM
imp created D14472: When the LUA_FLOAT_TYPE != LUA_FLOAT_INT64, we can't reference float or double so ifdef that code out when the numbers aren't float at all..
Thu, Feb 22, 5:43 PM
imp committed rS329821: Revert r329814 as well. It should have been in r329819..
Revert r329814 as well. It should have been in r329819.
Thu, Feb 22, 11:52 AM
imp committed rS329819: Backout r329818, r329816 and r329815..
Backout r329818, r329816 and r329815.
Thu, Feb 22, 11:18 AM
imp committed rS329818: Fix typo in last commit after last rebase before commit....
Fix typo in last commit after last rebase before commit...
Thu, Feb 22, 10:55 AM
imp committed rS329816: Combine BIO_DELETE requests for nda devices.
Combine BIO_DELETE requests for nda devices
Thu, Feb 22, 5:44 AM
imp committed rS329815: Introduce capacity flags for periphs.
Introduce capacity flags for periphs
Thu, Feb 22, 5:44 AM
imp committed rS329814: Note when we tick..
Note when we tick.
Thu, Feb 22, 5:44 AM
imp committed rS329813: Wrap an extra long line.
Wrap an extra long line
Thu, Feb 22, 5:44 AM
imp committed rS329812: Don't sort TRIMs..
Don't sort TRIMs.
Thu, Feb 22, 5:43 AM
imp requested changes to D14465: Create sysctl hw.model on ARM.

You need to do runtime CPU detection, and do it for all the other SoC families.

Thu, Feb 22, 1:21 AM · ARM

Wed, Feb 21

imp committed rS329764: Minor formatting nits..
Minor formatting nits.
Wed, Feb 21, 11:49 PM
imp committed rS329763: Add LOADER_DEBUG regression test.
Add LOADER_DEBUG regression test
Wed, Feb 21, 11:49 PM
imp updated the diff for D14456: First cut at fixing locking on da..

daerror should be called with the periph lock held, assert it rather
than take it.

Wed, Feb 21, 11:28 PM
imp added a comment to D14230: u-boot: Update to v2018.01.

Basically, the project doesn't have the bandwidth to support multiple versions of u-boot, unless there's a demonstrated actual need (not a theoretical need) to do so.
All board use the same version. Any board / SoC family that can will get a one or two release in upstream to get it fixed, then cut loose. We don't have the resources to support something so 'backwater' as to lose upstream u-boot support.
We depend heavily on upstream support, and if that ceases, the solution isn't to freeze that version. The solution is to delete the ports affected and drop support for the board.
To date, we've had no issues since the big switch supporting one version, though the infrastructure allows for one per family if needed.
I want only one version of packages. It greatly increases the support load to deal with old versions of u-boot and we get fewer complaints of breakage if recovery from breakage is easy. Since breakage is rare, we bias to fast discovery rather than bending over backwards to keep the user up and running. The cost/benefit ratio is far too low for this platform to be able to do that absent some compelling, as yet to be articulated, benefit.

Wed, Feb 21, 8:10 PM
imp committed rS329726: Honor settings for including / excluding cd9660, ufs, ext2fs and msdos..
Honor settings for including / excluding cd9660, ufs, ext2fs and msdos.
Wed, Feb 21, 3:58 PM
imp committed rS329725: Consolidate three copies of ZFS commands into a central location..
Consolidate three copies of ZFS commands into a central location.
Wed, Feb 21, 3:58 PM
imp accepted D14435: stand/zfs: Add all bootenvs to environment.

In an ideal world, you'd have a richer set of Lua functionality for the ZFS module. However, our current build system make that a bit of a challenge. So for the moment, this is fine.

Wed, Feb 21, 3:55 PM
imp added a comment to D14198: Prevent getty(8) from looping if the device node doesn't exist..

I tried digging a little, and unfortunately the loop comes from before our repo history starts - r1593, which is some RCS repo surgery by rgrimes@. I have no idea what's the original purpose of it, and given there's some esoteric functionality there - mostly related to chat scripts - that I'm not able to easily test, I'd prefer to leave it as it is. It is been there forever, someone might depend on it.

Regarding init(8) looping - that's true, but it's intended to be used with "onifexists", which won't loop when the device disappears.

So - is it ok? Can you mark it as accepted? Thanks!

Wed, Feb 21, 3:47 PM
imp accepted D14197: Build getty(8) with WARNS=6.

Should have ticked OK sooner. There's some issues, as noted, but the new bugs introduced have been fixed so they can wait for another day.

Wed, Feb 21, 3:38 PM
imp added a comment to D14242: Enable kernel retpoline support.
In D14242#302984, @jhb wrote:
In D14242#302969, @imp wrote:
In D14242#302967, @imp wrote:

Since kernel config files set 'makeoptions' it should use WITH/WITHOUT.

This is really what the question was about - should WITH_RETPOLINE be set in GENERIC, or via src.conf?

I'd set it in GENERIC which makes it default. People can turn it off if they need to.

Just to be clear, if you are using an external toolchain that doesn't support retpoline can you disable it from the command line or do you have to use a custom kernel config if it is in GENERIC? Should be easy to test today with 'pkg install amd64-xtoolchain-gcc' and 'make CROSS_TOOLCHAIN=amd64-gcc' with a patched source tree and updated GENERIC. Ideally you can use 'make WITHOUT_RETPOLINE=yes buildkernel' to override it, but it makes it a bit more of a PITA if you have to have a modified kernel config.

Wed, Feb 21, 12:44 AM

Tue, Feb 20

imp created D14456: First cut at fixing locking on da..
Tue, Feb 20, 11:57 PM
imp added a comment to D14242: Enable kernel retpoline support.
In D14242#302967, @imp wrote:

Since kernel config files set 'makeoptions' it should use WITH/WITHOUT.

This is really what the question was about - should WITH_RETPOLINE be set in GENERIC, or via src.conf?

Tue, Feb 20, 9:32 PM
imp added a comment to D14242: Enable kernel retpoline support.
In D14242#302122, @dim wrote:

Well, if there is only one setting, users will have the choice to compile *everything* with, or without retpoline mitigation. Not sure if there is a scenario where one would want to have a mitigated kernel with a non-mitigated userland, or vice versa?

Intel has a whitepaper at https://software.intel.com/sites/default/files/managed/1d/46/Retpoline-A-Branch-Target-Injection-Mitigation.pdf that explains where retpoline fits in and where it's needed. We want a retpoline-enabled kernel to protect kernel secret data, while there may be cases in userland where after evaluation we decide it is not necessary to apply retpoline.

On the other hand, I now understand that the MK_ settings are normally not how kernel options are configured, they're more supposed to go into the config files like GENERIC, right?

This is one of the things I'm not completely sure of. We do have an existing case in MK_CTF - it is set in kernel configs via WITH_CTF=1. I could commit this change now and we could adjust it before MFC if necessary.

Tue, Feb 20, 9:12 PM
imp accepted D14446: liblua: Add loader.machine and loader.machine_arch properties.

These are fine, but I wonder if it might not be better to have a MD module in the loader that exports attributes of the architecture.... If we use this for more than a few things, we should consider that path instead...

Tue, Feb 20, 5:38 PM
imp accepted D14450: lualoader: Add ability to intercept cli commands.

I'm good either way, but if you keep what you have a quick comment wouldn't be terrible.

Tue, Feb 20, 5:32 PM
imp committed rS329643: Implement loader.command.
Implement loader.command
Tue, Feb 20, 5:29 PM
imp added inline comments to D14450: lualoader: Add ability to intercept cli commands.
Tue, Feb 20, 5:20 PM
imp created D14448: Prototype for loader.command.
Tue, Feb 20, 4:31 PM
imp added inline comments to D14442: stand: Improve common "boot" command.
Tue, Feb 20, 3:08 PM
imp added inline comments to D14442: stand: Improve common "boot" command.
Tue, Feb 20, 3:04 PM
imp added a comment to D14442: stand: Improve common "boot" command.

I'd honestly feel better if we did this in Lua instead.

Tue, Feb 20, 3:00 PM
imp added a comment to D14433: PowerPC: Switch to more accurate unit to avoid division rounding.

Just a comment on uint64_t: ps is 10^12, which is 36 bits to represent 1s, so switching to uint64_t will gives the most safety, especially given that the howmany macro isn't careful about overflow. Since it's just used in DELAY, and we know n for delay is usually small except in some crazy old ISA drivers, it likely worked or closely worked with 32-bit types. It wouldn't hit problems until several hundred or maybe thousand milliseconds if the back of the envelop numbers I just ran are right....
I'd be tempted in DELAY to s/u_quad_t/uint64_t/g since the quad name for that type is discouraged, but it's not a bug deal either way.
Quibbles aside, this was a good change before the change to 64-bit, and is a better change with that change as clocks will only get faster from here.

Tue, Feb 20, 2:46 PM
imp committed rS329633: More verbose output..
More verbose output.
Tue, Feb 20, 5:35 AM

Mon, Feb 19

imp added a comment to D14230: u-boot: Update to v2018.01.
In D14230#302519, @manu wrote:

Just be curious, this patch would affect many u-boot-* which are slave port of this

There are a couple of ways I can see going forward.

My proposal (which imp dislikes intensly) is to have:

  • one u-boot-master-foo port that works exactly like the current one (tracks the FreeBSD u-boot fork). This remains the default masterport. All the packages we build on the cluster will be from this one.

As the one who updated u-boot the last 3 or 4 time, I can say that using the freebsd fork is much harder than using upstream directly.
It also not motivate us to upstream our change and I believe we will soon be in the same case than before, having a lot of patches (except that instead of being in ports repo they will be in the fork repo).
Using config Fragment and U-Boot script is much easier than patches as this will not break (unless something shitty happens in U-Boot).

Mon, Feb 19, 10:52 PM
imp requested changes to D14435: stand/zfs: Add all bootenvs to environment.
Mon, Feb 19, 4:35 PM
imp added a comment to D14435: stand/zfs: Add all bootenvs to environment.

Hey, I'm out today. Do not commit this until I sign off. I have some worries that I don't have time to articulate. I'll get to it first thing in the morning. I think it might be OK, but it might not, so I want to study it carefully. Thanks.

Mon, Feb 19, 4:35 PM

Sun, Feb 18

imp committed rS329538: Print more info for -v runs and temp hack for usb vs uhub.
Print more info for -v runs and temp hack for usb vs uhub
Sun, Feb 18, 11:16 PM

Sat, Feb 17

imp added a comment to D14415: efi: Do not pad the efi devpath structure.

This looks perfect. EDK2 definintions in Include/Protocol/DevicePath.h have it just like this.

Sat, Feb 17, 11:25 PM
imp added inline comments to D14418: Lua loader: Add barebones "lfs" module.
Sat, Feb 17, 10:57 PM
imp added inline comments to D14418: Lua loader: Add barebones "lfs" module.
Sat, Feb 17, 10:08 PM
imp accepted D14417: liblua: Emulate DIR, opendir, fdopendir, closedir.

Love it.

Sat, Feb 17, 10:03 PM
imp added a comment to D14418: Lua loader: Add barebones "lfs" module.

My lua extension fu is weak, but this looks decent to me.

Sat, Feb 17, 10:02 PM
imp accepted D14419: lua loader: Auto detect eligible list of kernels to boot.

This looks really cool!

Sat, Feb 17, 10:00 PM
imp committed rS329445: Pass in the NOMATCH event to devmatch.
Pass in the NOMATCH event to devmatch
Sat, Feb 17, 6:58 AM
imp committed rS329446: Implement --hints to read hints file directly.
Implement --hints to read hints file directly
Sat, Feb 17, 6:58 AM
imp committed rS329444: Add option to parse NOMATCH event and suggest modules to load.
Add option to parse NOMATCH event and suggest modules to load
Sat, Feb 17, 6:57 AM
imp committed rS329443: Tweak the 'I' flagged value.
Tweak the 'I' flagged value
Sat, Feb 17, 6:57 AM
imp committed rS329442: Implement 'T' field matching..
Implement 'T' field matching.
Sat, Feb 17, 6:57 AM
imp committed rS329441: If we're passed an argument, then treat it as a single NOMATCH event.
If we're passed an argument, then treat it as a single NOMATCH event
Sat, Feb 17, 6:57 AM
imp committed rS329440: Correct the PNP information generated by the usb driver to match the.
Correct the PNP information generated by the usb driver to match the
Sat, Feb 17, 6:57 AM
imp committed rS329438: Add description for T specifier. It's for PNP keys that are checked.
Add description for T specifier. It's for PNP keys that are checked
Sat, Feb 17, 6:57 AM
imp committed rS329439: Warn when we encounter unknown PNP field specifiers..
Warn when we encounter unknown PNP field specifiers.
Sat, Feb 17, 6:57 AM
imp committed rS329437: Fixup minor nits in the PNP_INFO protocol..
Fixup minor nits in the PNP_INFO protocol.
Sat, Feb 17, 6:57 AM
imp added inline comments to D14402: PID Controlled page daemon.
Sat, Feb 17, 12:42 AM

Fri, Feb 16

imp added a reviewer for D13916: Add big-endian support to NVMe: scottl.
Fri, Feb 16, 10:05 PM
imp added inline comments to D11886: Implement automatic kernel list in the boot loader.
Fri, Feb 16, 6:58 PM
imp added a comment to D13916: Add big-endian support to NVMe.

Have more to review.

Fri, Feb 16, 6:09 PM
imp accepted D14375: stand/lua: Chop of the decimal for numbers passed to setcursor.

yea, go ahead and commit this. I'd rather we fix lua to generate the right thing, but that's a few days away.

Fri, Feb 16, 4:26 PM
imp committed rS329345: Eliminate bsd.stand.mk and -fPIC 32-bit intel builds.
Eliminate bsd.stand.mk and -fPIC 32-bit intel builds
Fri, Feb 16, 12:18 AM

Thu, Feb 15

imp committed rS329338: Simplify building before installing..
Simplify building before installing.
Thu, Feb 15, 6:58 PM
imp committed rS329337: Report the number of remaining retries when we have an error that.
Report the number of remaining retries when we have an error that
Thu, Feb 15, 6:58 PM
imp added inline comments to D14377: Make it so ufsread.c is linked rather than included..
Thu, Feb 15, 12:34 AM
imp added inline comments to D14181: xinstall: add -P/-F to create parent directories..
Thu, Feb 15, 12:26 AM

Wed, Feb 14

imp added a comment to D14377: Make it so ufsread.c is linked rather than included..

Needs some work still... Likely will need another pass to make sure it all lines up.

Wed, Feb 14, 11:44 PM
imp committed rS329270: Simple script to image a small test area from a built tree. Build with.
Simple script to image a small test area from a built tree. Build with
Wed, Feb 14, 6:22 PM
imp committed rS329266: A quick test script that we can run to use userboot's test mode to.
A quick test script that we can run to use userboot's test mode to
Wed, Feb 14, 5:52 PM
imp accepted D14366: style(9)ify boot2.c.

lgtm, though I must admit to review fatigue

Wed, Feb 14, 1:09 AM
imp added a comment to D14366: style(9)ify boot2.c.

So style(9) requires a blank line at the start of a function with no local variables. I tagged a couple, but there are more.

Wed, Feb 14, 12:31 AM

Tue, Feb 13

imp added inline comments to D14332: libsa: Allow a tftp retry if a sendrecv returns ETIMEDOUT.
Tue, Feb 13, 8:57 PM
imp accepted D14343: Put the rootfs on the correct partition.
Tue, Feb 13, 6:48 PM
imp accepted D14352: Move zstd malloc()/free()/calloc() macros to stdlib.h..
Tue, Feb 13, 5:57 PM
imp committed rS329226: Add /boot/lua..
Add /boot/lua.
Tue, Feb 13, 5:42 PM
imp added a comment to D14352: Move zstd malloc()/free()/calloc() macros to stdlib.h..

this looks fine, apart maybe from the copyright stuff...

Tue, Feb 13, 5:33 PM

Mon, Feb 12

imp accepted D13978: Unify metadata load files for arm, mips, powerpc, sparc64.
Mon, Feb 12, 11:02 PM
imp added inline comments to D14334: efi: Only scan the BLKIO MEDIA once.
Mon, Feb 12, 9:48 PM
imp added inline comments to D14332: libsa: Allow a tftp retry if a sendrecv returns ETIMEDOUT.
Mon, Feb 12, 9:04 PM