a simpler calibration algorithm for the CC timecounter. Proposed in 2018
by Naruaki Etomi:
https://mail-index.netbsd.org/tech-kern/2018/01/14/msg022940.html
This patch is largely based on the proposed change, but avoids changing
any other timecounter logic, and re-factors things a bit to keep them
as MI as possible.
architecture on which 64- and 32-bit ABIs use different values for
PT_GET{,FP}REGS, i.e., aarch64{,eb}.
Now, 32-bit GDB works fine for core files generated by aarch64{,eb}
kernel.
Should be no functional changes for ports other than aarch64{,eb}.
and we were "slim" already)
Support for zic's long-obsolete '-y YEARISTYPE' option has been
removed and, with it, so has support for the TYPE field in Rule
lines, which is now reserved for compatibility with earlier zic.
These features were previously deprecated in release 2015f.
(Thanks to Tim Parenti.)
zic now defaults to '-b slim' instead of to '-b fat'.
zic's new '-l -' and '-p -' options uninstall any existing
localtime and posixrules files, respectively.
The undocumented and ineffective tzsetwall function has been
removed.
make sure to properly account for the "lost" space during all calculations
and especially when expanding the main partition to fill the disk.
Avoid using the global "pm" or a passed device descriptons when we are
passing disk limits explicitly anyway.
Simplify/fix a few rounding calculations.
Rename the MM_REG macro to ST_MAN, to make it clearer that it gets
mantissa of ST registers which overlaps with MM registers but can be
also used to read ST registers (to be used in the next commit). Extend
it to cover the difference between GETFPREGS and GETXSTATE,
and therefore avoid additional condition on i386.
Reviewed by kamil.
With help from skrll and pgoyette.
While here, change the example so it doesn't violate the advice just
given. Still not a great example -- abusing UINT_MAX for a reference
count is kinda sketchy, but it'll serve for now.
Passing a negative value to these legacy compat ioctls results in
left shift on a negative value which is undefined behaviour and results
in the tty (at least, possibly other things) locking up.
The argument to the ioctl should always be > 0. Return EINVAL otherwise.
While here, adjustments to code style to match current guidelines.
Found by UBSan.
Reported-by: syzbot+39cd551a05298b222756@syzkaller.appspotmail.com
The valid sizes of the tty input and output queues (according to the man page)
are between 1024 and 65536 and input values are converted to a power of two.
The check on the validity of the range is done after the input values are
converted, however, which means that a hostile program can attempt to set
the queue size to a negative value, and cause integer overflow before
the range is validated.
Detected by UBSan
Reported-by: syzbot+521b73969fd233c49e58@syzkaller.appspotmail.com
Don't do link training or configuration space accesses within the time
allowed by the standard for the downstream card to come out of reset
after deasserting PERST#.
This fixes detection issues seen with a dual port wm(4) NIC,
an ASMedia SATA card and also Pericom bridges (but they need more work
to be useful).
This test still fails on FreeBSD, printing the "ar cru, ranlib" lines
twice, and I don't know why.
To get more insights into the inner details, without activating the full
-dA logging, split the output into paragraphs, one per target.
This change reveals another interesting detail: Dependencies without any
commands (in this case create-archive) don't inherit the commands from
.USEBEFORE and .USE sources.