* Add CodeQL Workflow for Code Security Analysis Add CodeQL Workflow for Code Security Analysis This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats. We added a new CodeQL workflow file (.github/workflows/codeql.yml) that - Runs on every push and pull request to the main branch. - Excludes queries with a high false positive rate or low-severity findings. - Does not display results for third-party code, focusing only on our own codebase. Testing: To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code. Deployment: Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps: 1. Under the repository name, click on the Security tab. 2. In the left sidebar, click Code scanning alerts. Additional Information: - You can further customize the workflow to adapt to your specific needs by modifying the workflow file. - For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation. Signed-off-by: Brian <bayuan@purdue.edu> * Add CodeQL Workflow for Code Security Analysis Add CodeQL Workflow for Code Security Analysis This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats. We added a new CodeQL workflow file (.github/workflows/codeql.yml) that - Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience). - Runs daily. - Excludes queries with a high false positive rate or low-severity findings. - Does not display results for git submodules, focusing only on our own codebase. Testing: To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code. Deployment: Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps: 1. Under the repository name, click on the Security tab. 2. In the left sidebar, click Code scanning alerts. Additional Information: - You can further customize the workflow to adapt to your specific needs by modifying the workflow file. - For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/). Signed-off-by: Brian <bayuan@purdue.edu> * Add CodeQL Workflow for Code Security Analysis Add CodeQL Workflow for Code Security Analysis This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats. We added a new CodeQL workflow file (.github/workflows/codeql.yml) that - Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience). - Runs daily. - Excludes queries with a high false positive rate or low-severity findings. - Does not display results for git submodules, focusing only on our own codebase. Testing: To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code. Deployment: Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps: 1. Under the repository name, click on the Security tab. 2. In the left sidebar, click Code scanning alerts. Additional Information: - You can further customize the workflow to adapt to your specific needs by modifying the workflow file. - For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/). Signed-off-by: Brian <bayuan@purdue.edu> * Add CodeQL Workflow for Code Security Analysis Add CodeQL Workflow for Code Security Analysis This pull request introduces a CodeQL workflow to enhance the security analysis of our repository. CodeQL is a powerful static analysis tool that helps identify and mitigate security vulnerabilities in our codebase. By integrating this workflow into our GitHub Actions, we can proactively identify and address potential issues before they become security threats. We added a new CodeQL workflow file (.github/workflows/codeql.yml) that - Runs on every pull request (functionality to run on every push to main branches is included as a comment for convenience). - Runs daily. - Excludes queries with a high false positive rate or low-severity findings. - Does not display results for git submodules, focusing only on our own codebase. Testing: To validate the functionality of this workflow, we have run several test scans on the codebase and reviewed the results. The workflow successfully compiles the project, identifies issues, and provides actionable insights while reducing noise by excluding certain queries and third-party code. Deployment: Once this pull request is merged, the CodeQL workflow will be active and automatically run on every push and pull request to the main branch. To view the results of these code scans, please follow these steps: 1. Under the repository name, click on the Security tab. 2. In the left sidebar, click Code scanning alerts. Additional Information: - You can further customize the workflow to adapt to your specific needs by modifying the workflow file. - For more information on CodeQL and how to interpret its results, refer to the GitHub documentation and the CodeQL documentation (https://codeql.github.com/ and https://codeql.github.com/docs/). Signed-off-by: Brian <bayuan@purdue.edu> --------- Signed-off-by: Brian <bayuan@purdue.edu> |
||
|---|---|---|
| .github/workflows | ||
| contrib | ||
| .gitignore | ||
| libudev.pc.in | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| udev.c | ||
| udev.h | ||
| udev_device.c | ||
| udev_enumerate.c | ||
| udev_list.c | ||
| udev_list.h | ||
| udev_monitor.c | ||
libudev-zero
Drop-in replacement for libudev intended to work with any device manager
Why?
We all know that systemd is very hostile towards portability. udev inherited the same problem by exposing a very badly designed library interface. This dramatically reduces portability, user choice and basically creates vendor lock-in because the library interface highly tied to the udev daemon.
Another udev problem is the non-portable home-grown language called "udev rules". The udev authors definitely don't know(or care) why it's better to avoid reinventing the wheel. Strictly speaking, I think they did that on purpose to overcomplicate udev as much as possible. Why? So that only the authors(RedHat/IBM) can rule and dictate the future of udev. The recent eudev death only proves that it's really hard to support such unmaintainable mess.
The udev hwdb is yet another illustration of a systemd-like approach. What the hell does "userspace /dev" have to do with parsing hardware database(pci.ids, usb.ids) and setting/remapping buttons? udev smells like systemd by trying to implement all possible functionality in the single daemon/code base. Programs that follow the UNIX philosophy is much better suited for such purposes.
Pros/Cons
Keep in mind that libudev-zero isn't ideal. Here are some pros/cons:
Pros
- Very portable. Doesn't depend on GNU features.
- No lock-in. Any device manager can be used, even smdev and CONFIG_UEVENT_HELPER.
- Source code is much cleaner than udev because of less abstractions and clever code.
Cons
- Udev rules must be converted to shell script in order to work with any device manager.
- Udev hwdb interface isn't implemented. pciutils and usbutils will not display any meaningful info.
- Many functions and interfaces still aren't implemented, which may lead to breakage in some programs.
What doesn't work
- dosfstools - requires udev_enumerate_add_match_parent()
- PulseAudio - highly depends on udev internal properties. workaround
- udisks2 - highly depends on udev internal properties
- android-tools - requires udev rules for non-root usage
- NetworkManager - needs investigation
- libgudev - needs investigation
- PipeWire - depends on udev internal properties. patch
- ldm - depends on udev internal properties
- lvm2 - uses deprecated
udev_queueAPI - cups - needs investigation
- ???
Dependencies
- C99 compiler (build time)
- POSIX make (build time)
- POSIX & XSI libc
- Linux >= 2.6.39
Installation
make
make PREFIX=/usr install
Hotplugging
Note that hotplugging support is fully optional. You can skip this step if you don't have a need for the hotplugging capability.
If you're using an mdev-like device manager, refer to mdev.conf for a config example.
If you're using another device manager, you need to configure it to rebroadcast kernel uevents. You can do this by either patching(see below) the device manager or simply executing helper.c for each uevent.
If you're developing your own device manager, you need to rebroadcast kernel
uevents to the 0x4 netlink group of NETLINK_KOBJECT_UEVENT. This is required
because libudev-zero can't simply listen to kernel uevents due to potential
race conditions. Refer to (but don't copy blindly) helper.c
for an example of how it could be implemented in C.
Don't hesitate to ask me about anything you don't understand. I'm usually hanging around in #kisslinux at libera.chat, but you can also email me or open an issue here.
Future directions
- Write a better cross-platform(*nix, maybe macos and windows) device enumeration library.
- Convince mainstream apps(libinput, wlroots, ...) to use a new library instead of libudev.
- Declare libudev as obsolete library and archive this project.
Donate
You can send a donation to BTC: 1BwrcsgtWZeLVvNeEQSg4A28a3yrGN3FpK
Thank you very much!