Page MenuHomeFreeBSD
Feed Advanced Search

Feb 16 2023

brooks added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 16 2023, 7:02 PM · linuxkpi, Linux Emulation
jfree updated the diff for D38460: timerfd: Add libc syscall wrappers.
  • Remove unnecessary headers
  • Fix style(9) formatting
Feb 16 2023, 6:39 AM · linuxkpi, Linux Emulation
kib added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 16 2023, 6:25 AM · linuxkpi, Linux Emulation
jfree added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 16 2023, 6:19 AM · linuxkpi, Linux Emulation
jfree updated the diff for D38459: timerfd: Add native support for Linux's timerfd.
  • Add end-of-line commas for all designated initializers per @kib's advice
  • Add 32-bit ioctl() compat - massive thanks for @brooks for this
  • Change all instances of callout_reset to callout_reset_sbt for greater accuracy
Feb 16 2023, 6:13 AM · linuxkpi, Linux Emulation

Feb 15 2023

brooks added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 15 2023, 12:33 AM · linuxkpi, Linux Emulation
jfree added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 15 2023, 12:21 AM · linuxkpi, Linux Emulation

Feb 14 2023

markj added a comment to D38459: timerfd: Add native support for Linux's timerfd.
In D38459#877486, @kib wrote:

Please take a look at the D29106 review. Are the reasoning from the review applicable to the timerfd facility as well?

Feb 14 2023, 2:26 PM · linuxkpi, Linux Emulation

Feb 13 2023

kib added inline comments to D38460: timerfd: Add libc syscall wrappers.
Feb 13 2023, 10:26 PM · linuxkpi, Linux Emulation
kib added a comment to D38459: timerfd: Add native support for Linux's timerfd.

Please take a look at the D29106 review. Are the reasoning from the review applicable to the timerfd facility as well?

Feb 13 2023, 10:19 PM · linuxkpi, Linux Emulation
brooks added a comment to D38459: timerfd: Add native support for Linux's timerfd.

Here's a rough outline of the changes for 32-bit compat. Untested in any way, but hopefully points in the right direction.

Feb 13 2023, 6:02 PM · linuxkpi, Linux Emulation
jfree updated the diff for D38460: timerfd: Add libc syscall wrappers.

Use TFD_SETFLAGS ioctl() to set tfd flags during timerfd_settime()

Feb 13 2023, 3:58 AM · linuxkpi, Linux Emulation
jfree updated the diff for D38459: timerfd: Add native support for Linux's timerfd.
  • 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 13 2023, 3:53 AM · linuxkpi, Linux Emulation

Feb 12 2023

dchagin added a comment to D38459: timerfd: Add native support for Linux's timerfd.

test from man page is not enough, at least test also should check poll or kevent on timerfd fd.
It's a good practice to add tests for new things to our tests suite, just my 2c.

Feb 12 2023, 7:26 PM · linuxkpi, Linux Emulation
kib added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 12 2023, 6:39 PM · linuxkpi, Linux Emulation
jfree updated the diff for D38459: timerfd: Add native support for Linux's timerfd.

Address all of @kib's inline comments

Feb 12 2023, 4:01 PM · linuxkpi, Linux Emulation
jfree added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 12 2023, 3:46 PM · linuxkpi, Linux Emulation
jfree updated the diff for D38460: timerfd: Add libc syscall wrappers.

Update syscall wrappers for timerfd_gettime() and timerfd_settime()
to use an ioctl() entry point.

Feb 12 2023, 4:39 AM · linuxkpi, Linux Emulation
kib added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 12 2023, 4:36 AM · linuxkpi, Linux Emulation
jfree updated the summary of D38459: timerfd: Add native support for Linux's timerfd.
Feb 12 2023, 4:16 AM · linuxkpi, Linux Emulation
jfree updated the diff for D38459: timerfd: Add native support for Linux's timerfd.

Use ioctl() instead of specialfd as kernel entry point for timerfd_gettime() and timerfd_settime() pseudo syscalls.

Feb 12 2023, 3:55 AM · linuxkpi, Linux Emulation
jfree added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 12 2023, 2:41 AM · linuxkpi, Linux Emulation
jfree added inline comments to D38459: timerfd: Add native support for Linux's timerfd.
Feb 12 2023, 2:13 AM · linuxkpi, Linux Emulation

Feb 10 2023

brooks added a comment to D38459: timerfd: Add native support for Linux's timerfd.
In D38459#875880, @kib wrote:

I suggest to add ioctl's to perform the ops on the descriptor, instead of filling the syscall table with more one-purpose entries.

Feb 10 2023, 5:16 PM · linuxkpi, Linux Emulation
val_packett.cool added a comment to D38459: timerfd: Add native support for Linux's timerfd.
In D38459#875880, @kib wrote:

I suggest to add ioctl's to perform the ops on the descriptor, instead of filling the syscall table with more one-purpose entries.

Feb 10 2023, 5:15 PM · linuxkpi, Linux Emulation
kib added a comment to D38459: timerfd: Add native support for Linux's timerfd.

I suggest to add ioctl's to perform the ops on the descriptor, instead of filling the syscall table with more one-purpose entries.

Feb 10 2023, 5:09 PM · linuxkpi, Linux Emulation
brooks added a comment to D38459: timerfd: Add native support for Linux's timerfd.

BTW, just to be clear, I'm really happy to see this work. It's a portability gap that has caused issues for multiple users of Morello and CheriBSD so I'm looking forward to seeing it landed.

Feb 10 2023, 5:04 PM · linuxkpi, Linux Emulation
brooks added a comment to D38459: timerfd: Add native support for Linux's timerfd.

Also, should I move all 3 syscalls (timerfd_create, timerfd_settime, timerfd_gettime) to standard syscalls? Or should I keep timerfd_create inside __specialfd? I'm not exactly clear on the purpose of __specialfd at this point.

Feb 10 2023, 4:54 PM · linuxkpi, Linux Emulation
markj added a comment to D38459: timerfd: Add native support for Linux's timerfd.

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 10 2023, 3:08 PM · linuxkpi, Linux Emulation
jfree added a comment to D38459: timerfd: Add native support for Linux's timerfd.

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 10 2023, 5:07 AM · linuxkpi, Linux Emulation

Feb 9 2023

val_packett.cool added a comment to D38459: timerfd: Add native support for Linux's timerfd.

One wrinkle that I can see is that timerfd lets you specify a clock ID, but this implementation doesn't really do anything with it...

Feb 9 2023, 8:16 PM · linuxkpi, Linux Emulation
markj added a comment to D38459: timerfd: Add native support for Linux's timerfd.

So, this really replicates a lot of the functionality provided by an EVFILT_TIMER kevent. And it's missing some of the bug fixes we've made in kevent over time. For instance, kqueue maintains a global limit of user-created callouts, kq_calloutmax. I'm actually not really sure this limit makes sense anymore, but this new code doesn't have such a limit. Another example is commit 2fd1ffefaa4d2cd99a19f866a949cb2cd58ef998, which makes it possible for signals to stop a kevent callout from re-arming itself, in case a user does something stupid like schedule a periodic callout with a period of 1ns (which generally results in an unkillable loop).

Feb 9 2023, 7:49 PM · linuxkpi, Linux Emulation
val_packett.cool added a comment to D38459: timerfd: Add native support for Linux's timerfd.

just implement these to as syscalls leaving __specialfd for descriptor creation

Feb 9 2023, 7:09 PM · linuxkpi, Linux Emulation
brooks requested changes to D38459: timerfd: Add native support for Linux's timerfd.

The overall interface has ABI compatibility issues.

Feb 9 2023, 7:05 PM · linuxkpi, Linux Emulation
dchagin added a comment to D38459: timerfd: Add native support for Linux's timerfd.

Hi, nice.. it would be nice to see some tests for a native timerfd syscalls

Feb 9 2023, 6:41 AM · linuxkpi, Linux Emulation
jfree updated the diff for D38459: timerfd: Add native support for Linux's timerfd.

Remove AUE_TIMERFD from audit_kevents.h since timerfd uses specialfd's AUE_SPECIALFD audit event.

Feb 9 2023, 6:07 AM · linuxkpi, Linux Emulation
jfree requested review of D38460: timerfd: Add libc syscall wrappers.
Feb 9 2023, 5:49 AM · linuxkpi, Linux Emulation
jfree updated the diff for D38459: timerfd: Add native support for Linux's timerfd.

Update diff to avoid patch application conflict on latest src main commit

Feb 9 2023, 5:17 AM · linuxkpi, Linux Emulation
jfree requested review of D38459: timerfd: Add native support for Linux's timerfd.
Feb 9 2023, 5:07 AM · linuxkpi, Linux Emulation

Feb 6 2023

bz closed D34248: LinuxKPI: return an address string in pci_name.
Feb 6 2023, 9:58 PM · linuxkpi
bz added a comment to D34248: LinuxKPI: return an address string in pci_name.

I'll take it and commit it given all other consumers but the one amdgpu one seem to be in my wireless driver tree.

Feb 6 2023, 7:36 PM · linuxkpi
val_packett.cool updated the diff for D34248: LinuxKPI: return an address string in pci_name.

Rebase after D38222

Feb 6 2023, 3:19 AM · linuxkpi

Feb 5 2023

val_packett.cool updated the diff for D34248: LinuxKPI: return an address string in pci_name.

Rebased. Ping!

Feb 5 2023, 9:08 PM · linuxkpi
val_packett.cool updated the summary of D34248: LinuxKPI: return an address string in pci_name.
Feb 5 2023, 9:05 PM · linuxkpi

Dec 21 2022

jfree added a comment to D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops.

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?

Dec 21 2022, 5:29 PM · linuxkpi

Dec 15 2022

manu added a reverting change for D36749: LinuxKPI: Add pci_power querying for drm-kmod: rG50f61166f7b9: Revert "LinuxKPI: Add pci_power querying for drm-kmod".
Dec 15 2022, 9:56 AM · Linux Emulation, linuxkpi

Oct 25 2022

jfree updated the diff for D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops.

Add check to make sure ->read() > 0 before copying to sbuf.
Thanks to @bz for pointing this out.

Oct 25 2022, 2:19 AM · linuxkpi
bz added inline comments to D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops.
Oct 25 2022, 12:42 AM · linuxkpi

Oct 24 2022

jfree updated the diff for D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops.

Use copyout() instead of memcpy() for lindebugfs's kernel sb to userspace buf transfer.

Oct 24 2022, 11:40 PM · linuxkpi
bz added inline comments to D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops.
Oct 24 2022, 10:49 PM · linuxkpi
jfree updated the diff for D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops.

Fix typos in linux_simple_attr.c function documentation

Oct 24 2022, 4:57 AM · linuxkpi
jfree added a reviewer for D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops: hselasky.
Oct 24 2022, 4:39 AM · linuxkpi
jfree requested review of D37101: LinuxKPI: pass userspace buffers for lindebugfs r/w fops.
Oct 24 2022, 4:25 AM · linuxkpi

Oct 22 2022

jfree added a comment to D35883: LinuxKPI drm-kmod debugfs support.
In D35883#842153, @bz 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.

Oct 22 2022, 1:42 AM · linuxkpi
bz added a comment to D35883: LinuxKPI drm-kmod debugfs support.
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.

Oct 22 2022, 12:55 AM · linuxkpi
jfree added a comment to D35883: LinuxKPI drm-kmod debugfs support.
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 22 2022, 12:18 AM · linuxkpi

Oct 21 2022

bz added a comment to D35883: LinuxKPI drm-kmod debugfs support.

There's more to fix in this (debugfs) world now it seems beyond the comment. Is anyone still interested please let me know.

Oct 21 2022, 10:06 PM · linuxkpi

Oct 6 2022

manu closed D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Oct 6 2022, 8:18 AM · Linux Emulation, linuxkpi

Oct 2 2022

jfree updated the diff for D36749: LinuxKPI: Add pci_power querying for drm-kmod.

Moved struct dev_pm_info power member to bottom of struct device in <linux/device.h>

Oct 2 2022, 4:19 PM · Linux Emulation, linuxkpi

Oct 1 2022

manu added inline comments to D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Oct 1 2022, 10:56 AM · Linux Emulation, linuxkpi

Sep 27 2022

bz added inline comments to D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Sep 27 2022, 4:41 PM · Linux Emulation, linuxkpi
manu added inline comments to D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Sep 27 2022, 4:01 PM · Linux Emulation, linuxkpi
jfree updated the diff for D36749: LinuxKPI: Add pci_power querying for drm-kmod.

Various changes to pci_power_name() thanks to @hselasky

Sep 27 2022, 3:23 PM · Linux Emulation, linuxkpi
hselasky added inline comments to D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Sep 27 2022, 3:02 PM · Linux Emulation, linuxkpi
hselasky added inline comments to D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Sep 27 2022, 3:01 PM · Linux Emulation, linuxkpi
jfree updated the diff for D36749: LinuxKPI: Add pci_power querying for drm-kmod.
  • Added bound checking to pci_power_name()
  • Made pci_power_names array external
Sep 27 2022, 2:55 PM · Linux Emulation, linuxkpi
hselasky added inline comments to D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Sep 27 2022, 2:11 PM · Linux Emulation, linuxkpi
jfree requested review of D36749: LinuxKPI: Add pci_power querying for drm-kmod.
Sep 27 2022, 2:09 PM · Linux Emulation, linuxkpi

Sep 20 2022

manu closed D35883: LinuxKPI drm-kmod debugfs support.
Sep 20 2022, 6:15 PM · linuxkpi
manu closed D36350: Add strndup_user() to LinuxKPI <linux/string.h>.
Sep 20 2022, 6:15 PM · linuxkpi, Linux Emulation
manu accepted D36350: Add strndup_user() to LinuxKPI <linux/string.h>.
Sep 20 2022, 5:20 PM · linuxkpi, Linux Emulation

Sep 11 2022

grahamperrin added a watcher for linuxkpi: grahamperrin.
Sep 11 2022, 3:31 PM

Sep 2 2022

hselasky accepted D35883: LinuxKPI drm-kmod debugfs support.

Looks good to me. Make sure you bump the FreeBSD version along this commit.

Sep 2 2022, 9:05 AM · linuxkpi
val_packett.cool removed a member for linuxkpi: val_packett.cool.
Sep 2 2022, 12:22 AM

Sep 1 2022

jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.
  • Removed unnecessary code from linux_simple_attr.c
Sep 1 2022, 8:57 PM · linuxkpi
jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.
  • Created default_llseek() function in substitution of macro
  • removed i_size_write() comment
Sep 1 2022, 8:45 PM · linuxkpi

Aug 30 2022

hselasky added inline comments to D35883: LinuxKPI drm-kmod debugfs support.
Aug 30 2022, 7:49 AM · linuxkpi

Aug 29 2022

jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.

Fixed off-by-one error in linux_seq_file.c

Aug 29 2022, 2:36 PM · linuxkpi
jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.

Fixed memory leak where lf was not released due to a potential failed malloc() during read. Thanks to @hselasky for pointing this out.

Aug 29 2022, 2:19 PM · linuxkpi
jfree updated the diff for D36350: Add strndup_user() to LinuxKPI <linux/string.h>.

Used memdup_user_nul() instead of memdup_user() to duplicate memory from userspace. Relevant documentation can be found here:

Aug 29 2022, 1:57 PM · linuxkpi, Linux Emulation
hselasky added inline comments to D35883: LinuxKPI drm-kmod debugfs support.
Aug 29 2022, 12:22 PM · linuxkpi
hselasky added inline comments to D36350: Add strndup_user() to LinuxKPI <linux/string.h>.
Aug 29 2022, 12:18 PM · linuxkpi, Linux Emulation

Aug 28 2022

jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.
  • 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 28 2022, 4:32 AM · linuxkpi
markj accepted D36350: Add strndup_user() to LinuxKPI <linux/string.h>.
Aug 28 2022, 1:13 AM · linuxkpi, Linux Emulation

Aug 27 2022

jfree updated the diff for D36350: Add strndup_user() to LinuxKPI <linux/string.h>.

Removed NULL pointer error checking thanks to @markj. General user pointers are safely checked in memdup_user().

Aug 27 2022, 8:04 PM · linuxkpi, Linux Emulation
markj added inline comments to D36350: Add strndup_user() to LinuxKPI <linux/string.h>.
Aug 27 2022, 5:15 PM · linuxkpi, Linux Emulation
jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.
Aug 27 2022, 12:09 AM · linuxkpi
jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.

Corrected pointer position errors in linux_simple_attr.c thanks to hselasky@

Aug 27 2022, 12:02 AM · linuxkpi

Aug 26 2022

hselasky added inline comments to D35883: LinuxKPI drm-kmod debugfs support.
Aug 26 2022, 10:23 AM · linuxkpi
hselasky accepted D36350: Add strndup_user() to LinuxKPI <linux/string.h>.

Looks good!

Aug 26 2022, 10:19 AM · linuxkpi, Linux Emulation

Aug 25 2022

jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.

Removed return statements from void functions per hselasky's advice

Aug 25 2022, 9:47 PM · linuxkpi
avg resigned from D36350: Add strndup_user() to LinuxKPI <linux/string.h>.
Aug 25 2022, 7:05 PM · linuxkpi, Linux Emulation
jfree updated the diff for D36350: Add strndup_user() to LinuxKPI <linux/string.h>.

Added simple error checking

Aug 25 2022, 5:14 PM · linuxkpi, Linux Emulation
hselasky added inline comments to D35883: LinuxKPI drm-kmod debugfs support.
Aug 25 2022, 4:48 PM · linuxkpi
hselasky accepted D36350: Add strndup_user() to LinuxKPI <linux/string.h>.

Assuming there is no special case for n = 0.

Aug 25 2022, 4:43 PM · linuxkpi, Linux Emulation
jfree requested review of D36350: Add strndup_user() to LinuxKPI <linux/string.h>.
Aug 25 2022, 4:15 PM · linuxkpi, Linux Emulation
jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.

Fixed function parameter list indentation

Aug 25 2022, 4:08 PM · linuxkpi
jfree updated the diff for D35883: LinuxKPI drm-kmod debugfs support.

Updated diff per markj@'s review and comments

Aug 25 2022, 4:00 PM · linuxkpi

Aug 24 2022

markj added inline comments to D35883: LinuxKPI drm-kmod debugfs support.
Aug 24 2022, 4:14 PM · linuxkpi

Aug 22 2022

jfree added a reviewer for D35883: LinuxKPI drm-kmod debugfs support: markj.
Aug 22 2022, 12:10 AM · linuxkpi