History log of /src/common/lib/libc/misc/
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.12 07-Dec-2023 andvar

s/miltiple/multiple/ in comment.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
1.11 19-Sep-2021 andvar

fix various typos in comments, messages and documentation.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 bouyer-xenpvh-base phil-wifi-20200411 phil-wifi-20200406
1.10 08-Mar-2020 kamil

Add support for alignment_assumptions in uubsan

Cherry-pick from FreeBSD:

From 7c1bc5ffc2fa68ddc76e5ea8a3a1a6fdfeee57f0 Mon Sep 17 00:00:00 2001
From: andrew <andrew@FreeBSD.org>
Date: Tue, 28 May 2019 09:12:15 +0000
Subject: [PATCH] Teach the kernel KUBSAN runtime about alignment_assumption

This checks the alignment of a given pointer is sufficient for the
requested alignment asked for. This fixes the build with a recent
llvm/clang.

Sponsored by: DARPA, AFRL


Revision tags: is-mlppp-base ad-namecache-base3 ad-namecache-base phil-wifi-20191119
1.9 01-Nov-2019 kamil

uubsan: Implement function_type_mismatch_v1

RTTI is not supported by micro-UBSan (by design) and this is now a stub
handler.


1.8 30-Oct-2019 kamil

uubsan: Handle implicit_conversion


1.7 04-Oct-2019 mrg

workaround a GCC 8 warning:

- code that will be unreachable on platforms with
sizeof(double) != sizeof(unsigned long) triggered an valid out
of bounds warning. avoid the error by using sizeof ul.
- also assert that the sizes are the same if entering here.

both from kamil@.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base
1.6 17-Jun-2019 kamil

Introduce UBSAN_ALWAYS_FATAL in micro-UBSan

UBSAN_ALWAYS_FATAL is a CPP option to mark all reports fatal always.


Revision tags: phil-wifi-20190609
1.5 13-Feb-2019 kamil

branches: 1.5.2;
Fix kUBSan build with GCC7

Add missing __unreachable() and FALLTHROUGH keywords.

Reported by <Akul Pillai>


1.4 04-Feb-2019 mrg

- use __unreachable() and move 'break's around to increase consistency
and correctness

ok kamil@


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.3 03-Aug-2018 kamil

branches: 1.3.2;
Try to fix the evbppc-powerpc64 build

Avoid "comparison between signed and unsigned integer expressions" on
Big-Endian hosts.


1.2 03-Aug-2018 kamil

Tidy up the comment in ubsan.c

As noted, style has no impact on the comparison of a similar code.
This version is a reimplementation from scratch with no code and no
algirithm (whenever possible) reuse.

Public symbols and struct layout must be kept in sync with the code
generation part. It casues violation of the style like with long filenames.

My previous comment was 'too perfect' and could trigger some unnecessary
attention.


1.1 03-Aug-2018 kamil

Import micro-UBSan (ubsan.c)

This is a reimplementation of the Undefined Behavior Sanitizer with the
following properties:
- pure and clean-room C implementation,
- no -fsanitize=vpts support, as it requires RTTI support and C++
low-level routies to validate whether C++ objects are compatible
- designed to be used inside libc and known as uUBSan or user-UBSan
- designed to be shared with kernel and known as kUBSan or kernel-UBSan
- designed to be usable with ATF tests as a standalone runtime,
reachable without any MK* switches
- designed to be safer for hardening as it does not have side effects on
executables like writing to a selected location on demand
- controllable with environment variable LIBC_UBSAN with options:
* a - abort on report
* A - do not abort on a report (unless a failure is unrecoverable)
* e - output report to stderr
* E - do not output report on stderr
* l - output report on syslog (LOG_DEBUG | LOG_USER)
* L - do not output report on syslog
* o - output report on stdout
* O - do not output report on stdout
The default options are: "AeLO".
- compatible with Clang (3.8, 7.x) and GCC (6.x) code generation
- all handlers (except =vptr) from Clang/LLVM up to 7svn are supported

Tested with Clang amd64+i386 and GCC amd64+i386.