Page MenuHomeFreeBSD

Linux EmulationUmbrella
ActivePublic

Recent Activity

Aug 15 2021

grahamperrin_gmail.com added a comment to D26668: Expose eventfd in the native API/ABI using a new __specialfd syscall.

Linking for convenience, a cgit range that inclues the four commits: https://cgit.freebsd.org/src/log/?qt=range&q=7f4e724829e556fc646056669c2af3551b7e8724...67af9aba6b144789734289443a5f90a3ca716dbe

Aug 15 2021, 6:29 AM · Linux Emulation

Jul 20 2021

dchagin closed D30332: linuxulator: Add FUTEX_REQUEUE for musl libc. .
Jul 20 2021, 11:42 AM · Linux Emulation

Jun 25 2021

dchagin added a comment to D30332: linuxulator: Add FUTEX_REQUEUE for musl libc. .

Im don't understand what do you mean, I mean that musl it's a separate brand, see Elf_Brandinfo and linux_sysvec.c,
and only for musl brand we should change cmp_requeue, for glibc brand cmp_requeue should return EINVAL

Well. No. Musl doesn't have different brands for the elf files, only the path of the interp differs, and in any case we are a Linuxulator, not a glibculator, it's better to just remain agnostic of the userland and let it sort itself out like is expected of the kernel.

If there's a quirk for some ancient glibc version then make that a knob somewhere or break it in favour of modern (read from this decade) versions.

Jun 25 2021, 4:19 PM · Linux Emulation

Jun 14 2021

pitwuu_gmail.com added a comment to D30332: linuxulator: Add FUTEX_REQUEUE for musl libc. .

Im don't understand what do you mean, I mean that musl it's a separate brand, see Elf_Brandinfo and linux_sysvec.c,
and only for musl brand we should change cmp_requeue, for glibc brand cmp_requeue should return EINVAL

Jun 14 2021, 4:53 AM · Linux Emulation

Jun 13 2021

dchagin added a comment to D30332: linuxulator: Add FUTEX_REQUEUE for musl libc. .

Im don't understand what do you mean, I mean that musl it's a separate brand, see Elf_Brandinfo and linux_sysvec.c,
and only for musl brand we should change cmp_requeue, for glibc brand cmp_requeue should return EINVAL

Jun 13 2021, 1:25 PM · Linux Emulation

Jun 11 2021

linimon added a reviewer for D30332: linuxulator: Add FUTEX_REQUEUE for musl libc. : Linux Emulation.
Jun 11 2021, 1:52 PM · Linux Emulation

Jun 6 2021

kib closed D28154: Add compat.linux.setid_allowed knob.
Jun 6 2021, 7:26 PM · Linux Emulation
dchagin accepted D28154: Add compat.linux.setid_allowed knob.
Jun 6 2021, 5:19 PM · Linux Emulation

Jun 5 2021

ygy added a watcher for Linux Emulation: ygy.
Jun 5 2021, 10:51 AM

Jun 1 2021

trasz added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

FWIW, splice: https://reviews.freebsd.org/D30597

Jun 1 2021, 3:33 PM · Linux Emulation, Core Team

May 25 2021

emaste added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

we have so many such unfinished things

May 25 2021, 5:47 PM · Linux Emulation, Core Team
dchagin added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

FWIW, splice(2) can be a wrapper around copy_file_range(2). We should also have a fallback from sendfile(2) to splice(2), for when it fails with ENOTSOCK. This is one of the things that break Mono

May 25 2021, 5:42 PM · Linux Emulation, Core Team
dchagin added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

Why do we need it? All the BSD's seem to exist without splice() just fine?

May 25 2021, 5:25 PM · Linux Emulation, Core Team
dchagin added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

The most pressing issue is the incomplete pthread support notably with FUTEX_LOCK_PI and FUTEX_UNLOCK_PI and friends.

https://wiki.freebsd.org/Linuxulator#Roadmap, pi is not the key, we have so many important holes

It's literally the second item on that list, for example pulseaudio hard crashes because it's not there. I have started but it's pretty hard, I wonder if anyone can help?

May 25 2021, 5:18 PM · Linux Emulation, Core Team
trasz added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

FWIW, splice(2) can be a wrapper around copy_file_range(2). We should also have a fallback from sendfile(2) to splice(2), for when it fails with ENOTSOCK. This is one of the things that break Mono.

May 25 2021, 5:07 PM · Linux Emulation, Core Team
pitwuu_gmail.com added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

we have so many such unfinished things, like arm linuxulator, splice sys call....

Yes, about splice, I was thinking we could just use a regular copy and be done with it. It wouldn't be that hard to implement, I can possibly look at it.

some time ago I wrote splice emulation via dofileread/dofilewrite ) but I abandoned it because I think we need a native splice() and tee() implementation. feel free to as arch@ about it:)

May 25 2021, 5:02 PM · Linux Emulation, Core Team
pitwuu_gmail.com added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

we have so many such unfinished things, like arm linuxulator, splice sys call....

Yes, about splice, I was thinking we could just use a regular copy and be done with it. It wouldn't be that hard to implement, I can possibly look at it.

some time ago I wrote splice emulation via dofileread/dofilewrite ) but I abandoned it because I think we need a native splice() and tee() implementation. feel free to as arch@ about it:)

The most pressing issue is the incomplete pthread support notably with FUTEX_LOCK_PI and FUTEX_UNLOCK_PI and friends.

https://wiki.freebsd.org/Linuxulator#Roadmap, pi is not the key, we have so many important holes

May 25 2021, 4:59 PM · Linux Emulation, Core Team
emaste added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

I don't think they are even usable, since the core file is in FreeBSD format that linux gdb can't parse, and confuse the freebsd gdb because it's a linux process/elf.

May 25 2021, 4:56 PM · Linux Emulation, Core Team
dchagin added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

we have so many such unfinished things, like arm linuxulator, splice sys call....

Yes, about splice, I was thinking we could just use a regular copy and be done with it. It wouldn't be that hard to implement, I can possibly look at it.

May 25 2021, 4:55 PM · Linux Emulation, Core Team
pitwuu_gmail.com added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

Encountered in the crash handler of 'kodi'. Kodi still crashes, but at least the crash handler doesn't seem to crash anymore.

IMO this sort of thing is sufficient reason to have this linprocfs entry. What do you think about extending it slightly, at least translating FreeBSD's default %N.core to the Linux equivalent (%e.core I guess?)

we have so many such unfinished things, like arm linuxulator, splice sys call....

May 25 2021, 4:47 PM · Linux Emulation, Core Team
dchagin added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

Encountered in the crash handler of 'kodi'. Kodi still crashes, but at least the crash handler doesn't seem to crash anymore.

IMO this sort of thing is sufficient reason to have this linprocfs entry. What do you think about extending it slightly, at least translating FreeBSD's default %N.core to the Linux equivalent (%e.core I guess?)

May 25 2021, 4:40 PM · Linux Emulation, Core Team
pitwuu_gmail.com added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

Encountered in the crash handler of 'kodi'. Kodi still crashes, but at least the crash handler doesn't seem to crash anymore.

IMO this sort of thing is sufficient reason to have this linprocfs entry. What do you think about extending it slightly, at least translating FreeBSD's default %N.core to the Linux equivalent (%e.core I guess?)

May 25 2021, 4:35 PM · Linux Emulation, Core Team
emaste added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

Encountered in the crash handler of 'kodi'. Kodi still crashes, but at least the crash handler doesn't seem to crash anymore.

May 25 2021, 4:25 PM · Linux Emulation, Core Team
pitwuu_gmail.com added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

Is there a way to config git to do that by default? It's annoying to do every time.

I'm not sure, although I also suspect you don't want it when generating a patch for your own review, not for upload to Phabricator. There is a tool in the tree, tools/tools/git/git-arc, which can take care of submitting phab reviews for you.

May 25 2021, 4:23 PM · Linux Emulation, Core Team
emaste added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

Is there a way to config git to do that by default? It's annoying to do every time.

May 25 2021, 4:19 PM · Linux Emulation, Core Team
pitwuu_gmail.com added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

For future uploads please include full context by using e.g. git show -U99999 <hash> - see https://wiki.freebsd.org/Phabricator for details

May 25 2021, 4:13 PM · Linux Emulation, Core Team

May 24 2021

dchagin added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

hi, what is the purpose for this? it will be used read only. so what is the program depend on it?

May 24 2021, 6:46 AM · Linux Emulation, Core Team
emaste added a comment to D30378: linuxulator: Add filler for 'core' entry in linsysfs..

For future uploads please include full context by using e.g. git show -U99999 <hash> - see https://wiki.freebsd.org/Phabricator for details

May 24 2021, 1:38 AM · Linux Emulation, Core Team
lwhsu added a reviewer for D30378: linuxulator: Add filler for 'core' entry in linsysfs.: Linux Emulation.
May 24 2021, 1:14 AM · Linux Emulation, Core Team

May 21 2021

pitwuu_gmail.com requested review of D30378: linuxulator: Add filler for 'core' entry in linsysfs..
May 21 2021, 12:01 PM · Linux Emulation, Core Team

May 18 2021

pitwuu_gmail.com requested review of D30332: linuxulator: Add FUTEX_REQUEUE for musl libc. .
May 18 2021, 2:15 PM · Linux Emulation
dchagin added a comment to D28154: Add compat.linux.setid_allowed knob.
In D28154#680209, @kib wrote:

Do we have an agreement there?

I think that switching the defaults, if ever, should be done by separate change indeed.

May 18 2021, 6:20 AM · Linux Emulation

May 15 2021

kib added a comment to D28154: Add compat.linux.setid_allowed knob.

Do we have an agreement there?

May 15 2021, 7:44 PM · Linux Emulation

May 13 2021

trasz added a comment to D28154: Add compat.linux.setid_allowed knob.

All kinds of cases, tbh - from sudo apt update, to Chromium, which (for some reason) depends on a setuid helper.

May 13 2021, 1:54 PM · Linux Emulation

May 12 2021

dchagin added a comment to D28154: Add compat.linux.setid_allowed knob.

I've tested this patch for both 64, and 32-bit Linux binaries, for both suid and sgid bit, and it works just fine.

One nit, though: I'd strongly prefer the sysctl to be enabled by default, ie to permit suid/sgid by default. Otherwise it will break some pretty common use cases.

May 12 2021, 7:38 AM · Linux Emulation

May 9 2021

kib updated the diff for D28154: Add compat.linux.setid_allowed knob.

Switch to allow by default

May 9 2021, 10:30 PM · Linux Emulation
trasz added a comment to D28154: Add compat.linux.setid_allowed knob.

I've tested this patch for both 64, and 32-bit Linux binaries, for both suid and sgid bit, and it works just fine.

May 9 2021, 7:30 PM · Linux Emulation
trasz added a comment to D28154: Add compat.linux.setid_allowed knob.

Sure, I'll test it.

May 9 2021, 2:41 PM · Linux Emulation

May 6 2021

kib updated the diff for D28154: Add compat.linux.setid_allowed knob.

Rebase.
Add some explanation to man page.

May 6 2021, 8:18 PM · Linux Emulation
kib added a comment to D28154: Add compat.linux.setid_allowed knob.

Note that I'm not in any way opposed to this change.

Also, there's now a review which shows what I've meant with NO_NEW_PRIVS flag: https://reviews.freebsd.org/D30130. It reuses a part of this patch, but is otherwise orthogonal.

May 6 2021, 8:11 PM · Linux Emulation

May 5 2021

trasz added a comment to D28154: Add compat.linux.setid_allowed knob.

Note that I'm not in any way opposed to this change.

May 5 2021, 7:21 PM · Linux Emulation

Mar 24 2021

dchagin added a comment to D28154: Add compat.linux.setid_allowed knob.

Fully support this change and motivation, propose to add a short description to the linux(4) manual about sysctl

Mar 24 2021, 8:05 AM · Linux Emulation

Mar 23 2021

dchagin added a reviewer for D28154: Add compat.linux.setid_allowed knob: dchagin.
Mar 23 2021, 1:57 PM · Linux Emulation

Mar 7 2021

trasz added a comment to D28154: Add compat.linux.setid_allowed knob.

Also: I wonder if we could start allowing chroot(2) for non-root users, as long as the calling process has the NO_NEW_PRIVS flag set.

Mar 7 2021, 2:23 PM · Linux Emulation

Mar 6 2021

trasz added a comment to D28154: Add compat.linux.setid_allowed knob.

I'm not convinced about the environment, tbh. Can you give some specific example of what we don't provide, that could affect security of suid binaries?

Mar 6 2021, 12:14 PM · Linux Emulation

Feb 3 2021

jkim added inline comments to D27807: Use compat.linux.emul_path instead of hardcoded path in /etc/rc.d/linux.
Feb 3 2021, 8:21 PM · Linux Emulation

Feb 2 2021

trasz closed D27807: Use compat.linux.emul_path instead of hardcoded path in /etc/rc.d/linux.
Feb 2 2021, 2:46 PM · Linux Emulation

Feb 1 2021

kib added a comment to D28154: Add compat.linux.setid_allowed knob.

Motivation is provided by the notes in the referenced PR. Briefly, convincing argument for me was that we do not provide environment that would be expected by the linux setuid binaries, so assumptions made during coding of them could be broken by us unknowingly. More, I should add that it is possible that user break them due to our /compat/linux+normal freebsd fs fallback setup.

Feb 1 2021, 11:23 AM · Linux Emulation
trasz added a comment to D28154: Add compat.linux.setid_allowed knob.

I'm not sure this is all that useful, to be honest. What's the usage scenario? Why would one globally disable suid for Linux binaries?

Feb 1 2021, 10:33 AM · Linux Emulation

Jan 19 2021

freebsdnewbie_freenet.de updated the diff for D27807: Use compat.linux.emul_path instead of hardcoded path in /etc/rc.d/linux.

Make changes on source file instead of file in destination location (/etc/rc.d/linux). Use sysctl-variable for all occurences of hardcoded path of /compat/linux.

Jan 19 2021, 1:40 PM · Linux Emulation