Escape SSH_AUTH_SOCK paths that are sent to the shell as setenv
commands.
Unbreaks ssh-agent for home directory paths that contain whitespace.
Based on fix from Beat Bolli via bz3884; feedback/ok dtucker@
Remove some unnecessary checks in sshkey_ec_validate_public()
Checking nQ == infinity is not needed for cofactor 1 curves.
Checking x and y coordinates against order is not needed either.
patch from Szilárd Pfeiffer, with further refinement by tb@
ok tb@
For RTL8125, there's no need to check whether RGE_CMD_STOPREQ has been
completed. As with other chip variants, RGE_CMD_STOPREQ never acknowledges
completion.
Reported by Geoff Steckel
In mrt_dump_entry() treat peers with remote_addr.aid == AID_UNSPEC the
same way as peers where the remote_addr.aid is the same as of the prefix.
This fixes dumping in the old table format from self-originated prefixes
since peerself has a AID_UNSPEC remote_addr of all 0.
Fix for mrt regress test.
Reported by anton@
OK tb@ (who had the same diff)
Use BN_ULONG in probable_prime_dh()
This was the last user of BN_LONG in code. It had no reason to do so.
BN_mod_word() returns a BN_ULONG and since the largest prime in the
small primes table primes[] is well below 20000, the only return value
that could cause 'mod' to be negative was the error sentinel (BN_ULONG)-1.
ok jsing kenjiro
replace the cas spinlock in kernel mutexes with a "parking" lock.
this is motivated because cas based locks are unfair, meaning that
no effort is made by the algorithm to try and give CPUs access to
the critical section in the order that they tried to acquire them.
cas based locks can also generate a lot of work for the cache
subsystem on a computer because every cpu ends up hammering the
same cacheline.
the combination of these effects for heavily contended mutexes can
get some systems into a situation where they don't make progress,
and are effectively livelocked.
this parking mutex mitigates against these problems.
it's called parking because it was very heavily influnced by what's
described in https://webkit.org/blog/6161/locking-in-webkit/. the
big influence is that the lock itself only has to record it's state,
but the machinery for waiting for the lock is external to the lock.
[64 lines not shown]
Use more specific types for BN.
Be specific about width and use uint64_t/uint32_t, rather than using
unsigned int/long/long long, based on platform. Additionally use UINT64_C()
and UINT32_C() for constants, along with PRI*64/PRI*32 for formatting. This
makes the platform responsible for providing the correct types/defines -
all we then need to do is determine is if BN should use a 32 bit or 64 bit
configuration.
With input from and ok tb@
Avoid the use of _LP64 in libcrypto regress.
What the tests actually care about is the size of a BN_ULONG, hence
condition on BN_BYTES instead.
Discussed with tb@
add back local change that got lost along the way
originally in sys/dev/pci/drm/i915/intel_fbdev.c from kettenis:
If we keep the BIOS framebuffer, stick to the desired
framebuffer size instead of using the actual framebuffer size.
This fixes a problem seen on various Apple machines where the
BIOS framebuffer is bigger than the actual display.
ok jsg
Move copyout() out of netlock within sysctl_ifnames().
Bump reference counter and link desired interface descriptors into
temporary `if_tmplist' while holding shared netlock. This temporary
list is protected by `if_tmplist_lock' rwlock so release of the
netlock is fine. Do copyout() while holding `if_tmplist_lock' and
then tear down temporary list.
ok bluhm
Move declaration of struct hppa_iv from intr.c to intr.h so that genassym
can see it and emit proper symbolic constants for its various fields
offsets, and use that in locore instead of magic constants, if only to
make this mess less unreadable.
ok kettenis@
Fix various smaller things found by coverity
- Initalize neighbor since we don't touch all members when setting it up.
- In fmt_flags() increase the flagstr to be able to hold all flags even
though some flags are mutually exclusive but lets play it safe.
- Error out if multiple mrt files are provided. It makes no sense to set
more than one file.
Fixes for CID 492333, 492337 and 492338
OK tb@