History log of /freebsd/sys/compat/linux/linux_elf.c (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 3460fab5 18-Aug-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# e185d83f 26-Apr-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Use inlined LINUX_KERNVER for tests to improve readability

MFC after: 1 month


# 76f8584e 26-Apr-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Don't relie on process osreldata when testing features

The ELF note identifyies the operating-system ABI that the executable
was created for. The note data of the Glibc executable contains

linux(4): Don't relie on process osreldata when testing features

The ELF note identifyies the operating-system ABI that the executable
was created for. The note data of the Glibc executable contains the
earliest release number of the Linux kernel that supports this ABI.
As of a current 2.37 version of Glibc, it is 3.2.0 for x86, 3.7.0
for Aarch64.
Glibc does not use this release number and the current kernel's
LINUX_VERSION_CODE to detect kernel features, using fallbacks to known
previous way in case of ENOSYS or something else instead.

A dynamically linked Glibc reads the current kernel's LINUX_VERSION_CODE
from the ELF note in the vDSO or fallback to uname syscall if the vDSO
can't be located and parse the release field in struct utsname. Glibc
uses the current kernel's LINUX_VERSION_CODE for "kernel too old" check.

While here use inlined LINUX_KERNVER for tests to improve readability,
as suggested by emaste@.

MFC after: 1 month

show more ...


# 66e8f1f7 23-Apr-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Fix arm64 build after b7a6bcdd, missed chunk added

MFC after: 1 month


# b7a6bcdd 22-Apr-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Export the AT_MINSIGSTKSZ depending on the process osreldata

AT_MINSIGSTKSZ has appeared in the 5.13.0 Linux kernel first time.

Differential Revision: https://reviews.freebsd.org/D39648
M

linux(4): Export the AT_MINSIGSTKSZ depending on the process osreldata

AT_MINSIGSTKSZ has appeared in the 5.13.0 Linux kernel first time.

Differential Revision: https://reviews.freebsd.org/D39648
MFC after: 1 month

show more ...


# 70eab81d 22-Apr-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Export the AT_EXECFN depending on the process osreldata

AT_EXECFN has appeared in the 2.6.26 Linux kernel first time.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.o

linux(4): Export the AT_EXECFN depending on the process osreldata

AT_EXECFN has appeared in the 2.6.26 Linux kernel first time.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39647
MFC after: 1 month

show more ...


# 40c36c46 22-Apr-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Export the AT_RANDOM depending on the process osreldata

AT_RANDOM has appeared in the 2.6.30 Linux kernel first time.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.o

linux(4): Export the AT_RANDOM depending on the process osreldata

AT_RANDOM has appeared in the 2.6.30 Linux kernel first time.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D39646
MFC after: 1 month

show more ...


# 7d8c9839 22-Apr-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Deduplicate linux_copyout_auxargs()

Export default MINSIGSTKSZ value for the x86 until we do not preserve AVX
registers in the signal context.

Differential Revision: https://reviews.freeb

linux(4): Deduplicate linux_copyout_auxargs()

Export default MINSIGSTKSZ value for the x86 until we do not preserve AVX
registers in the signal context.

Differential Revision: https://reviews.freebsd.org/D39644
MFC after: 1 month

show more ...


Revision tags: release/13.2.0
# 10d16789 12-Feb-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Get rid of the opt_compat.h include.

Since e013e369 COMPAT_LINUX, COMPAT_LINUX32 build options are removed,
so include of opt_compat.h is no more needed.

MFC after: 2 weeks


# edfc7d6e 05-Feb-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Add the forgotten in the 6f8439db opt_compat include.

MFC after: 1 week


# 95b86034 02-Feb-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Deduplicate linux_trans_osrel().

MFC after: 1 week


# 6039e966 02-Feb-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Deduplicate linux_copyout_strings().

It is still present in the 32-bit Linuxulator on amd64.

MFC after: 1 week


# 6f8439db 02-Feb-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Use COMPAT_LINUX32 enstead of __ELF_WORD_SIZE.

COMPAT_LINUX32 option is defined for case when building 32-bit Linuxulator
for the 64-bit host. Usage of __ELF_WORD_SIZE is wrong here as it

linux(4): Use COMPAT_LINUX32 enstead of __ELF_WORD_SIZE.

COMPAT_LINUX32 option is defined for case when building 32-bit Linuxulator
for the 64-bit host. Usage of __ELF_WORD_SIZE is wrong here as it is equal to 32
on i386 too.

MFC after: 1 week

show more ...


# 74465145 02-Feb-2023 Dmitry Chagin <dchagin@FreeBSD.org>

linux(4): Microoptimize linux_elf.h for future use.

In order to reduce code duplication move coredump support definitions
into the appropriate header and hide private definitions.

MFC after: 1 week


Revision tags: release/12.4.0
# 00d17cf3 03-Jun-2022 Konstantin Belousov <kib@FreeBSD.org>

elf_note_prpsinfo: handle more failures from proc_getargv()

Resulting sbuf_len() from proc_getargv() might return 0 if user mangled
ps_strings enough. Also, sbuf_len() API contract is to return -1 i

elf_note_prpsinfo: handle more failures from proc_getargv()

Resulting sbuf_len() from proc_getargv() might return 0 if user mangled
ps_strings enough. Also, sbuf_len() API contract is to return -1 if the
buffer overflowed. The later should not occur because get_ps_strings()
checks for catenated length, but check for this subtle detail explicitly
as well to be more resilent.

The end result is that p_comm is used in this situations.

Approved by: so
Security: FreeBSD-SA-22:09.elf
Reported by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: delphij, markj
admbugs: 988
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35391

show more ...


Revision tags: release/13.1.0, release/12.3.0
# 06d5ef0a 13-Nov-2021 Edward Tomasz Napierala <trasz@FreeBSD.org>

linux: Drop some unnecessary includes

Drop some unnecessary includes from Linuxulator ptrace
and coredump code. No functional changes.

Sponsored By: EPSRC
Differential Revision: https://reviews.fr

linux: Drop some unnecessary includes

Drop some unnecessary includes from Linuxulator ptrace
and coredump code. No functional changes.

Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D32925

show more ...


# b7924341 27-Aug-2021 Andrew Turner <andrew@FreeBSD.org>

Create sys/reg.h for the common code previously in machine/reg.h

Move the common kernel function signatures from machine/reg.h to a new
sys/reg.h. This is in preperation for adding PT_GETREGSET to p

Create sys/reg.h for the common code previously in machine/reg.h

Move the common kernel function signatures from machine/reg.h to a new
sys/reg.h. This is in preperation for adding PT_GETREGSET to ptrace(2).

Reviewed by: imp, markj
Sponsored by: DARPA, AFRL (original work)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19830

show more ...


# 447636e4 30-Jun-2021 Edward Tomasz Napierala <trasz@FreeBSD.org>

linux(4): implement coredump support

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@.

linux(4): implement coredump support

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

show more ...