f1e0cb5e jhibbits Dec. 4, 2018, 3:51 a.m.
The same behavior was moved to machdep.c, paired with AIM's relocation,
making this redundant.  With this, it's now possible to boot FreeBSD with
ubldr on a uboot Book-E platform, even with a
cgit ViewVC
8dfd9dcd sbruno Dec. 4, 2018, 3:23 a.m.
- breaks ports-mgmt/pkg build for mips64, powerpc64 and i386 for some users.

--- pkg-static ---
/usr/lib/liblzma.a(stream_encoder_mt.o): In function `mythread_cond_init':
undefined reference to `pthread_condattr_init'

Reported by:	jhibbits zeising
cgit ViewVC
1b5dbfa8 brooks Dec. 4, 2018, 12:22 a.m.
Approved by:	julian
cgit ViewVC
3a325dec brooks Dec. 4, 2018, 12:15 a.m.
Construct a struct image_args with the help of new exec_args_*() helper
functions and call kern_execve().

The previous code mapped a page in userspace, copied arguments out
to it one at a time, and then constructed a struct execve_args all so
that sys_execve() can call exec_copyin_args() to copy the data back in
to a struct image_args.

Opencode the part of pre_execve()/post_execve() that releases a
reference to the initial vmspace. We don't need to stop threads like
they do.

Reviewed by:	kib, jhb (prior version)
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15469
cgit ViewVC
a66732de kib Dec. 3, 2018, 11:42 p.m.
No type-specific data is provided by the kernel.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
cgit ViewVC
f1863400 kib Dec. 3, 2018, 11:39 p.m.
If there is a vnode attached to the linux file, use it to fill
kinfo_file.  Otherwise, report a new KF_TYPE_DEV file type, without
supplying any type-specific information.

KF_TYPE_DEV is supposed to be used by most devfs-specific file types.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
cgit ViewVC
709bc7e0 yuripv Dec. 3, 2018, 10:31 p.m.
This fixes 'cdrom' target in the case when world was built by user,
and not root.

Reviewed by:	imp
Differential revision:	https://reviews.freebsd.org/D18414
cgit ViewVC
52af9967 brooks Dec. 3, 2018, 10:09 p.m.
Reviewed by:	kib
Sponsored by:	DARPA, AFRL
cgit ViewVC
02164d36 markj Dec. 3, 2018, 9:07 p.m.
Reported by:	jenkins
MFC with:	r341442
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
352aaa51 markj Dec. 3, 2018, 8:54 p.m.
On some architectures, the structures returned by PT_GET*REGS were not
fully populated and could contain uninitialized stack memory.  The same
issue existed with the register files in procfs.

Reported by:	Thomas Barabosch, Fraunhofer FKIE
Reviewed by:	kib
MFC after:	3 days
Security:	kernel stack memory disclosure
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18421
cgit ViewVC
4903c73f kib Dec. 3, 2018, 8:03 p.m.
- Do not perform ifunc relocations together with other PLT relocations
  in PLT.  Instead, do it during an additional pass over the init
  list, so that ifuncs are resolved in the order of dso
  dependencies. This allows the ifuncs resolvers to call into depended
  libs.  Init list now includes all objects instead of only objects
  with init/fini callables.
- Disable relro protection around bind_now ifunc relocations.

I considered calling ifunc resolvers of dso after initializers of all
dependencies are processed, and decided that this is wrong/should not
be supported. The order now is normal relocations for all
objects->ifunc resolution in init order->initializers, where each step
does complete pass over all loaded objects before moving to the next

Reported, tested and reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D18400
cgit ViewVC
d7a57037 sevan Dec. 3, 2018, 8:01 p.m.
Move cross ref to right place while here.

Submitted by:	kib
MFC after:	7 days
cgit ViewVC
5962a71e kib Dec. 3, 2018, 7:55 p.m.
bzero(3) for rtld.

This again reduces rtld dependency on libc, and in future, avoid ifunc
relocations when the functions are converted to ifuncs in libc.

Reported by:	mjg
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D18400
cgit ViewVC
7aaf685b tsoome Dec. 3, 2018, 7:35 p.m.
loader has been supporting large_dnode for some time, no need to block the
feature for boot dataset.

Reviewed by:	avg
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D18391
cgit ViewVC
f7eb23ee emaste Dec. 3, 2018, 7:16 p.m.
As part of the migration away from obsolete binutils we want to retire
GNU as.  Most assembly files used on amd64 have a .S extension and
(via rules in share/mk/bsd.suffixes.mk) are assembled with Clang's
Integrated Assembler (IAS).  Rename files in stand/i386 to .S to use
the integrated assembler.

Clang's IAS supports the defsym option (via -Wa,) but only with one
dash, not two.  As both -defsym and --defsym are accepted by GNU as,
use the former.

PR:		233611
Reviewed by:	tsoome
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D18369
cgit ViewVC