summaryrefslogtreecommitdiff
path: root/coroutine/amd64
AgeCommit message (Collapse)Author
2024-10-08Substitute `coroutine_transfer` with prefixed symbol in MakefileNobuyoshi Nakada
``` coroutine/arm64/Context.S:31:57: error: invoking macro TOKEN_PASTE argument 1: empty macro arguments are undefined in ISO C90 [-Wpedantic] 31 | .global PREFIXED_SYMBOL(SYMBOL_PREFIX,coroutine_transfer) | ^ ```
2024-10-08Cast via `uintptr_t` function pointer between object pointerNobuyoshi Nakada
- ISO C forbids conversion of function pointer to object pointer type - ISO C forbids conversion of object pointer to function pointer type
2024-08-22Don't emit ELF notes on non-ELF platformsKJ Tsanaktsidis
These apparently break compilation on old MacOS toolchains, because the MachO section name is capped to 16 chars (although, on my MacOS, at least, the section name just gets truncated). Nevertheless, these serve no purpose on non-ELF platforms (they're part of the LSB Linux ABI). [Bug #20677] Notes: Merged: https://github.com/ruby/ruby/pull/11405
2024-07-07Do not define SHSTK feature for amd64 Context.SKJ Tsanaktsidis
We do not implement CET shadow-stack switching in amd64 Context.S. If you compile Ruby with `-fcf-protection=full` and run it with `GLIBC_TUNABLES=glibc.cpu.hwcaps=SHSTK` exported, it will crash with a control flow exception. Configure the appropriate notes at the end of Context.S [Bug #18061]
2024-07-04Use `__CET__` macro to enable IBT support. (#11081)Vít Ondruch
According to the GCC documentation [1], the macro `__CET__` is dfined when `-fcf-protection` compiler option is used. Therefore use this macro to enable IBT support instead of special casing for `__OpenBSD__`. [1]: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fcf-protection
2024-06-13Use ENDBR instruction in amd64 coroutine on OpenBSDJeremy Evans
When running on newer Intel processors supporting the feature, OpenBSD enforces indirect branch tracking. Without this endbr64 instruction, jumps to the coroutine_transfer function result in SIGILL on OpenBSD/amd64 when using such processors. The OpenBSD Ruby ports have been using a patch similar to this for the past two months. From some research, cet.h has been supported by GCC for about 6 years and LLVM for about 4 years.
2023-08-25Avoid memory dependency between instructions. (#8284)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-05-25Add support for address sanitizer for amd64 and arm64.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5926
2021-07-01Replace copy coroutine with pthread implementation.Samuel Williams
2021-03-05Generating note.GNU-stack section for FreeBSD on x86.David Carlier
Not enabling for ELF in general as not all platform support it (e.g. NetBSD, implictly stack never executable). Notes: Merged: https://github.com/ruby/ruby/pull/4239
2021-01-22Added include guards to coroutine headersNobuyoshi Nakada
2019-12-28Remove "All Rights Reserved." from Copyright statement.Samuel Williams
2019-12-26decouple internal.h headers卜部昌平
Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies). Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-06-26Add `ucontext` coroutine implementation for generic fallback.Samuel Williams
2019-05-16Remove unused symbolsNobuyoshi Nakada
2019-05-16Make COROUTINE_REGISTERS compile-time only not to be a global symbolNobuyoshi Nakada
2018-11-24Ensure stack is correctly protectedsamuel
See https://bugs.ruby-lang.org/issues/15335 for more details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-24Change Makefile rule for assembly to use .S rather than .ssamuel
It is more conventional to use compiler to pre-process and assemble the `.S` file rather than forcing Makefile to use `.s`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Fix indentation.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20GAS style assembly for win64 (mingw).samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Prefer "static inline" to avoid duplicate symbols.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Formatting changes.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Ensure start function has correct declaration.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Tidy up comments.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Restore return value assignmentsamuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Native implementation of coroutines to improve performance of fiberssamuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e