Re: HEADS-UP: ASLR for 64-bit executables enabled by default on main

2021-11-20 Thread Ed Maste
On Thu, 18 Nov 2021 at 13:09, Li-Wen Hsu  wrote:
>
> The mkimg ones are a bit tricky, it seems the output is changed in
> each run. We may need a way to generate reproducible results..

Hopefully fixed by 036af1053acd6cae68c5fb6bed30508f2e40be13.



Re: 14.0-CURRENT panic in early boot

2021-11-20 Thread Daniel Morante via freebsd-current

I've seen it on an arm64 system:

KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x174
panic() at panic+0x44
do_el1h_sync() at do_el1h_sync+0x184
handle_el1h_sync() at handle_el1h_sync+0x78
--- exception, esr 0x200
vt_conswindow() at vt_conswindow+0x10
(null)() at -0x4
(null)() at 0x0001
Uptime: 3s

The full log is here: 
http://venus.morante.net/downloads/unibia/screenshots/freebsd/R281-T91/14-CURRENT-4082b189d2c/failed-boot1.txt


On 11/18/2021 12:22 AM, Dustin Marquess wrote:

I just updated a machine from a build that was ~2 weeks old. The
latest commit when I built it was 2e946f87055.

The system boots using UEFI, if that matters. The system is panicking
pretty early in the boot, however:

real memory  = 137438953472 (131072 MB)
avail memory = 133651496960 (127460 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 32 CPUs
FreeBSD/SMP: 2 package(s) x 8 core(s) x 2 hardware threads
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
kernel trap 12 with interrupts disabled
panic: vm_fault_lookup: fault on nofault entry, addr: 0x81e1d000
cpuid = 0
time = 1


The backtrace shows:

KDB: stack backtrace:
#0 0x806deb5b at kdb_backtrace+0x6b
#1 0x80693b44 at vpanic+0x184
#2 0x806939b3 at panic+0x43
#3 0x8091d4b3 at vm_fault+0x1423
#4 0x8091bfb0 at vm_fault_trap+0xb0
#5 0x809c0902 at trap_pfault+0x1f2
#6 0x809992b8 at calltrap+0x8
#7 0x806ebcc1 at vsscanf+0x31
#8 0x806ebc7f at sscanf+0x3f
#9 0x806bd9ab at validate_uuid+0x8b
#10 0x80655be0 at prison0_init+0x90
#11 0x80623aba at proc0_init+0x29a
#12 0x80623689 at mi_startup+0xe9
#13 0x802e3062 at btext+0x22
Uptime: 1s

Compared to a boot using the old working kernel:

real memory  = 137438953472 (131072 MB)
avail memory = 133651505152 (127460 MB)
ACPI APIC Table: 
FreeBSD/SMP: Multiprocessor System Detected: 32 CPUs
FreeBSD/SMP: 2 package(s) x 8 core(s) x 2 hardware threads
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
ioapic0  irqs 0-23
ioapic1  irqs 24-47
ioapic2  irqs 48-71
Launching APs: 1 11 28 15 18 6 29 4 16 9 24 7 3 10 27 22 14 13 12 23
25 20 26 30 17 5 2 21 19 8 31
Timecounter "TSC-low" frequency 1197250876 Hz quality 1000

Has anybody else seen this?
-Dustin



smime.p7s
Description: S/MIME Cryptographic Signature


Re: aarch64(?) poudiere-devel based builds seem to get fairly-rare corrupted files after recent system update(s?)

2021-11-20 Thread Mark Millard via freebsd-current
On 2021-Nov-19, at 22:20, Mark Millard  wrote:

> On 2021-Nov-18, at 12:15, Mark Millard  wrote:
> 
>> On 2021-Nov-17, at 11:17, Mark Millard  wrote:
>> 
>>> On 2021-Nov-15, at 15:43, Mark Millard  wrote:
>>> 
 On 2021-Nov-15, at 13:13, Mark Millard  wrote:
 
> On 2021-Nov-15, at 12:51, Mark Millard  wrote:
> 
>> On 2021-Nov-15, at 11:31, Mark Millard  wrote:
>> 
>>> I updated from (shown a system that I've not updated yet):
>>> 
>>> # uname -apKU
>>> FreeBSD CA72_4c8G_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #18 
>>> main-n250455-890cae197737-dirty: Thu Nov  4 13:43:17 PDT 2021 
>>> root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm64.aarch64/sys/GENERIC-NODBG-CA72
>>>   arm64 aarch64 
>>> 1400040 1400040
>>> 
>>> to:
>>> 
>>> # uname -apKU
>>> FreeBSD CA72_16Gp_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #19 
>>> main-n250667-20aa359773be-dirty: Sun Nov 14 02:57:32 PST 2021 
>>> root@CA72_16Gp_ZFS:/usr/obj/BUILDs/main-CA72-nodbg-clang/usr/main-src/arm64.aarch64/sys/GENERIC-NODBG-CA72
>>>   arm64 aarch64 1400042 1400042
>>> 
>>> and then updated /usr/ports/ and started poudriere-devel based builds of
>>> the ports I's set up to use. However my last round of port builds from
>>> a general update of /usr/ports/ were on 2021-10-23 before either of the
>>> above.
>>> 
>>> I've had at least two files that seem to be corrupted, where a later 
>>> part
>>> of the build hits problematical file(s) from earlier build activity. For
>>> example:
>>> 
>>> /usr/local/include/X11/extensions/XvMC.h:1:1: warning: null character 
>>> ignored [-Wnull-character]
>>>  
>>> ^
>>> /usr/local/include/X11/extensions/XvMC.h:1:2: warning: null character 
>>> ignored [-Wnull-character]
>>> 
>>>  ^
>>> /usr/local/include/X11/extensions/XvMC.h:1:3: warning: null character 
>>> ignored [-Wnull-character]
>>>  
>>>  ^   
>>> /usr/local/include/X11/extensions/XvMC.h:1:4: warning: null character 
>>> ignored [-Wnull-character]
>>> 
>>>  ^
>>> . . .
>>> 
>>> Removing the xorgproto-2021.4 package and rebuilding via
>>> poudiere-devel did not get a failure of any ports dependent
>>> on it.
>>> 
>>> This was from a use of:
>>> 
>>> # poudriere jail -j13_0R-CA7 -i
>>> Jail name: 13_0R-CA7
>>> Jail version:  13.0-RELEASE-p5
>>> Jail arch: arm.armv7
>>> Jail method:   null
>>> Jail mount:/usr/obj/DESTDIRs/13_0R-CA7-poud
>>> Jail fs:   
>>> Jail updated:  2021-11-04 01:48:49
>>> Jail pkgbase:  disabled
>>> 
>>> but another not-investigated example was from:
>>> 
>>> # poudriere jail -j13_0R-CA72 -i
>>> Jail name: 13_0R-CA72
>>> Jail version:  13.0-RELEASE-p5
>>> Jail arch: arm64.aarch64
>>> Jail method:   null
>>> Jail mount:/usr/obj/DESTDIRs/13_0R-CA72-poud
>>> Jail fs:   
>>> Jail updated:  2021-11-04 01:48:01
>>> Jail pkgbase:  disabled
>>> 
>>> (so no 32-bit COMPAT involved). The apparent corruption
>>> was in a different port (autoconfig, noticed by the
>>> build of automake failing via config reporting
>>> /usr/local/share/autoconf-2.69/autoconf/autoconf.m4f
>>> being rejected).
>>> 
>>> /usr/obj/DESTDIRs/13_0R-CA7-poud/ and
>>> /usr/obj/DESTDIRs/13_0R-CA72-poud/ and the like track the
>>> system versions.
>>> 
>>> The media is an Optane 960 in the PCIe slot of a HoneyComb
>>> (16 Cortex-A72's). The context is a root on ZFS one, ZFS
>>> used in order to have bectl, not redundancy.
>>> 
>>> The ThreadRipper 1950X (so amd64) port builds did not give
>>> evidence of such problems based on the updated system. (Also
>>> Optane media in a PCIe slot, also root on ZFS.) But the
>>> errors seem rare enough to not be able to conclude much.
>> 
>> For aarch64 targeting aarch64 there was also this
>> explicit corruption notice during the poudriere(-devel)
>> bulk build:
>> 
>> . . .
>> [CA72_ZFS] Extracting arm-none-eabi-gcc-8.4.0_3: .
>> pkg-static: Fail to extract 
>> /usr/local/libexec/gcc/arm-none-eabi/8.4.0/lto1 from package: Lzma 
>> library error: Corrupted input data
>> [CA72_ZFS] Extracting arm-none-eabi-gcc-8.4.0_3... done
>> 
>> Failed to install the following 1 package(s): 
>> /packages/All/arm-none-eabi-gcc-8.4.0_3.pkg
>> *** Error code 1
>> Stop.
>> make: stopped in /usr/ports/sysutils/u-boot-orangepi-plus-2e
>> 
>> I'm not yet to the point of retrying after removing
>> arm-none-eabi-gcc-8.4.0_3 : other things are being built.
> 
> 
> Another context with my prior general update of /usr/ports/
> and the matching port