- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Feb 16 2023
Feb 15 2023
Feb 13 2023
Use TFD_SETFLAGS ioctl() to set tfd flags during timerfd_settime()
- Grab struct timerfd through struct file instead of fd in timerfd_gettime_common() and timerfd_settime_common().
- Add timerfd_getflags() to update struct timerfd flags for use in timerfd_settime_common().
Feb 12 2023
Fix up flag intermingling between falloc() and finit() in eventfd_create_file().
Address all of @kib's inline comments
Update syscall wrappers for timerfd_gettime() and timerfd_settime()
to use an ioctl() entry point.
Use ioctl() instead of specialfd as kernel entry point for timerfd_gettime() and timerfd_settime() pseudo syscalls.
Feb 10 2023
In D38497#876076, @val_packett.cool wrote:Wait wait wait… if we decided not to put gettime/settime here, to keep it as an interface only for creating various kinds of descriptors, why are we still going to duplicate the falloc_noinstall/finstall/fdrop dance across the individual functions for each descriptor kind?
- Fix copyin() errors in lkpi by calling`eventfd_create_file()` directly.
- Rename kern_eventfd() to user_eventfd() since the underlying function doesn't adhere to standard kern_foo() conventions (i.e. it includes a copyin()).
Thanks everyone for the feedback. I am not quite sure how to proceed here. I just got done familiarizing myself with kevents and as @markj mentioned, a good amount of timerfd is just redundant code when EVFILT_TIMER exists. I want to do what's proper here, but @val_packett.cool mentioned that CLOCK_REALTIME support is absent in EVFILT_TIMER. Would adding REALTIME support be a large undertaking? I have never worked on time in the kernel - I have heard it isn't pleasant.
Feb 9 2023
Remove AUE_TIMERFD from audit_kevents.h since timerfd uses specialfd's AUE_SPECIALFD audit event.
Update diff to avoid patch application conflict on latest src main commit
Jan 31 2023
In D37961#870363, @jrm wrote:Jake, do you want me to commit this?
Jan 22 2023
Jan 19 2023
Add brief comment describing why PATH should only be sanitized on FreeBSD
In D37991#865889, @arichardson wrote:@jfree One more thing, could you give me an email address for committing? I see some commits in tree with Jake Freeland <jfree@FreeBSD.org>, is that correct?
Jan 18 2023
In D37991#865559, @jrtc27 wrote:I'd extend the commit message to the following, capturing the justification for the change:
Makefile: Avoid sanitizing PATH on non-FreeBSD systems Allow the build process to find host binaries during the host-symlinks target when cross-building on non-FreeBSD systems. Whilst most non-FreeBSD systems have all the needed tools in /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin (the final path added by host-symlinks itself), Homebrew for macOS on Arm defaults to /opt/homebrew/bin, other more niche systems may also deviate and users may expect tools in a customised PATH to be picked up, unlike on FreeBSD where we want to ensure everything comes from base. In particular, (un)xz are needed from Homebrew on macOS, and thus cannot be found on Arm without this. Note that non-FreeBSD builds enforce BUILD_WITH_STRICT_TMPPATH, and so the actual main build steps will still use a sanitised PATH.
Jan 9 2023
In D37983#863030, @jrtc27 wrote:In D37983#863029, @jfree wrote:In D37983#863026, @jrtc27 wrote:The fix is either to not do https://github.com/freebsd/freebsd-src/blob/main/Makefile#L220 on !FreeBSD or to save the original PATH and use it in host-symlinks for finding things. I lean towards the former, though the latter is what we do in CheriBSD today.
It looks like a simple
.if ${.MAKE.OS} == "FreeBSD" PATH= /sbin:/bin:/usr/sbin:/usr/bin .endiffixes the problem. Question is: what side-effects does this have?
It shouldn't matter much, most of the interesting parts of the build are run with PATH=${TMPPATH}, which is always ${STRICTTMPPATH} for !FreeBSD
Add context to diff
In D37983#863026, @jrtc27 wrote:The fix is either to not do https://github.com/freebsd/freebsd-src/blob/main/Makefile#L220 on !FreeBSD or to save the original PATH and use it in host-symlinks for finding things. I lean towards the former, though the latter is what we do in CheriBSD today.
In D37983#863021, @jrtc27 wrote:In D37983#863020, @jfree wrote:In D37983#862982, @jrtc27 wrote:Yeah this isn’t right, PATH just shouldn’t be sanitised when finding binaries on non-FreeBSD, it only makes sense to do on FreeBSD when we know where everything is.
Here's a comment from Makefile.inc1:607 that made me publish this patch:
- When building on non-FreeBSD we can't rely on the tools in /usr/bin being compatible
- with what FreeBSD expects. Therefore we only use tools from STRICTTMPPATH
- during the world build stage. We build most tools during the bootstrap-tools
- phase but symlink host tools that are known to work instead of building them
Otherwise I would have attempted to unsanitize the $PATH. Perhaps I am misunderstanding
your comment?It should still be sanitised for the build, but not for finding the things to symlink.
In D37983#862949, @arichardson wrote:IMO we should add this automatically based on where certain utilities are. Is this for xz? If so make.py could use the result of shutil.which to find that directory.
In D37983#862982, @jrtc27 wrote:Yeah this isn’t right, PATH just shouldn’t be sanitised when finding binaries on non-FreeBSD, it only makes sense to do on FreeBSD when we know where everything is.
Jan 6 2023
Remove PORTREVISION from Makefile
Jan 3 2023
Looks good to me.
Dec 21 2022
Hey @bz, what is the status for passing userspace buffers into write
fops for iwlwifi? DRM drivers expect a userspace buffer. I know you
mentioned earlier that iwlwifi expects a kernel buffer?
Thanks for finding this. I was under the impression the sbuf_len returned
the entire length of the sbuf including the null terminator. On second
thought, you're certainly right. This same fix should really be put on top
of this review, though.
Nov 7 2022
Judging by an earlier comment in fs.h that states llseek() should be mapped to no_llseek(), this addition makes sense.
Looks good to me.
Oct 31 2022
I just took a quick glance, but everything looks good :)
Take a look at my inline comment, though.
Oct 25 2022
Add check to make sure ->read() > 0 before copying to sbuf.
Thanks to @bz for pointing this out.
Oct 24 2022
Use copyout() instead of memcpy() for lindebugfs's kernel sb to userspace buf transfer.
Fix typos in linux_simple_attr.c function documentation
Oct 23 2022
I feel like the scattered nature of debugfs material makes it incredibly difficult to work with.
Perhaps something along the lines of this would work:
static int debugfs_blob_get(void *data, uint64_t *value) { struct debugfs_blob_wrapper *blob = data; memcpy(value, blob->data, blob->size); return (0); }
Oct 22 2022
In D35883#842153, @bz wrote:In D35883#842138, @jfree wrote:In D35883#842122, @bz wrote:There's more to fix in this (debugfs) world now it seems beyond the comment. Is anyone still interested please let me know.
I tested with FreeBSD seq_file and simple attribute file implementations. Both of these were modified in this patch to accommodate the kernel buffer. I did not realize that there were more implementations that are commonly used. This is my mistake, so I would be happy to finish the work. Sorry for any inconvenience that I may have caused. I'll start right away.
There is a lot of code using simple_open with a private read function which at the end simply calls simple_read_from_buffer() or even calls the copy_to_user() or for write copy_from_user() itself (e.g. when doing memory dumps). simple_read_from_buffer() as implemented here will also call the linux copy_to_user().
I am under the impression that it should be the implementation's problem to handle that bit and how to hide it (like seq_file does working on the sbuf)?
PS: I am also looking at debugfs_create_blob() and some other bits. If you are happy I'll try to get bits into here Saturday.
In D35883#842122, @bz wrote:There's more to fix in this (debugfs) world now it seems beyond the comment. Is anyone still interested please let me know.
Oct 2 2022
Moved struct dev_pm_info power member to bottom of struct device in <linux/device.h>
Sep 27 2022
Various changes to pci_power_name() thanks to @hselasky
- Added bound checking to pci_power_name()
- Made pci_power_names array external
Sep 21 2022
Looks good to me. Great solution to clear up the primary Makefile.
- Added "spotify-player" to audio/Makefile
- Removed "A" from start of COMMENT
- Updated pkg-descr to wrap lines after 80 characters
Joe, thank you for taking a look at this. I will fix up those issues by the end of the day.
Sep 11 2022
Sep 9 2022
@jrm Looks good. With those changes applied, the port should be ready to go. Thanks for checking it over again.
Sep 7 2022
In D36213#828576, @jrm wrote:Jake, are you satisfied this is ready to be committed? If so, I'll give it another look and commit if all looks good on my end.
Sep 2 2022
- Updated pkg-plist to support building on aarch64
- Removed MANPAGES and VALGRIND options
- Changed BROKEN_FreeBSD_12 to IGNORE_FreeBSD_12
- Small formatting tweaks
Sep 1 2022
- Removed unnecessary code from linux_simple_attr.c
- Created default_llseek() function in substitution of macro
- removed i_size_write() comment
Aug 29 2022
Fixed off-by-one error in linux_seq_file.c
Fixed memory leak where lf was not released due to a potential failed malloc() during read. Thanks to @hselasky for pointing this out.
Used memdup_user_nul() instead of memdup_user() to duplicate memory from userspace. Relevant documentation can be found here:
Aug 28 2022
- Updated seq_file seq_read() to report number of bytes read correctly
- Adjusted lindebugfs.c module declaration - this is done through the PSEUDOFS() macro
- Changed internal debugfs filesystem name to lindebugfs
- Modified man page to reflect changes
- Corrected off-by-one errors in linux_simple_attr.c
Aug 27 2022
Removed NULL pointer error checking thanks to @markj. General user pointers are safely checked in memdup_user().
Corrected pointer position errors in linux_simple_attr.c thanks to hselasky@
Aug 25 2022
Removed return statements from void functions per hselasky's advice
Added simple error checking
Fixed function parameter list indentation
Updated diff per markj@'s review and comments
Aug 22 2022
Aug 21 2022
Return positive values in lindebugfs.c so pseudofs vnops does not get confused.
Aug 20 2022
- Added USES for gnome and xorg per @jrm's advice
- Marked FreeBSD 12 broken
- Standardized formatting per portfmt
Aug 19 2022
In D36213#823470, @jrm wrote:Consider running portfmt -D Makefile.
Aug 18 2022
In D36213#823179, @diizzy wrote:I think that's fine but I'm more concerned of the overall state of the port with the amount of patches and no response regarding upstreaming. This is borderline unmaintainable and I doubt anyone will pick this up once committed and try to "sync" with upstream. Please try upstreaming as much as possible and add references to either PRs/merge requests and/or commits.
- Updated pkg-plist to add missing files under TEST option
- Added patch to POSIX-ify igt bash scripts
- Updated core library dependencies
Aug 17 2022
- Updated pkg-plist to support toggling options
- Adjusted Makefile thanks to advice from diizzy@ and lwhsu@
Aug 16 2022
Aug 11 2022
Added manual page for lindebugfs
Aug 10 2022
Aug 9 2022
Jul 26 2022
Minor modifications to lindebugfs.c
- Moved static inline functions out of debugfs.h and into lindebugfs.c.
- Removed unnecessary functions from debugfs.h.
- Generated diff with -U999999 flag.
Jul 23 2022
Added parenthesis around return values per FreeBSD kernel style guide