History log of /freebsd-13.1/sys/compat/linux/linux_misc.c (Results 1 – 25 of 356)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.4.0, release/13.1.0, release/12.3.0
# b5cae0d5 03-Jul-2021 Edward Tomasz Napierala <[email protected]>

linux(4): implement PR_SET_NO_NEW_PRIVS

This makes prctl(2) support PR_SET_NO_NEW_PRIVS, by mapping it
to the native PROC_NO_NEW_PRIVS_CTL procctl(2).

Sponsored By: EPSRC
Differential Revision: htt

linux(4): implement PR_SET_NO_NEW_PRIVS

This makes prctl(2) support PR_SET_NO_NEW_PRIVS, by mapping it
to the native PROC_NO_NEW_PRIVS_CTL procctl(2).

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

(cherry picked from commit 2f514e6f13de41aa9ad5f563ed0decc66e91f99c)

show more ...


Revision tags: release/13.0.0
# ec2700e0 12-Jan-2021 Edward Tomasz Napierala <[email protected]>

linux: mute the "unsupported prctl option 23" warnings

Make the PR_CAPBSET_READ prctl(2) return EINVAL without logging
any warnings; this is way too noisy with Focal.

Sponsored by: The FreeBSD Foun

linux: mute the "unsupported prctl option 23" warnings

Make the PR_CAPBSET_READ prctl(2) return EINVAL without logging
any warnings; this is way too noisy with Focal.

Sponsored by: The FreeBSD Foundation

show more ...


# 76b2bfed 06-Nov-2020 Conrad Meyer <[email protected]>

linux(4): Fix loadable modules after r367395

Move dtrace SDT definitions into linux_common module code. Also, build
linux_dummy.c into the linux_common kld -- we don't need separate
versions of the

linux(4): Fix loadable modules after r367395

Move dtrace SDT definitions into linux_common module code. Also, build
linux_dummy.c into the linux_common kld -- we don't need separate
versions of these stubs for 32- and 64-bit emulation.

Reported by: several
PR: 250897
Discussed with: emaste, trasz
Tested by: John Kennedy, Yasuhiro KIMURA, Oleg Sidorkin
X-MFC-With: r367395
Differential Revision: https://reviews.freebsd.org/D27124

show more ...


# eaa5afce 03-Nov-2020 Conrad Meyer <[email protected]>

linux(4) prctl(2): Implement PR_[GS]ET_DUMPABLE

Proxy the flag to the roughly analogous FreeBSD procctl 'TRACE'.

TRACE-disabled processes are not coredumped, and Linux !DUMPABLE processes
can not b

linux(4) prctl(2): Implement PR_[GS]ET_DUMPABLE

Proxy the flag to the roughly analogous FreeBSD procctl 'TRACE'.

TRACE-disabled processes are not coredumped, and Linux !DUMPABLE processes
can not be ptraced. There are some additional semantics around ownership of
files in the /proc/[pid] pseudo-filesystem, which we do not attempt to
emulate correctly at this time.

Reviewed by: markj (earlier version)
Differential Revision: https://reviews.freebsd.org/D27015

show more ...


# a98f0378 03-Nov-2020 Conrad Meyer <[email protected]>

linux(4): style: Eliminate dead 'break' after 'return'

No functional change.


# 1024de70 26-Oct-2020 Mateusz Guzik <[email protected]>

linux: add missing conversions for compat.linux.use_emul_path handling


# 62b1382f 24-Oct-2020 Edward Tomasz Napierala <[email protected]>

Further improve prctl(2) debug.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26916


# 1c748137 23-Oct-2020 Edward Tomasz Napierala <[email protected]>

Improve prctl(2) debug.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26899


Revision tags: release/12.2.0
# 54669eb7 18-Oct-2020 Edward Tomasz Napierala <[email protected]>

Add compat.linux.dummy_rlimits, and disable by default.

Turns out the dummy rlimits fix prlimit(1), but break su(8)
(login-1:4.5-1ubuntu2) - although not sudo(8), for some reason.

MFC after: 2 week

Add compat.linux.dummy_rlimits, and disable by default.

Turns out the dummy rlimits fix prlimit(1), but break su(8)
(login-1:4.5-1ubuntu2) - although not sudo(8), for some reason.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26814

show more ...


# 139c0978 16-Oct-2020 Edward Tomasz Napierala <[email protected]>

Make linux getrlimit(2) and prlimit(2) return something reasonable
for linux-specific limits. Fixes prlimit (util-linux-2.31.1-0.4ubuntu3.7).

Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: Th

Make linux getrlimit(2) and prlimit(2) return something reasonable
for linux-specific limits. Fixes prlimit (util-linux-2.31.1-0.4ubuntu3.7).

Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D26777

show more ...


# 1a180032 01-Sep-2020 Mateusz Guzik <[email protected]>

compat: clean up empty lines in .c and .h files


# a125ed50 18-Aug-2020 Mateusz Guzik <[email protected]>

linux: add sysctl compat.linux.use_emul_path

This is a step towards facilitating jails with only Linux binaries.
Supporting emul_path adds path lookups which are completely spurious
if the binary at

linux: add sysctl compat.linux.use_emul_path

This is a step towards facilitating jails with only Linux binaries.
Supporting emul_path adds path lookups which are completely spurious
if the binary at hand runs in a Linux-based root directory.

It defaults to on (== current behavior).

make -C /root/linux-5.3-rc8 -s -j 1 bzImage:

use_emul_path=1: 101.65s user 68.68s system 100% cpu 2:49.62 total
use_emul_path=0: 101.41s user 64.32s system 100% cpu 2:45.02 total

show more ...


# 3d8dd983 15-Jun-2020 Edward Tomasz Napierala <[email protected]>

Make Linux uname(2) return x86_64 to 32-bit apps. This helps Steam.

PR: kern/240432
Analyzed by by: Alex S <[email protected]>
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Found

Make Linux uname(2) return x86_64 to 32-bit apps. This helps Steam.

PR: kern/240432
Analyzed by by: Alex S <[email protected]>
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25248

show more ...


Revision tags: release/11.4.0
# 479f70ef 10-Jun-2020 Mark Johnston <[email protected]>

Fix a couple of nits in Linux sysinfo(2) emulation.

- Use the same definition of free memory as Linux.
- Rename the totalbig and freebig fields to match the corresponding
names on Linux.

Discusse

Fix a couple of nits in Linux sysinfo(2) emulation.

- Use the same definition of free memory as Linux.
- Rename the totalbig and freebig fields to match the corresponding
names on Linux.

Discussed with: alc
MFC after: 1 week

show more ...


# 27e4374d 10-Jun-2020 Mark Johnston <[email protected]>

Add a comment reflecting the commit log for r361945.

Suggested by: alc
Reviewed by: alc
MFC with: r361945


# 3e5fae34 08-Jun-2020 Mark Johnston <[email protected]>

Stop computing a "sharedram" value when emulating Linux sysinfo(2).

The previous code was computing an incorrect value in a very expensive
manner. "sharedram" is supposed to be the amount of memory

Stop computing a "sharedram" value when emulating Linux sysinfo(2).

The previous code was computing an incorrect value in a very expensive
manner. "sharedram" is supposed to be the amount of memory used by
named swap objects, which on FreeBSD basically corresponds to memory
usage by shared memory objects (including, for example, GEM objects) and
tmpfs. We currently have no cheap way to count such pages. The
previous code tried to determine the number of copy-on-write pages
shared between processes.

Just replace the computed value with 0. illumos reportedly does the
same thing. Linux itself did not populate this field until a 2014
commit, "mm: export NR_SHMEM via sysinfo(2) / si_meminfo() interfaces".

Reported by: mjg
MFC after: 1 week

show more ...


# b4147bf6 05-Mar-2020 Tijl Coosemans <[email protected]>

Move compat.linux.map_sched_prio sysctl definition to linux_mib.c so it is
only defined by linux_common kernel module and not both linux and linux64
modules.

Reported by: Yuri Pankov <ypankov@fastma

Move compat.linux.map_sched_prio sysctl definition to linux_mib.c so it is
only defined by linux_common kernel module and not both linux and linux64
modules.

Reported by: Yuri Pankov <[email protected]>

show more ...


# f8b9b299 01-Mar-2020 Tijl Coosemans <[email protected]>

linuxulator: Map scheduler priorities to Linux priorities.

On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR
scheduling policies is [1,99]. For SCHED_OTHER the single valid pri

linuxulator: Map scheduler priorities to Linux priorities.

On Linux the valid range of priorities for the SCHED_FIFO and SCHED_RR
scheduling policies is [1,99]. For SCHED_OTHER the single valid priority is
0. On FreeBSD it is [0,31] for all policies. Programs are supposed to
query the valid range using sched_get_priority_(min|max), but of course some
programs assume the Linux values are valid.

This commit adds a tunable compat.linux.map_sched_prio. When enabled
sched_get_priority_(min|max) return the Linux values and sched_setscheduler
and sched_(get|set)param translate between FreeBSD and Linux values.

Because there are more Linux levels than FreeBSD levels, multiple Linux
levels map to a single FreeBSD level, which means pre-emption might not
happen as it does on Linux, so the tunable allows to disable this behaviour.
It is enabled by default because I think it is unlikely that anyone runs
real-time software under Linux emulation on FreeBSD that critically relies
on correct pre-emption.

This fixes FMOD, a commercial sound library used by several games.

PR: 240043
Tested by: Alex S <[email protected]>
Reviewed by: dchagin
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D23790

show more ...


# 46209cea 14-Jan-2020 Edward Tomasz Napierala <[email protected]>

Make linux getcpu(2) report the domain.

Submitted by: markj
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23144


# ca603bb1 12-Jan-2020 Edward Tomasz Napierala <[email protected]>

dd kern_getpriority(), make Linuxulator use it.

Reviewed by: kib, emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22842


# 7a0ef283 12-Jan-2020 Edward Tomasz Napierala <[email protected]>

Add kern_setpriority(), use it in Linuxulator.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22841


# b249ce48 03-Jan-2020 Mateusz Guzik <[email protected]>

vfs: drop the mostly unused flags argument from VOP_UNLOCK

Filesystems which want to use it in limited capacity can employ the
VOP_UNLOCK_FLAGS macro.

Reviewed by: kib (previous version)
Differenti

vfs: drop the mostly unused flags argument from VOP_UNLOCK

Filesystems which want to use it in limited capacity can employ the
VOP_UNLOCK_FLAGS macro.

Reviewed by: kib (previous version)
Differential Revision: https://reviews.freebsd.org/D21427

show more ...


# cc503330 31-Dec-2019 Edward Tomasz Napierala <[email protected]>

Add basic getcpu(2) support to linuxulator. The purpose of this
syscall is to query the CPU number and the NUMA domain the calling
thread is currently running on. The third argument is ignored.
It

Add basic getcpu(2) support to linuxulator. The purpose of this
syscall is to query the CPU number and the NUMA domain the calling
thread is currently running on. The third argument is ignored.
It doesn't do anything regarding scheduling - it's literally
just a way to query the current state, without any guarantees
you won't get rescheduled an opcode later.

This unbreaks Java from CentOS 8
(java-11-openjdk-11.0.5.10-0.el8_0.x86_64).

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22972

show more ...


# ee0fe82e 29-Dec-2019 Edward Tomasz Napierala <[email protected]>

Implement Linux syslog(2) syscall; just enough to make Linux dmesg(8)
utility work.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22465


# be2cfdbc 13-Dec-2019 Edward Tomasz Napierala <[email protected]>

Add kern_getsid() and use it in Linuxulator; no functional changes.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D22647


12345678910>>...15