- User Since
- Jun 4 2014, 10:37 AM (415 w, 3 d)
Apr 1 2022
Mar 9 2022
Ah, sorry, I thought these were additional changes. Looking more carefully, these all seem to be things that we've done upstream already.
Please can you raise a PR upstream that adds a macro to select between the two ABIs, so that we're not carrying a diff in the FreeBSD version?
Jan 7 2022
Are there any other blockers to committing this? @markj, please can you approve if not?
Dec 19 2021
It's still not clear what the purpose of this is. It's not added to the Linux ABI. If we're adding a new FreeBSD syscall, there should be some design review or at least motivating use cases. Linux' rseq is mostly useless (far less useful than a lightweight userspace interrupt delivery mechanism or a resume-from-context-switch handler) and is *only* vaguely useful on Linux in combination with the fact that Linux has a lightweight get-CPU system call implemented in the VDSO that is cheaper than a CPUID (which is a serialising instruction and generally costs more than the saving of most of the win from doing per-CPU instead of per-thread things).
Dec 7 2021
- Fix comma splice.
Dec 6 2021
- Address code review comments.
Dec 3 2021
- Fix copy-and-paste fail.
Oct 18 2021
Again, this is clearly outside the design space of rseq.
Oct 16 2021
@brooks, can you take a look at this from a CheriABI perspective? The current version uses the Linux convention of assuming that uint64_t is a sensible type for memory addresses. We probably can't do that in CheriABI because it would allow you to register a jump address that would make other code jump to your handler (or, conversely, it may prevent you from setting a range in some situations where there's a PCC change in between the rseq setup and the destination).
Oct 12 2021
Oct 11 2021
Thanks for doing this, it will make porting our work to FreeBSD easier. There are some missing man pages (both for the new pmap interfaces and for the syscall).
Jul 17 2021
Abandoning: This is probably not the right approach and @jhb is working on something similar so I'll wait for his version.
Jul 16 2021
Jul 10 2021
@brooks, this should also be useful for combining CHERI coprocesses with Capsicum (coprocesses are currently created with vfork + coexecve).
Jun 25 2021
- Propagate the field on fork.
- Add missing siginfo(3) documentation.
- Propagate the field on fork.
- Add missing siginfo(3) documentation.
Jun 4 2021
Let's try option 2 and see if it works :-)
I've never used git send-mail, how does it interact with Phabricator? If I do a rebase / squash to produce a single commit, is that sufficient? You should be able to then arc patch and git push.
Thanks. Please can you commit if you're happy with it?
- Use less-ambiguous terminology.
- Use less-ambiguous terminology.
Can rfork (or pdfork / vfork / whatever) both fail with a capsicum violation *and* create a new struct proc and return in the child context with a signal? That should be the only case where you need to duplicate the original_code field into the child.
12-STABLE version is D30635.
Thanks. I think I'm happy for this version to land in main if reviewers are and I'll work on a version for 12- and 13-stable.
- Reorder original_code to fit in padding for 64-bit archs.
Mar 16 2021
Are the syscall_args structures part of the stable KBI? This won't quite cleanly apply to older versions of FreeBSD because at least on x86 the system call entry code has been cleaned up to remove some code duplication, but I am running on 12-STABLE with a version of this that doesn't correctly handle the syscall / __syscall syscalls and it would be great to be able to MFC as much as possible, even if we can't get full support without the KBI change.
- Add missing architecture support, address reviewer comments.
Mar 12 2021
Sorry, this version does work, I had only updated one of the places in the code using it to check si_syscall and so the test was failing yesterday.
Add amd64 paths to preserve the original system call number.
When do you need this? Isn't this kind of introspection warrants a use of real debugger which can deduce all the data from debugging information?
Mar 11 2021
I appear to be setting the field in the siginfo structure incorrectly in the new version, but it's now the end of the day for me so I will try to debug this tomorrow.
@emaste, sorry, I don't think I understand this comment.
Updated based on @kib's feedback.
@kib, thank you, that also mirrors what Linux does for seccomp violation signals. I will update the diff to reflect that.
Mar 10 2021
Feb 1 2021
Thanks, I'll see if I can chase this down later. My commit bit lapsed, please can you land it?
Yes it should be strdup'ed somewhere but I am surprised that it works. Look at the start of load_object(): if name != NULL, it searches for existing loaded object with the specified name.
Thanks. I can confirm that this change also fixes this problem:
Jun 18 2020
For snmalloc, we use this call in the Linux PAL. On FreeBSD, we use mmap to map a new anonymous memory object over the old one, which has the same behaviour. We don't do this on shared memory mappings, but for sandboxing use cases we do need some equivalent mechanism (i.e. something that can zero a large range of shared memory, without requiring the OS to actually allocate physical pages for all of the zeroes). On Linux, we can do this with fallocate on the underlying memory object (I think we can do it with mem_fd objects, we can definitely do it in tmpfs). I am not sure what the correct mechanism for doing this in FreeBSD is.
May 5 2020
Feb 24 2020
Feb 14 2020
This looks fine, but please submit it as a GitHub PR so that it goes through CI (I can't imagine it failing).
Jan 15 2020
Unless I'm missing something, this leaves GPL'd dtc's sources in the tree but removes the ability to build them. Would it make sense to remove the code at the same time as removing the build system goo?
May 25 2019
I've now tried doing this and have finally managed to get it to work. A couple of things:
Mar 26 2019
Mar 15 2019
I'd be very happy to replace the libelftc demangler with the one from libc++abi, but last time this was discussed there were some complaints about the significant increase in binary size. One solution that I'd considered is to replace the demangler in libc++abi with a stub that doesn't actually do any demangling and then import the libc++abi demangler into libc++, possibly excluding it from release builds of the static library (dynamically linked programs probably don't mind paying the size overhead).
Mar 14 2019
Please do not do this. libc++abi implements the Itanium ABI specification, but *not* GNU extensions. This is fine for Apple, because their Objective-C exceptions are thin wrappers around C++ exceptions, but other languages on non-Apple platforms (Objective-C definitely, I think Ada and a few others) rely on GNU extensions. These are supported by libsupc++ and libcxxrt. There's a reason that the product groups at $WORK picked libcxxrt for things that ship libc++...
Feb 10 2019
Feb 3 2019
Jan 27 2019
Jan 21 2019
Jan 18 2019
Dec 31 2018
Dec 29 2018
There may be a few more changes coming. I can now build all of the gnustep-app packages with the new ABI, but sope2 fails to link with some interesting errors.
Dec 28 2018
Oct 12 2018
Aug 17 2018
These changes look fine, but please send a PR on GitHub and then merge to FreeBSD from upstream.
Feb 10 2018
I wonder how we prevent these from getting out of sync (or check their correctness in the first place). How feasible is it to add a dynamic check along the lines of WITNESS that would record these annotations for each block of memory and then check that copyin / copyout were not done past the declared length, or in the wrong direction? I suspect a static analysis would be too hard unless we are willing to propagate these annotations all of the way down into the kernel, unless the copyin / copyout are always done near the system call layer.
Jan 7 2018
I saw something similar. This upgrade first failed because of a samba44 samba46 conflict. Running it again silently removed samba44 (nothing in my scrollback indicates that 4.4 will be removed) and installed 4.6. Not a great user experience.
Dec 13 2017
I don't have an exhaustive list, and even if we fix all of them in the base system, there will be others in ports. This is why we have things like $PAGER - to avoid needing to hard-code defaults. If the project believes that less is a better default pager than more then we should modify /etc/profile or something to set PAGER=less, not go and modify all of the tools by hand to use less (and if there are any tools that don't respect $PAGER, $EDITOR and so on then they are buggy and should be fixed).
I can't help feeling that this poll is really asking the wrong question. There are a bunch of things like this, for example:
Dec 12 2017
What are the changes? I've only ever used less on GNU systems where the more install is ancient and doesn't support scrolling up. I have no opinion if I'm not going to notice the difference, but without knowing what the 'few things less does differently' are I'd vote no to avoid surprises.
Dec 3 2017
Nov 3 2017
I don't have strong opinions about this - hopefully this code can be fixed by some judicious application of svn rm in the near future...
Nov 2 2017
Oct 1 2017
This probably means that we no longer need to expose _DefaultRuneLocale in the header.
Sep 7 2017
Aug 27 2017
Aug 26 2017
Aug 21 2017
Jul 14 2017
Nov 26 2016
Is this bad? Licensing aside, dtc is useful as a cross-build and cross-development tool. We use it extensively on x86 servers that make no use of FDT.
Aug 6 2016
Thank you for all of the time that you've spent on this. __cxa_thread_atexit is not in the latest version of the ABI spec, so it's currently an informal convention between the compiler and runtime library. The compiler doesn't check for failure, so it's probably best to abort for dangerous failures. The compiler-generated code probably should be checking for failure, invoking the destructor for the object, and throwing an exception, but that's something for WG21 to decide.
Jul 22 2016
Mar 13 2016
While I agree that we need this in CheriBSD for experimentation with clang, I'd rather that we didn't put it in FreeBSD head unless we have a desire to make the kernel position independent (I've not looked at how we do modules on MIPS, so this may be a real requirement). On in-order implementations, the presence of the delay slot means that the jal can be resolved in time for instruction fetch to succeed, so we don't use a branch predictor table entry (and we won't accidentally alias with another branch in userspace somewhere). This is likely to have fairly complex performance implications on the variety of MIPS hardware available currently.