Bug 217935 - r315408 breaks userboot.so
Summary: r315408 breaks userboot.so
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Many People
Assignee: Toomas Soome
URL:
Keywords: bhyve, needs-patch, regression
Depends on:
Blocks:
 
Reported: 2017-03-20 04:13 UTC by Fabian Freyer
Modified: 2018-02-10 04:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Freyer 2017-03-20 04:13:22 UTC
in r315408, disk_cleanup was removed, which is called at sys/boot/userboot/userboot/userboot_disk.c:113. This causes bhyveload to fail with the following error message:

    /boot/userboot.so: Undefined symbol "disk_cleanup"

Given that disk_cleanup just cleans up some caching, I'm not sure if it's actually needed by userboot. I'll try to whip up a patch to remove that code from sys/boot/userboot/userboot/userboot_disk.c.
Comment 1 Mark Linimon freebsd_committer 2017-03-20 08:13:59 UTC
Over to committer of r315408.
Comment 2 Toomas Soome freebsd_committer 2017-03-20 08:37:48 UTC
(In reply to Fabian Freyer from comment #0)


If you could check https://reviews.freebsd.org/D10060
Comment 3 Fabian Freyer 2017-03-20 15:09:56 UTC
D10060 fixes the problem for me.
Comment 4 commit-hook freebsd_committer 2017-03-20 18:04:14 UTC
A commit references this bug:

Author: tsoome
Date: Mon Mar 20 18:03:40 UTC 2017
New revision: 315645
URL: https://svnweb.freebsd.org/changeset/base/315645

Log:
  loader: disk_cleanup was left in userboot_disk.c

  In r315408, disk_cleanup was removed, which is called at
  sys/boot/userboot/userboot/userboot_disk.c:113.
  This causes bhyveload to fail.

  PR:		217935
  Reported by:	Fabian Freyer
  Reviewed by:	allanjude
  Approved by:	allanjude (mentor)
  Differential Revision:	https://reviews.freebsd.org/D10060

Changes:
  head/sys/boot/userboot/userboot/userboot_disk.c
Comment 5 commit-hook freebsd_committer 2018-02-10 04:38:51 UTC
A commit references this bug:

Author: kevans
Date: Sat Feb 10 04:37:45 UTC 2018
New revision: 329099
URL: https://svnweb.freebsd.org/changeset/base/329099

Log:
  MFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042,
  r313047,r313166,r313328,r313332,r313333,r313337,r313348,r313349,r313389,
  r313442,r313451,r313575,r313645,r313710,r314114,r314213,r314275,r314945,
  r314948,r315008,r315408,r315427,r315645,r315646,r315648,r315653,r315850,
  r316064,r316078,r316079,r316100,r316104,r316111,r316112,r316171,r316279,
  r316280,r316287,r316311,r316343,r316424,r316436

  r311458: Use compiler driver to link BERI boot loaders

  r312237: loader.efi: find_currdev() can leak memory

  r312314: loader: move device path definitions to include/efidevp.h

  r312374: loader: efi devpath api usage should be more aware of NULL pointers

  r312947: Remove "-Xassembler -G0" from CFLAGS.

  r313042: loader.efi environment related cleanups

  r313047: loader: disk/part api needs to use uint64_t offsets

  r313166: loader: libefi/env.c warnings in arm build

  r313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and
  DIOCGMEDIASIZE.

  r313332: loader: bcache read ahead block count should take account the large
  sectors

  r313333: loader: Replace EFI part devices.

  r313337: loader: 313329 missed ZFS guard in loader/main.c

  r313348: loader: biosdisk fix for 2+TB disks

  r313349: loader: disk io should not use alloca()

  r313389: efipart is also using the '%S' printf format, add -Wno-format for
  it.

  r313442: loader: possible NULL pointer dereference in efipart.c

  r313451: loader: possible NULL pointer dereference in bcache.c

  r313575: makefs: make the buffer functions look exactly like the kernel ones

  r313645: loader: implement MEDIA_FILEPATH_DP support in efipart

  r313710: loader: cstyle fixes and DIOCGMEDIASIZE should use uint64_t

  r314114: Use LDFLAGS with CC instead of _LDFLAGS.

  r314213: Remove control+r handling from geliboot's pwgets()

  r314275: Remove unused macro from common/drv.c.

  r314945: Some style(9) fixes. No functional changes.

  r314948: Try to extract the RFC1048 data from PXE.

  r315008: r314948 seems to be missing a variable or two that will break

  r315408: loader: remove open_disk cache

  r315427: loader: biosdisk should report IO error from INT13

  r315645: loader: disk_cleanup was left in userboot_disk.c

  r315646: loader: pxe.h constants have wrong values

  r315648: libstand: verify value provided by nfs.read_size

  r315653: loader: verify the value from dhcp.interface-mtu and use snprintf
  o set mtu

  r315850: The original author abused Nd (one-line description, used by
  makewhatis)

  r316064: Fix build with path names with 'align' or 'nop' in them.

  r316078: gpt*boot: Save a bit more memory when LOADER_NO_GELI_SUPPORT is
  specified

  r316079: Simply retire the sedification of the boot2.s file.

  r316100: Remove -fno-guess-branch-probability and -fno-unit-at-a-time.

  r316104: Use `NO_WCAST_ALIGN` instead of spelling it out as -Wno-cast-align
  in CFLAGS

  r316111: loader: move bios getsecs into time.c

  r316112: loader: ls command should display file types properly

  r316171: xfsread inlined uses more space, so remove the inline tag.

  r316279: loader: efipart should check disk size from partition table

  r316280: loader: simplify efi_zfs_probe and avoid double probing for zfs.

  r316287: Remove OLD_NFSV2 from loader and libstand

  r316311: Add explicit_bzero() to libstand, and switch GELIBoot to using it

  r316343: Implement boot-time encryption key passing (keybuf)

  r316424: Fix sparc64 build broken by r316343 and r316076

  r316436: Restore EFI boot environment functionality broken in r313333

  PR:		216940 217298 217935

Changes:
_U  stable/11/
  stable/11/lib/libstand/Makefile
  stable/11/lib/libstand/bootp.c
  stable/11/lib/libstand/bootp.h
  stable/11/lib/libstand/nfs.c
  stable/11/lib/libstand/nfsv2.h
  stable/11/lib/libstand/stand.h
  stable/11/sys/boot/common/bcache.c
  stable/11/sys/boot/common/bootstrap.h
  stable/11/sys/boot/common/dev_net.c
  stable/11/sys/boot/common/disk.c
  stable/11/sys/boot/common/disk.h
  stable/11/sys/boot/common/ls.c
  stable/11/sys/boot/common/part.c
  stable/11/sys/boot/common/part.h
  stable/11/sys/boot/efi/include/efidevp.h
  stable/11/sys/boot/efi/include/efilib.h
  stable/11/sys/boot/efi/libefi/Makefile
  stable/11/sys/boot/efi/libefi/devpath.c
  stable/11/sys/boot/efi/libefi/efinet.c
  stable/11/sys/boot/efi/libefi/efipart.c
  stable/11/sys/boot/efi/libefi/env.c
  stable/11/sys/boot/efi/libefi/wchar.c
  stable/11/sys/boot/efi/loader/conf.c
  stable/11/sys/boot/efi/loader/devicename.c
  stable/11/sys/boot/efi/loader/main.c
  stable/11/sys/boot/forth/beastie.4th.8
  stable/11/sys/boot/forth/loader.4th
  stable/11/sys/boot/geli/Makefile
  stable/11/sys/boot/geli/geliboot.c
  stable/11/sys/boot/geli/geliboot.h
  stable/11/sys/boot/geli/geliboot_crypto.c
  stable/11/sys/boot/geli/geliboot_internal.h
  stable/11/sys/boot/geli/pwgets.c
  stable/11/sys/boot/i386/boot2/Makefile
  stable/11/sys/boot/i386/boot2/boot2.c
  stable/11/sys/boot/i386/btx/lib/btxv86.h
  stable/11/sys/boot/i386/common/bootargs.h
  stable/11/sys/boot/i386/common/drv.c
  stable/11/sys/boot/i386/gptboot/Makefile
  stable/11/sys/boot/i386/gptboot/gptboot.c
  stable/11/sys/boot/i386/gptzfsboot/Makefile
  stable/11/sys/boot/i386/libi386/bioscd.c
  stable/11/sys/boot/i386/libi386/biosdisk.c
  stable/11/sys/boot/i386/libi386/bootinfo32.c
  stable/11/sys/boot/i386/libi386/bootinfo64.c
  stable/11/sys/boot/i386/libi386/pxe.c
  stable/11/sys/boot/i386/libi386/pxe.h
  stable/11/sys/boot/i386/libi386/time.c
  stable/11/sys/boot/i386/loader/Makefile
  stable/11/sys/boot/i386/loader/main.c
  stable/11/sys/boot/i386/zfsboot/zfsboot.c
  stable/11/sys/boot/mips/beri/boot2/Makefile
  stable/11/sys/boot/mips/beri/common/common.ldscript
  stable/11/sys/boot/mips/beri/loader/beri_disk_cfi.c
  stable/11/sys/boot/mips/beri/loader/beri_disk_sdcard.c
  stable/11/sys/boot/mips/beri/loader/loader.ldscript
  stable/11/sys/boot/sparc64/loader/Makefile
  stable/11/sys/boot/uboot/lib/disk.c
  stable/11/sys/boot/usb/storage/umass_loader.c
  stable/11/sys/boot/userboot/userboot/userboot_disk.c
  stable/11/sys/boot/zfs/libzfs.h
  stable/11/sys/boot/zfs/zfs.c
  stable/11/sys/crypto/intake.h
  stable/11/sys/geom/eli/g_eli.c
  stable/11/sys/geom/eli/g_eli.h
  stable/11/sys/opencrypto/crypto.c
  stable/11/sys/sys/linker.h
  stable/11/usr.sbin/makefs/ffs/buf.c
  stable/11/usr.sbin/makefs/ffs/buf.h
  stable/11/usr.sbin/makefs/ffs/ffs_alloc.c
  stable/11/usr.sbin/makefs/ffs/ffs_balloc.c
  stable/11/usr.sbin/makefs/ffs.c