Make truncation in ASN1_BIT_STRING_set_bit() explicit
Instead of relying on i2c_ASN1_BIT_STRING() to determine the "unused"
bits on encoding, set them explicitly in abs->flags via a call to
asn1_abs_set_unused_bits(). This means ASN1_STRING_FLAGS_BITS_LEFT is
now set on a bit string, which was previously explicitly cleared.
This also means that the encoding of a non-zero ASN1_BIT_STRING
populated by setting the bits individually will now go through the
if (a->flags & ASN1_STRING_FLAG_BITS_LEFT) path in i2c_ASN1_BIT_STRING().
The most prominent usage of this function is in X.509 for the keyUsage
extension or the CRL reason codes. There's also the NS cert type, TS
PKIFailureInfo and general BITLIST config strings.
The reason for the truncation logic comes from the DER for NamedBitLists
X.690, 11.2.2 below:
X.680, 22.7:
[22 lines not shown]
vmm: Expose pvclock only if tsc frequency is known
If the tsc frequency is unknown, tsc_frequency == 0 and vmm will set
vc_pvclock_system_tsc_mul = 0 which will cause the guest's pvclock to
not advance until vmm updates the struct pvclock_time_info on the next
vmentry. tsc_frequency == 0 can happen in nested virtualization
setups.
Therefore, do not expose the pvclock feature bits if tsc_frequency == 0,
both in the KVM and in the VMM hypervisor signature.
ok mlarkin
replace buggy strncmp with strcmp found with clang-tidy
Found the same fix from davidben in BoringSSL as well (https://boringssl-review.googlesource.com/c/boringssl/+/87927). OpenSSL appears to have accidentally changed the semantics here with the HAS_PREFIX macro, which appears to be incorrect.
discussed w/ tb@ & beck@
Fix PSTL backend (names) in __config_site
Upstream libc++ renamed these macros in the following commit:
https://github.com/llvm/llvm-project/commit/d423d80
We had the correct names in the libcxx* makefiles, so no ABI changes are
required.
Reported by c2qd and also provided the __config_site diff. OK robert@