| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Add opt_inet.h and opt_usb.h to make linux module buildable standalone.
(cherry picked from commit c5f906d32d2bc8e37f1e1911382e27af7e6240ff)
|
| |
|
|
|
|
|
| |
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
Similar commit in current:
(cherry picked from commit 031beb4e239b)
|
| |
|
|
|
|
| |
MFC after: 2 weeks
(cherry picked from commit 825fbd087e6150eaf601612a5e7468ddc808e004)
|
| |
|
|
|
|
|
|
|
| |
Since e013e369 COMPAT_LINUX, COMPAT_LINUX32 build options are removed,
so include of opt_compat.h is no more needed.
MFC after: 2 weeks
(cherry picked from commit 10d16789a383a5b9e007dfd4c2e7844e044eaf7d)
|
| |
|
|
|
|
|
|
| |
Standalone compile that we at least create these opt_*.h files.
Sponsored by: Netflix
(cherry picked from commit 010175a76d0676ff8d9b8d54276aff093abbc3f2)
|
| |
|
|
|
|
|
| |
Discussed with: melifaro
MFC after: 3 days
(cherry picked from commit 07db1f36848c008efb7ab6b37e199212560833ae)
|
| |
|
|
|
|
| |
MFC after: 1 week
(cherry picked from commit cc1b0f7d9626bbd116429014444cbf61edf708a2)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the syscallname() function to give a usable result for Linux
ABIs.
Reported by: jrtc27
Reviewed by: jrtc27, markj, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37199
(cherry picked from commit 1da65dcb1c57fae7be75ddf1bd300ddf19ced850)
(cherry picked from commit f396f9b6c96f6d68d4e3606ddb090287230fc565)
|
| |
|
|
|
|
|
|
|
|
|
| |
Sort the entries alphabetically, and list them with one entry per line.
This makes the diffs much cleaner when adding or removing a new entry,
as I will do in the next commit.
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 331784880821c6aa55188d0950e98d898c42203c)
|
| |
|
|
|
|
| |
MFC after: 2 weeks
(cherry picked from commit 2b378d59a98a4eb1dab173c4db3b48f385c47728)
|
| |
|
|
|
|
|
|
|
| |
As translate_traps() is common for x86 Linuxulators,
move it under x86/linux.
MFC after: 2 weeks
(cherry picked from commit 2434137f690dabc35586ab45fc4c4ecc5b71184f)
|
| |
|
|
|
|
|
|
| |
This is modeled after f2395455 (by kib@).
MFC after: 2 weeks
(cherry picked from commit 5a6a4fb284b1a9c4b4105fd6ab8143356f3ef3f7)
|
| |
|
|
|
|
|
|
|
|
|
| |
To avoid annoyng messages from glibc-2.35 test suite add the simple
implementation of rseq syscall which is do nothing for now.
I plan to implement it if and when the API stabilizes.
MFC after: 2 weeks
(cherry picked from commit ee55d560e89ac8de37def993a13d2582638273b7)
|
| |
|
|
|
|
|
|
|
|
|
| |
In preparation for machine-independent sys/compat/linux/linux_ptrace.c,
rename the i386-specific Linux ptrace(2) implementation. No functional
changes.
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D32757
(cherry picked from commit 4dfd612286ec2ecc7a05f3d4fd65a58f4b05f74c)
|
| |
|
|
|
|
|
|
|
|
| |
Do not specify memory model and mregparm for amd64, it's only
available on IA-32 architecture.
Reported by: jhb, jrtc27
MFC after: 2 weeks
(cherry picked from commit b0fa09a0a7e30f301cc58750dedb3d88ec39992d)
|
| |
|
|
|
|
|
|
|
|
| |
Do not specify memory model for i386. Seems that clang silencly
ignores -mcmodel unlike gcc.
Reported by: jhb
MFC after: 2 weeks
(cherry picked from commit de273c83a10c5807b52b7479e477854b77baa912)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The vDSO (virtual dynamic shared object) is a small shared library that the
kernel maps R/O into the address space of all Linux processes on image
activation. The vDSO is a fully formed ELF image, shared by all processes
with the same ABI, has no process private data.
The primary purpose of the vDSO:
- non-executable stack, signal trampolines not copied to the stack;
- signal trampolines unwind, mandatory for the NPTL;
- to avoid contex-switch overhead frequently used system calls can be
implemented in the vDSO: for now gettimeofday, clock_gettime.
The first two have been implemented, so add the implementation of system
calls.
System calls implemenation based on a native timekeeping code with some
limitations:
- ifunc can't be used, as vDSO r/o mapped to the process VA and rtld
can't relocate symbols;
- reading HPET memory is not implemented for now (TODO).
In case on any error vDSO system calls fallback to the kernel system
calls. For unimplemented vDSO system calls added prototypes which call
corresponding kernel system call.
Relnotes: yes
Tested by: trasz (arm64)
Differential revision: https://reviews.freebsd.org/D30900
MFC after: 2 weeks
(cherry picked from commit 9931033bbfbe56a037723638cf3712366c6d943f)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Implement dumping core for Linux binaries on amd64, for both
32- and 64-bit executables. Some bits are still missing.
This is based on a prototype by chuck@.
Reviewed By: kib
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D30019
(cherry picked from commit 447636e43c08d697664512a50f00f93f41c0a79f)
|
| |
|
|
| |
(cherry picked from commit 5bb3134a8c21cb87b30e135ef168483f0333dabb)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In r367395 parts of machine dependent linux_dummy.c were moved to a new
machine independent file sys/compat/linux/linux_dummy.c and the existing
linux_dummy.c was renamed to linux_dummy_machdep.c.
Add linux_dummy_machdep.c to the linux module for i386.
Rename sys/amd64/linux32/linux_dummy.c for consistency.
Add the new linux_dummy.c to the linux module for i386.
Notes:
svn path=/head/; revision=368372
|
| |
|
|
|
|
|
|
|
|
| |
No functional change.
Reviewed by: emaste, trasz
Differential Revision: https://reviews.freebsd.org/D27099
Notes:
svn path=/head/; revision=367395
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is needed so that setting LD/XLD is not ignored when linking with $CC
instead of directly using $LD. Currently only clang accepts an absolute
path for -fuse-ld= (Clang 12+ will add a new --ld-path flag), so we now
warn when building with GCC and $LD != "ld" since that might result in the
wrong linker being used.
We have been setting XLD=/path/to/cheri/ld.lld in CheriBSD for a long time and
used a similar version of this patch to avoid linking with /usr/bin/ld.
This change is also required when building FreeBSD on an Ubuntu with Clang:
In that case we set XCC=/usr/lib/llvm-10/bin/clang and since
/usr/lib/llvm-10/bin/ does not contain a "ld" binary the build fails with
`clang: error: unable to execute command: Executable "ld" doesn't exist!`
unless we pass -fuse-ld=/usr/lib/llvm-10/bin/ld.lld.
This change passes -fuse-ld instead of copying ${XLD} to WOLRDTMP/bin/ld
since then we would have to ensure that this file does not exist while
building the bootstrap tools. The cross-linker might not be compatible with
the host linker (e.g. when building on macos: host-linker= Mach-O /usr/bin/ld,
cross-linker=LLVM ld.lld).
Reviewed By: brooks, emaste
Differential Revision: https://reviews.freebsd.org/D26055
Notes:
svn path=/head/; revision=364761
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the make variable STRIP is already used for other purposes, this
uses STRIPBIN (which is also used for the same purpose by install(1).
This allows using LLVM objcopy to strip binaries instead of the in-tree
elftoolchain objcopy. We make use of this in CheriBSD since passing
binaries generated by our toolchain to elftoolchain strip sometimes results
in assertion failures.
This allows working around https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248516
by specifying STRIPBIN=/path/to/llvm-strip
Obtained from: CheriBSD
Reviewed By: emaste, brooks
Differential Revision: https://reviews.freebsd.org/D25988
Notes:
svn path=/head/; revision=364119
|
| |
|
|
|
|
|
|
|
| |
Using the same approach as the last commit for the files used by genassym.sh.
Obtained from: CheriBSD
Notes:
svn path=/head/; revision=360072
|
| |
|
|
| |
Notes:
svn path=/head/; revision=351497
|
| |
|
|
|
|
|
|
|
|
|
| |
kernel does not make sence.
PR: 222861
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20179
Notes:
svn path=/head/; revision=347540
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of them listed in opt_global.h which is not generated while building
modules outside of a kernel and such modules never match real cofigured
kernel.
So, we should prevent our users from building obviously defective modules.
Therefore, remove the root cause of the building of modules outside of a
kernel - the possibility of building modules with DEBUG or KTR flags.
And remove all of DEBUG printfs as it is incomplete and in threaded
programms not informative, also a half of system call does not have DEBUG
printf. For debuging Linux programms we have dtrace, ktr and ktrace ability.
PR: 222861
Reviewed by: trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20178
Notes:
svn path=/head/; revision=347538
|
| |
|
|
|
|
|
|
|
| |
to clean genassym.o
MFC after: 2 weeks
Notes:
svn path=/head/; revision=347196
|
| |
|
|
| |
Notes:
svn path=/head/; revision=335910
|
| |
|
|
|
|
|
|
|
|
|
| |
Use proper method to access userspace. For now, only the slow copyout
path is implemented.
Reported and tested by: tijl (previous version)
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=332930
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
opt_compat.h is mentioned in nearly 180 files. In-progress network
driver compabibility improvements may add over 100 more so this is
closer to "just about everywhere" than "only some files" per the
guidance in sys/conf/options.
Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of
sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h
is created on all architectures.
Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the
set of compiled files.
Reviewed by: kib, cem, jhb, jtl
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14941
Notes:
svn path=/head/; revision=332122
|
| |
|
|
|
|
|
|
|
|
|
|
| |
assym is only to be included by other .s files, and should never
actually be assembled by itself.
Reviewed by: imp, bdrewery (earlier)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D14180
Notes:
svn path=/head/; revision=331254
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Three copies of the linuxulator linux_sysvec.c contained identical
BSD to Linux errno translation tables, and future work to support other
architectures will also use the same table. Move the table to a common
file to be used by all. Make it 'const int' to place it in .rodata.
(Some existing Linux architectures use MD errno values, but x86 and Arm
share the generic set.)
This change should introduce no functional change; a followup will add
missing errno values.
MFC after: 3 weeks
Sponsored by: Turing Robotic Industries Inc.
Differential Revision: https://reviews.freebsd.org/D14665
Notes:
svn path=/head/; revision=331056
|
| |
|
|
|
|
|
|
|
|
| |
assym.s exists only to be included by other .s files, and should not
actually be assembled by itself.
Sponsored by: Turing Robotic Industries Inc.
Notes:
svn path=/head/; revision=328883
|
| |
|
|
|
|
|
|
|
|
| |
contains such fundamental settings as e.g. SMP option and fake
opt_global.h almost never match real configured kernels.
Reported by: kib@
Notes:
svn path=/head/; revision=319570
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
were copied to the buffer supplied by the user.
Also fix getrandom() if Linuxulator modules are built without the kernel.
PR: 219464
Submitted by: Maciej Pasternacki
Reported by: Maciej Pasternacki
MFC after: 1 week
Notes:
svn path=/head/; revision=319053
|
| |
|
|
|
|
|
|
|
|
|
| |
symbol, and this breaks symbol lookup in ddb.
Requested by: bde@
MFC after: 1 week
Notes:
svn path=/head/; revision=319052
|
| |
|
|
|
|
|
|
|
|
|
| |
This simplifies make output/logic
Tested with: `cd sys/modules; make ALL_MODULES=` on amd64
MFC after: 1 month
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=314651
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The build process generates *assym.h using nm from *genassym.o (which is
in turn created from *genassym.c).
When compiling with link-time optimization (LTO) using -flto, .o files
are LLVM bitcode, not ELF objects. This is not usable by genassym.sh,
so remove -flto from those ${CC} invocations.
Submitted by: George Rimar
Reviewed by: dim
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9659
Notes:
svn path=/head/; revision=314054
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD support NX bit on X86_64 processors out of the box, for i386 emulation
use READ_IMPLIES_EXEC flag, introduced in r302515.
While here move common part of mmap() and mprotect() code to the files in compat/linux
to reduce code dupcliation between Linuxulator's.
Reported by: Johannes Jost Meixner, Shawn Webb
MFC after: 1 week
XMFC with: r302515, r302516
Notes:
svn path=/head/; revision=302517
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
-fPIC has no effect on linking although it seems to be ignored by
GNU ld.bfd. However, it causes ld.lld to terminate with an invalid
argument error.
Reviewed by: dchagin, kib
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5444
Notes:
svn path=/head/; revision=296057
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When building with gcc 4.9 and binutils 2.25,
using '--input' and '--output' returns an error
message:
objcopy: option `--input' is ambiguous
Reported by: Jenkins
Notes:
svn path=/head/; revision=283506
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Linux sigset always 64 bit on all platforms. In order to move Linux
sigset code to the linux_common module define it as 64 bit int. Move
Linux sigset manipulation routines to the MI path.
2. Move Linux signal number definitions to the MI path. In general, they
are the same on all platforms except for a few signals.
3. Map Linux RT signals to the FreeBSD RT signals and hide signal conversion
tables to avoid conversion errors.
4. Emulate Linux SIGPWR signal via FreeBSD SIGRTMIN signal which is outside
of allowed on Linux signal numbers.
PR: 197216
Notes:
svn path=/head/; revision=283474
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
around kqueue() to implement epoll subset of functionality.
The kqueue user data are 32bit on i386 which is not enough for
epoll user data, so we keep user data in the proc emuldata.
Initial patch developed by rdivacky@ in 2007, then extended
by Yuri Victorovich @ r255672 and finished by me
in collaboration with mjg@ and jillies@.
Differential Revision: https://reviews.freebsd.org/D1092
Notes:
svn path=/head/; revision=283441
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
thread emuldata to proc emuldata as it was originally intended.
As we can have both 64 & 32 bit Linuxulator running any eventhandler
can be called twice for us. To prevent this move eventhandlers code
from linux_emul.c to the linux_common.ko module.
Differential Revision: https://reviews.freebsd.org/D1073
Notes:
svn path=/head/; revision=283422
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
following primary purposes:
1. Remove the dependency of linsysfs and linprocfs modules from linux.ko,
which will be architecture specific on amd64.
2. Incorporate into linux_common.ko general code for platforms on which
we'll support two Linuxulator modules (for both instruction set - 32 & 64 bit).
3. Move malloc(9) declaration to linux_common.ko, to enable getting memory
usage statistics properly.
Currently linux_common.ko incorporates a code from linux_mib.c and linux_util.c
and linprocfs, linsysfs and linux kernel modules depend on linux_common.ko.
Temporarily remove dtrace garbage from linux_mib.c and linux_util.c
Differential Revision: https://reviews.freebsd.org/D1072
In collaboration with: Vassilis Laganakos.
Reviewed by: trasz
Notes:
svn path=/head/; revision=283421
|
| |
|
|
|
|
|
|
|
|
|
|
| |
exposes functions from kernel with proper DWARF CFI information so that
it becomes easier to unwind through them.
Using vdso is a mandatory for a thread cancelation && cleanup
on a modern glibc.
Differential Revision: https://reviews.freebsd.org/D1060
Notes:
svn path=/head/; revision=283407
|
| |
|
|
|
|
|
|
|
|
|
|
| |
problems than it solves. SYSDIR is already defined almost always and
can be used instead. Working around the one case where it isn't is
much easier than working around the fact that @ may not exist in 18
other places.
Differential Revision: https://reviews.freebsd.org/D1100
Notes:
svn path=/head/; revision=274184
|
| |
|
|
|
|
|
|
| |
This ensures these objects are rebuilt to generate an updated header of
assembly constants if needed.
Notes:
svn path=/head/; revision=273744
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
entry and remove now-redunant dependencies. Add assym.s to
linux*_locore.s build, as it depends on it.
With this change, linux*.ko no longer builds every time through a
KERNFAST run.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=273206
|