Page MenuHomeFreeBSD

linux: implement fchmodat2 syscall
ClosedPublic

Authored by ngie on Mon, Oct 5, 11:54 PM.
Tags
None
Referenced Files
F175299525: D60394.id188788.diff
Fri, Oct 9, 6:57 PM
F175251450: D60394.id188864.diff
Fri, Oct 9, 10:48 AM
F175245855: D60394.id188774.diff
Fri, Oct 9, 9:50 AM
F175237057: D60394.id188864.diff
Fri, Oct 9, 8:14 AM
F175230922: D60394.id188788.diff
Fri, Oct 9, 7:05 AM
F175225252: D60394.id188787.diff
Fri, Oct 9, 6:08 AM
F175197389: D60394.id188864.diff
Fri, Oct 9, 12:57 AM
Unknown Object (File)
Thu, Oct 8, 11:12 PM

Details

Summary

The fchmodat2 syscall on Linux is effectively the same as fchmodat
on FreeBSD, whereas fchmodat on Linux is fchmodat on FreeBSD, minus
the flags argument.

This change provides the necessary glue in order to call kern_fchmodat
properly via the Linuxulator.

NB: glibc transparently passes through the flags argument for
fchmodat*, so this is [largely] a no-op for Linux end-users, however,
it affects those who compiled binaries specifically using the
fchmodat2 syscall--which likely includes newer versions of glibc, etc.

MFC after: 2 weeks

Test Plan

The fchmodat2 negative test cases from LTP pass. Running the positive test cases requires /dev/loop, which we don't implement (yet?).
Test output: P720.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77749
Build 74632: arc lint + arc unit

Event Timeline

ngie requested review of this revision.Mon, Oct 5, 11:54 PM
ngie edited the summary of this revision. (Show Details)
ngie added a subscriber: Linux Emulation.

Add missing pieces for fchmodat2 in all architectures

ANNNNNNNDDDD... update arm64's linux32 syscalls.master file.

This revision was not accepted when it landed; it landed in state Needs Review.Tue, Oct 6, 1:42 PM
This revision was automatically updated to reflect the committed changes.