-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux: Support POSIX message queues #1248
Conversation
0129a6e
to
53c0352
Compare
It's passing the LTP & POSIX tests on both 64-bits & 32-bits except for:
MISSING: Support for 32-bits on 64. To test it I had to mount mqueuefs on a Ubuntu chroot created with
Note: Beware of removing any queue via the filesystem due to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278936 It's better to use On an Ubuntu 22.04 VM I compiled LTP like this:
Then copied Also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about wisdom of allowing '/' for FreeBSD native, although I do not object. Can you think of (negative) consequences of changing native behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove generated diffs from the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kern_ functions are normally put into sys/syscallsubr.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, please put kern_ functions into sys/syscallsubr.h
0a9884e
to
213b5d7
Compare
You mean the ones generated by Had to run |
I don't see any. In fact, I was surprised mq_open allowed paths starting with |
c4adebc
to
0cf0cf9
Compare
0cf0cf9
to
8686964
Compare
8686964
to
4fdf2f1
Compare
sys/compat/linux/linux_misc.c
Outdated
} | ||
|
||
return (kern_kmq_open(td, args->name, flags, args->mode, | ||
args->attr != NULL ? &attr : NULL)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the O_CREAT flag is not set, but args->attr is not NULL? Wouldn't we pass a pointer to the stack garbage to kern_kmq_open?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the O_CREAT flag is not set, but args->attr is not NULL? Wouldn't we pass a pointer to the stack garbage to kern_kmq_open?
sys_kmq_open also does this. This function is based on sys_kmq_open. Fortunately, kern_kmq_open does the right thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is worth fixing. You can do it as a follow-up to the current PR.
4fdf2f1
to
d384982
Compare
5c1bc3e
to
0b8a871
Compare
Also fixed it. Hope I didn't interfere with any rebasing. |
For Phabricator reviews, the advise to remove auto generated files is good. |
I'll disagree with this statement. Phabricator hides the generated diff by default due to the |
ah, I'll retract it for phab then. I'd forgotten it does that. |
Autogenerated files make reading both reviews/PRs and actual commits awful *. They should be changed in the separate commit. In principle, such commit can be included into the series forming the PR, but then it leaves the possibility of conflicting with the changes in upstream. I do not see any problem with committer doing IMO this is the best procedure, and I insist on it due to (*). |
Needing to do a I think the tradeoff of giving feedback to the submitter that certain things are broken (which we need to do more of, I think) and an 'all green' is worth the time to go through the process of landing out-weighs the ugliness in the review of having to skip over generated files. |
(for this PR, though, I'm doing the make sysent and generating a commit to do the testing locally) |
I also wonder how the cross builds are showing 'green' when they don't build for me natively w/o the make sysent. |
…iptions Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
This is needed to support Linux implementation which discards the leading slash when calling mq_open(2) Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
Reviewed by: imp, kib Pull Request: freebsd#1248
Doh! my 'what to do when we lose the race' case of my automation failed to do the right thing, so this isn't showing up as merged. |
This PR adds preliminary support for POSIX message queues. It also adds the respective /proc/sys/mqueue entries to
linprocfs
.Not supported:
mq_notify
withSIGEV_THREAD_ID
as it must call a Linux function.TODO:
Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279069