| ub: libCDMA: add libcdma doc document description driver inclusion category: feature bugzilla: https://gitee.com/openeuler/cdma/issues/ID41DN CVE: NA ----------------------------------------------------------- add libcdma doc document description Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> Signed-off-by: Sunyi Nan <nansunyi@huawei.com> | 11 months ago |
| ub: libcdma: fix some code errors detected by AI in the kernel cdma driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- The code in kernel cdma was reviewed using the AI model, and some errors related to code spelling and formatting standards were identified and fixed. The specific issues include: Spelling errors: 5 instances (pointe→pointer, operaion→operation, immeditate→immediate, time out→timeout, refcout→refcount) Grammar errors: 6 instances (is not exist→does not exist, release→released, will be change→immediate, will be change→will be changed) Formatting: 1 instances Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: cdma: header file code synchronization driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Synchronization of the cdma_abi.h header file code. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: libcdma: add version and fix some format driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/cdma/issues/IDBKA5 CVE: NA ----------------------------------------------------------- add version and fix some format Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 10 months ago |
| add CODEOWNERS to require maintainers to review API changes Signed-off-by: NiuTao <niutao2@huawei.com> | 2 months ago |
| add LICENSE. Signed-off-by: Zhipeng-Lu <luzhipeng8@h-partners.com> | 1 year ago |
| ub: libcdma: improve README documentation driver inclusion category: feature bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- Rewrite README with industry-standard structure, add repository relationship section, and improve directory structure documentation. Signed-off-by: Jinjie Cui <cuijinjie1@huawei.com> | 5 months ago |
| ub: cdma: disable fence flag in common WR to match chip constraint driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- The chip constraint requires that when exp_mode is continue, the JFS applies only to SQE-unrelated queue scenarios where WQEs must not carry SO/Fence flags. Disable fence in cdma_fill_comm_wr() to ensure SQEs have no ordering dependencies. Signed-off-by: yuanlin119 <yuanlin43@huawei.com> | 1 month ago |
| ub: libcdma: fix some code errors detected by AI in the kernel cdma driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- The code in kernel cdma was reviewed using the AI model, and some errors related to code spelling and formatting standards were identified and fixed. The specific issues include: Spelling errors: 5 instances (pointe→pointer, operaion→operation, immeditate→immediate, time out→timeout, refcout→refcount) Grammar errors: 6 instances (is not exist→does not exist, release→released, will be change→immediate, will be change→will be changed) Formatting: 1 instances Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: libcdma: Code log specifications driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- Logs are standardized according to the requirements of the log specification Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: cdma: fix code defects from AI review driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Fix 7 code defects and clean up NOP opcode identified by AI review: - Zero-initialize cdma_cmd_register_seg_args and cdma_cmd_unregister_seg_args to prevent uninitialized stack data leaking to kernel via ioctl. - Remove dead NOP opcode from WR enum, opcode parsing, SQE filling, and WQEBB counting to eliminate unreachable code. - Add sva and len validation for notify_seg in dma_write_with_notify to prevent invalid SQE data from being submitted to hardware. - Fix poll fd.revents comparison from equality (==) to bitwise AND (&) for POLLIN and POLLERR to correctly detect combined event flags. - Add O_CLOEXEC flag to cdma character device open() to prevent file descriptor leak across fork and exec. - Fix cdma_to_device_barrier() memory barrier from dsb ld to dsb st to ensure prior store operations (WQE/CQE memcpy to queue buffer) are visible to device before doorbell write. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: cdma: use ST64B for direct SQE (DWQE) write in userspace path driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Adapt the CDMA userspace library to the same ST64B constraint. The current cdma_write_dsqe uses mmio_memcpy_x64 (NEON) which does not guarantee atomicity. Mirror the udma userspace implementation: add st64b() inline-asm and branch on a runtime st64b_en flag obtained from the kernel via create-context ioctl, falling back to mmio_memcpy_x64. The st64b_en flag is passed through the existing rsv_bitmap + rsvd reserved fields of cdma_create_context_args.out (carve u8 st64b_en out of rsvd[4] -> rsvd[3], struct size unchanged), ensuring ABI compat across all new/old kernel/userspace combinations: - cdma_abi.h (kernel uapi + userspace copy): add st64b_en field and CDMA_CTX_RSP_ST64B_EN bitmap bit - cdma_ioctl.c: fill st64b_en and set rsv_bitmap in context response - cdma_u_common.h: add bool st64b_en to cdma_u_context - cdma_u_context.c: initialize st64b_en from ioctl response - cdma_u_jfs.c: add cdma_st64b() helper, rewrite cdma_write_dsqe to take cdma_u_context and branch on st64b_en Signed-off-by: yuanlin119 <yuanlin43@huawei.com> | 2 months ago |
| ub: libcdma: fix some code errors detected by AI in the kernel cdma driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- The code in kernel cdma was reviewed using the AI model, and some errors related to code spelling and formatting standards were identified and fixed. The specific issues include: Spelling errors: 5 instances (pointe→pointer, operaion→operation, immeditate→immediate, time out→timeout, refcout→refcount) Grammar errors: 6 instances (is not exist→does not exist, release→released, will be change→immediate, will be change→will be changed) Formatting: 1 instances Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: libcdma: Code log specifications driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- Logs are standardized according to the requirements of the log specification Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: libCDMA: Create and delete JFC driver inclusion category: feature bugzilla: https://gitee.com/openeuler/cdma/issues/ID41DN CVE: NA ----------------------------------------------------------- Supports creating a JFC(jetty for completion), configuring the JFC context, and allocating the CQE(Completion Queue Entry) required by the JFC; as well as deleting a JFC, modifying the JFC context, and releasing the CQE required by the JFC. Signed-off-by: liujiangqi <liujiangqi1@huawei.com> | 1 year ago |
| ub: cdma: fix code defects from AI review driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Fix 7 code defects and clean up NOP opcode identified by AI review: - Zero-initialize cdma_cmd_register_seg_args and cdma_cmd_unregister_seg_args to prevent uninitialized stack data leaking to kernel via ioctl. - Remove dead NOP opcode from WR enum, opcode parsing, SQE filling, and WQEBB counting to eliminate unreachable code. - Add sva and len validation for notify_seg in dma_write_with_notify to prevent invalid SQE data from being submitted to hardware. - Fix poll fd.revents comparison from equality (==) to bitwise AND (&) for POLLIN and POLLERR to correctly detect combined event flags. - Add O_CLOEXEC flag to cdma character device open() to prevent file descriptor leak across fork and exec. - Fix cdma_to_device_barrier() memory barrier from dsb ld to dsb st to ensure prior store operations (WQE/CQE memcpy to queue buffer) are visible to device before doorbell write. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: libcdma: fix some code errors detected by AI in the kernel cdma driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- The code in kernel cdma was reviewed using the AI model, and some errors related to code spelling and formatting standards were identified and fixed. The specific issues include: Spelling errors: 5 instances (pointe→pointer, operaion→operation, immeditate→immediate, time out→timeout, refcout→refcount) Grammar errors: 6 instances (is not exist→does not exist, release→released, will be change→immediate, will be change→will be changed) Formatting: 1 instances Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: cdma: ratelimit hot-path error logs in kernel driver driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Several error logs in the cdma kernel driver have been observed to flood dmesg under real test conditions: ·cdma_parse_cqe_for_jfc (cdma_jfc.c) prints dev_warn on every abnormal CQE status. It runs inside the per-CQE loop of cdma_poll_jfc, so a sustained CQE error storm (link anomaly, hardware fault) floods the log at the poll rate. ·dma_poll_queue (cdma_api.c) prints dev_err whenever a polled CR has a non-SUCCESS status. dma_poll_queue is the high-frequency poll entry point, so a persistent transfer error prints one line per poll. ·cdma_jfce_wait / cdma_get_async_event (cdma_event.c) print pr_err on wait_event failure. When the device is in an error state the wait returns immediately and the caller loops, flooding the log. Replace these dev_err/dev_warn/pr_err with the _ratelimited variants, preserving log level and format. Only the branches confirmed to flood in testing are changed; the rest of the driver's error logs are left unchanged. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: libcdma: fix some code errors detected by AI in the kernel cdma driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- The code in kernel cdma was reviewed using the AI model, and some errors related to code spelling and formatting standards were identified and fixed. The specific issues include: Spelling errors: 5 instances (pointe→pointer, operaion→operation, immeditate→immediate, time out→timeout, refcout→refcount) Grammar errors: 6 instances (is not exist→does not exist, release→released, will be change→immediate, will be change→will be changed) Formatting: 1 instances Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: cdma: ratelimit hot-path error logs in kernel driver driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Several error logs in the cdma kernel driver have been observed to flood dmesg under real test conditions: ·cdma_parse_cqe_for_jfc (cdma_jfc.c) prints dev_warn on every abnormal CQE status. It runs inside the per-CQE loop of cdma_poll_jfc, so a sustained CQE error storm (link anomaly, hardware fault) floods the log at the poll rate. ·dma_poll_queue (cdma_api.c) prints dev_err whenever a polled CR has a non-SUCCESS status. dma_poll_queue is the high-frequency poll entry point, so a persistent transfer error prints one line per poll. ·cdma_jfce_wait / cdma_get_async_event (cdma_event.c) print pr_err on wait_event failure. When the device is in an error state the wait returns immediately and the caller loops, flooding the log. Replace these dev_err/dev_warn/pr_err with the _ratelimited variants, preserving log level and format. Only the branches confirmed to flood in testing are changed; the rest of the driver's error logs are left unchanged. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: libCDMA: Process and report of asynchronous events driver inclusion category: feature bugzilla: https://gitee.com/openeuler/cdma/issues/ID41DN CVE: NA ----------------------------------------------------------- Supports applications in retrieving the CQE(Completion Queue Entry) of a specified queue via the poll mechanism, parsing the execution results of the CQE, as well as obtaining AEQEs(async event queue entity) of a specified AE(async event) type through the wait mechanism and waking up the corresponding user thread upon receiving the target AEQE(async event queue entity). Signed-off-by: liujiangqi <liujiangqi1@huawei.com> | 1 year ago |
| ub: cdma: fix code defects from AI review driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Fix 7 code defects and clean up NOP opcode identified by AI review: - Zero-initialize cdma_cmd_register_seg_args and cdma_cmd_unregister_seg_args to prevent uninitialized stack data leaking to kernel via ioctl. - Remove dead NOP opcode from WR enum, opcode parsing, SQE filling, and WQEBB counting to eliminate unreachable code. - Add sva and len validation for notify_seg in dma_write_with_notify to prevent invalid SQE data from being submitted to hardware. - Fix poll fd.revents comparison from equality (==) to bitwise AND (&) for POLLIN and POLLERR to correctly detect combined event flags. - Add O_CLOEXEC flag to cdma character device open() to prevent file descriptor leak across fork and exec. - Fix cdma_to_device_barrier() memory barrier from dsb ld to dsb st to ensure prior store operations (WQE/CQE memcpy to queue buffer) are visible to device before doorbell write. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: cdma: fix code defects from AI review driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Fix 7 code defects and clean up NOP opcode identified by AI review: - Zero-initialize cdma_cmd_register_seg_args and cdma_cmd_unregister_seg_args to prevent uninitialized stack data leaking to kernel via ioctl. - Remove dead NOP opcode from WR enum, opcode parsing, SQE filling, and WQEBB counting to eliminate unreachable code. - Add sva and len validation for notify_seg in dma_write_with_notify to prevent invalid SQE data from being submitted to hardware. - Fix poll fd.revents comparison from equality (==) to bitwise AND (&) for POLLIN and POLLERR to correctly detect combined event flags. - Add O_CLOEXEC flag to cdma character device open() to prevent file descriptor leak across fork and exec. - Fix cdma_to_device_barrier() memory barrier from dsb ld to dsb st to ensure prior store operations (WQE/CQE memcpy to queue buffer) are visible to device before doorbell write. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: cdma: fix code defects from AI review driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Fix 7 code defects and clean up NOP opcode identified by AI review: - Zero-initialize cdma_cmd_register_seg_args and cdma_cmd_unregister_seg_args to prevent uninitialized stack data leaking to kernel via ioctl. - Remove dead NOP opcode from WR enum, opcode parsing, SQE filling, and WQEBB counting to eliminate unreachable code. - Add sva and len validation for notify_seg in dma_write_with_notify to prevent invalid SQE data from being submitted to hardware. - Fix poll fd.revents comparison from equality (==) to bitwise AND (&) for POLLIN and POLLERR to correctly detect combined event flags. - Add O_CLOEXEC flag to cdma character device open() to prevent file descriptor leak across fork and exec. - Fix cdma_to_device_barrier() memory barrier from dsb ld to dsb st to ensure prior store operations (WQE/CQE memcpy to queue buffer) are visible to device before doorbell write. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: cdma: ratelimit hot-path error logs in kernel driver driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Several error logs in the cdma kernel driver have been observed to flood dmesg under real test conditions: ·cdma_parse_cqe_for_jfc (cdma_jfc.c) prints dev_warn on every abnormal CQE status. It runs inside the per-CQE loop of cdma_poll_jfc, so a sustained CQE error storm (link anomaly, hardware fault) floods the log at the poll rate. ·dma_poll_queue (cdma_api.c) prints dev_err whenever a polled CR has a non-SUCCESS status. dma_poll_queue is the high-frequency poll entry point, so a persistent transfer error prints one line per poll. ·cdma_jfce_wait / cdma_get_async_event (cdma_event.c) print pr_err on wait_event failure. When the device is in an error state the wait returns immediately and the caller loops, flooding the log. Replace these dev_err/dev_warn/pr_err with the _ratelimited variants, preserving log level and format. Only the branches confirmed to flood in testing are changed; the rest of the driver's error logs are left unchanged. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: cdma: ratelimit hot-path error logs in kernel driver driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Several error logs in the cdma kernel driver have been observed to flood dmesg under real test conditions: ·cdma_parse_cqe_for_jfc (cdma_jfc.c) prints dev_warn on every abnormal CQE status. It runs inside the per-CQE loop of cdma_poll_jfc, so a sustained CQE error storm (link anomaly, hardware fault) floods the log at the poll rate. ·dma_poll_queue (cdma_api.c) prints dev_err whenever a polled CR has a non-SUCCESS status. dma_poll_queue is the high-frequency poll entry point, so a persistent transfer error prints one line per poll. ·cdma_jfce_wait / cdma_get_async_event (cdma_event.c) print pr_err on wait_event failure. When the device is in an error state the wait returns immediately and the caller loops, flooding the log. Replace these dev_err/dev_warn/pr_err with the _ratelimited variants, preserving log level and format. Only the branches confirmed to flood in testing are changed; the rest of the driver's error logs are left unchanged. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: libcdma: Code log specifications driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- Logs are standardized according to the requirements of the log specification Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: libcdma: fix some code errors detected by AI in the kernel cdma driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- The code in kernel cdma was reviewed using the AI model, and some errors related to code spelling and formatting standards were identified and fixed. The specific issues include: Spelling errors: 5 instances (pointe→pointer, operaion→operation, immeditate→immediate, time out→timeout, refcout→refcount) Grammar errors: 6 instances (is not exist→does not exist, release→released, will be change→immediate, will be change→will be changed) Formatting: 1 instances Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: cdma: fix code defects from AI review driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Fix 7 code defects and clean up NOP opcode identified by AI review: - Zero-initialize cdma_cmd_register_seg_args and cdma_cmd_unregister_seg_args to prevent uninitialized stack data leaking to kernel via ioctl. - Remove dead NOP opcode from WR enum, opcode parsing, SQE filling, and WQEBB counting to eliminate unreachable code. - Add sva and len validation for notify_seg in dma_write_with_notify to prevent invalid SQE data from being submitted to hardware. - Fix poll fd.revents comparison from equality (==) to bitwise AND (&) for POLLIN and POLLERR to correctly detect combined event flags. - Add O_CLOEXEC flag to cdma character device open() to prevent file descriptor leak across fork and exec. - Fix cdma_to_device_barrier() memory barrier from dsb ld to dsb st to ensure prior store operations (WQE/CQE memcpy to queue buffer) are visible to device before doorbell write. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |
| ub: libcdma: fix some code errors detected by AI in the kernel cdma driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- The code in kernel cdma was reviewed using the AI model, and some errors related to code spelling and formatting standards were identified and fixed. The specific issues include: Spelling errors: 5 instances (pointe→pointer, operaion→operation, immeditate→immediate, time out→timeout, refcout→refcount) Grammar errors: 6 instances (is not exist→does not exist, release→released, will be change→immediate, will be change→will be changed) Formatting: 1 instances Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: libcdma: Code log specifications driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/cdma/issues/8 CVE: NA ----------------------------------------------------------- Logs are standardized according to the requirements of the log specification Signed-off-by: Zhipeng Lu <luzhipeng8@h-partners.com> | 5 months ago |
| ub: libCDMA: Create and delete CTP driver inclusion category: feature bugzilla: https://gitee.com/openeuler/cdma/issues/ID41DN CVE: NA ----------------------------------------------------------- Supports creating a CDMA CTP(Compress Transport) communication connection, returning the VTP(virtual transport), and deleting the specified CTP communication connection. Signed-off-by: liujiangqi <liujiangqi1@huawei.com> | 1 year ago |
| ub: cdma: fix code defects from AI review driver inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/libcdma/issues/11 CVE: NA ----------------------------------------------------------- Fix 7 code defects and clean up NOP opcode identified by AI review: - Zero-initialize cdma_cmd_register_seg_args and cdma_cmd_unregister_seg_args to prevent uninitialized stack data leaking to kernel via ioctl. - Remove dead NOP opcode from WR enum, opcode parsing, SQE filling, and WQEBB counting to eliminate unreachable code. - Add sva and len validation for notify_seg in dma_write_with_notify to prevent invalid SQE data from being submitted to hardware. - Fix poll fd.revents comparison from equality (==) to bitwise AND (&) for POLLIN and POLLERR to correctly detect combined event flags. - Add O_CLOEXEC flag to cdma character device open() to prevent file descriptor leak across fork and exec. - Fix cdma_to_device_barrier() memory barrier from dsb ld to dsb st to ensure prior store operations (WQE/CQE memcpy to queue buffer) are visible to device before doorbell write. Signed-off-by: zhangyao <zhangyao133@huawei.com> | 10 days ago |