summaryrefslogtreecommitdiff
path: root/gnu
AgeCommit message (Collapse)Author
2023-12-07Collect .openbsd.syscalls sections into a new PT_OPENBSD_SYSCALLS segment.Mark Kettenis
This will be used soon to pin system calls to designated call sites. ok deraadt@
2023-12-04protect access to the gnu warning map with a mutex to avoid random crashesRobert Nagy
discussed with, tested by and ok tb@
2023-12-03Collect .openbsd.syscalls sections into a new PT_OPENBSD_SYSCALLS segment.Mark Kettenis
This will be used soon to pin system calls to designated call sites. ok deraadt@
2023-11-26Add arm64 bti pads for range extension thunks.Tobias Heider
Large arm64 binaries like chromium use range extension thunks for accessing plt entries. Add bti landing pads for the additional indirection. upstream commit: 60827df765156cee6cca3dc5049388dde9dac1c0 ok kettenis@
2023-11-26Fix read/write past buffer endAndrew Fresh
From upstream commit: From 7047915eef37fccd93e7cd985c29fe6be54650b6 Mon Sep 17 00:00:00 2001 From: Karl Williamson <khw@cpan.org> Date: Sat, 9 Sep 2023 11:59:09 -0600 Subject: [PATCH] Fix read/write past buffer end: perl-security#140 A package name may be specified in a \p{...} regular expression construct. If unspecified, "utf8::" is assumed, which is the package all official Unicode properties are in. By specifying a different package, one can create a user-defined property with the same unqualified name as a Unicode one. Such a property is defined by a sub whose name begins with "Is" or "In", and if the sub wishes to refer to an official Unicode property, it must explicitly specify the "utf8::". S_parse_uniprop_string() is used to parse the interior of both \p{} and the user-defined sub lines. In S_parse_uniprop_string(), it parses the input "name" parameter, creating a modified copy, "lookup_name", malloc'ed with the same size as "name". The modifications are essentially to create a canonicalized version of the input, with such things as extraneous white-space stripped off. I found it convenient to strip off the package specifier "utf8::". To to so, the code simply pretends "lookup_name" begins just after the "utf8::", and adjusts various other values to compensate. However, it missed the adjustment of one required one. This is only a problem when the property name begins with "perl" and isn't "perlspace" nor "perlword". All such ones are undocumented internal properties. What happens in this case is that the input is reparsed with slightly different rules in effect as to what is legal versus illegal. The problem is that "lookup_name" no longer is pointing to its initial value, but "name" is. Thus the space allocated for filling "lookup_name" is now shorter than "name", and as this shortened "lookup_name" is filled by copying suitable portions of "name", the write can be to unallocated space. The solution is to skip the "utf8::" when reparsing "name". Then both "lookup_name" and "name" are effectively shortened by the same amount, and there is no going off the end. This commit also does white-space adjustment so that things align vertically for readability.
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-11-21Add '-e' (or -eltorito-boot-efi) option for writing an EFI eltorito bootJonathan Matthew
image, in addition to or instead of the x86 boot image, to the output file. Per the UEFI standard, the EFI boot image should be an image of an EFI System Partition to be loaded in no-emulation mode, so we always record it that way rather than checking if it looks like a floppy image. with, tested by and ok yasuoka@ strong encouragement from deraadt@
2023-11-20Stop erroring out when .gcc_except_table relocs point at discarded sectionsJeremie Courreges-Anglas
lang/gcc on riscv64 has a wart, it creates such relocs which upset ld.lld. The workaround I have used in lang/gcc since Sep 2022 doesn't work any more, so ask ld.lld to be more lenient. This will let the fortran ports and friends build on riscv64. clang has fixed since some time already, but our lang/gcc port will likely keep that wart for some time. Upstream report: https://reviews.llvm.org/D83244 Input and ok kettenis@
2023-11-20Code changes between llvm 13 and 16 mean that we have to drop the final dotMark Kettenis
for the .openbsd.randomdata and .openbsd.mutable section merging code. ok jca@
2023-11-20Restore lost patch: downgrade RISCV ABI mismatch error to a warningJeremie Courreges-Anglas
This lets lld link code with object files created with ld -b binary, as used by several ports (mupdf, postgresql-pllua, various games). Upstream report with an unfinished diff: https://reviews.llvm.org/D106378 ok gkoehler@ kettenis@
2023-11-20only enable bti and pac by default on arm64Jonathan Gray
before this change, clang on armv7 defined __ARM_FEATURE_BTI_DEFAULT and __ARM_FEATURE_PAC_DEFAULT which broke the build of llvm libunwind ok kettenis@ deraadt@
2023-11-19Disable LOAD_STACK_GUARD on OpenBSD/armv7. It seems the implementationMark Kettenis
is incomplete resulting in SIGSEGV with the OpenBSD default options. ok deraadt@, jsg@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-11-19Fix cc -ftrapping-math on macppcGeorge Koehler
Handle CALL_RM like CALL for 32-bit ELF. If a function call has the strictfp attribute, its opcode changes from CALL to CALL_RM. If a call uses the secure PLT, then it must getGlobalBaseReg() to set r30. After I rebuilt xenocara/lib/pixman with this change, Xorg stopped crashing on my macppc. pixman uses cc -ftrapping-math which puts strictfp on each function call. https://github.com/llvm/llvm-project/pull/72758 ok jca@ tobhe@ deraadt@
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-11-17Use -mxgot to avoid GOT overflow during build on mips64.Visa Hankala
Tested by deraadt@
2023-11-16downgrade -Wint-conversion to a warningRobert Nagy
autoconf might misinterpet this so we need to do a full sweep before it can be upgraded to an error again
2023-11-16set .NOTPARALLEL for AMDGPU tblgen files to tame memory usage on i386Robert Nagy
ok deraadt@
2023-11-14Add missing .PATHJeremie Courreges-Anglas
Reported and suggested by jsing@
2023-11-12append ExtensionDependencies.inc to CLEANFILES only if .OBJDIR != .CURDIRRobert Nagy
2023-11-12revert https://reviews.llvm.org/D135402 for now to shut lld up until we fixRobert Nagy
all the symbol lists
2023-11-12Fix install path, reminded by otto@Jeremie Courreges-Anglas
2023-11-12Fix parsing of branch target protection options on arm64 to enableMark Kettenis
BTI and PAC again by default on OpenBSD. ok robert@
2023-11-12TargetMCAs.def is required to be installed in the llvm include dirRobert Nagy
so instead of shipping the file internally, let's generate it and install it with the rest of the headers; unbreaks xenocara build
2023-11-12flip the ignoreFunctionAddressEquality flag; lost in merging changes from ↵Robert Nagy
llvm-13
2023-11-11update build infrastructure for llvm-16.0.6Robert Nagy
2023-11-11merge lldb-16.0.6Robert Nagy
2023-11-11import lldb from LLVM-16.0.6Robert Nagy
2023-11-11merge lld-16.0.6Robert Nagy
2023-11-11import of lld from LLVM-16.0.6Robert Nagy
2023-11-11merge clang-16.0.6Robert Nagy
2023-11-11import of clang from LLVM-16.0.6Robert Nagy
2023-11-11merge llvm-16.0.6Robert Nagy
2023-11-11import of llvm from LLVM 16.0.6Robert Nagy
2021-04-28Import LLVM 11.1.0 release including clang, lld and lldb.Patrick Wildt
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2020-08-03Import LLVM 10.0.0 release including clang, lld and lldb.Patrick Wildt
ok hackroom tested by plenty
2023-11-10remove unused liblldbPluginOperatingSystemRobert Nagy
2023-11-07comment out test that no longer makes sense, as noticed by antonMarc Espie
2010-09-24Perl 5.12.2 from CPANTodd C. Miller
2023-11-06eliminate discrepancies between termcap-generated info and infocmp resultsMarc Espie
(see user_caps(5)) also obviously protects the term name just in case someone wants to have fun with it..
2023-11-06actually, I still need to exit() if infocmp can't be runMarc Espie
2023-11-06system + exit -> execMarc Espie
as noticed by afresh1@ (this should be all for now)
2023-11-06since we're always running info_cmp in the end, remove the wholeMarc Espie
"in case of emergency run info_cmp block" (more efficient: we only parse the entry we need). Keep the small part that creates a dumb terminal on VMS, even though we're not running that. Add an extra state check in the automaton to avoid skipping a tmp_term
2023-11-06simplify logic for $entry in the main termcap loopMarc Espie
2023-11-06always try to run info_cmp at the end if we haven't got what we wantedMarc Espie
This allows terminals with only terminfo capabilities to show up in Term::Cap (like kitty) !
2023-11-06simplify $ENV{TERMCAP} handling: don't bother setting anything ifMarc Espie
the variable doesn't exist
2023-11-06instead of a max number of iterations, record terms that have been seenMarc Espie
in a hash instead. Side effect: we no longer parse the same tc again and again, leading to a smaller result with the same capabilities but no duplicates. (instead of parsing 36 entries for xterm, we end up with 10 entries, as the "tc=" stuff is actually a tree instead of a list: xterm references several intermediate tc that all lead to the same basic list !)
2023-11-06use modern file open instead of GLOBSMarc Espie
2023-11-06get rid of useless evalMarc Espie
use \Q\E to quote stuff around tmp_term, instead of rolling our own in termpat (get rid of termpat)