Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(kernel-rolling) Phytium Random Number Generator support #228

Conversation

MingcongBai
Copy link
Contributor

@MingcongBai MingcongBai commented May 28, 2024

Picked and rebased from #149.

From original pull request:

This driver provides kernel-side support for the Random Number Generator hardware found on Phytium SoCs.

Builds tested

  • amd64
  • arm64
  • loong64

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yukarichiba for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • phytium_rng_read函数中,使用readl_poll_timeout可能导致资源泄露,如果readl函数在第一次检查时返回EAGAINEWOULDBLOCK,后续的轮询将不会执行,从而导致超时。
  • phytium_rng_read函数中的max变量应该是size_t类型,以匹配read函数的参数类型。
  • phytium_rng_read函数中缺少对read返回值的检查,可能会导致数据损坏。
  • phytium_rng_cleanup函数中没有对iomem区域进行释放的操作,可能会导致内存泄露。
  • module_param函数的使用应该在模块加载时进行,而不是在__init__函数中。
  • phytium_rng_initphytium_rng_cleanup函数中使用了container_of,但没有对rng结构体的Ptr是否有效进行检查。

是否建议立即修改:

This driver provides kernel-side support for the Random Number
Generator hardware found on Phytium SoCs.

Signed-off-by: xu yan <[email protected]>
Signed-off-by: Zhang Yiqun <[email protected]>
Signed-off-by: Chen Baozi <[email protected]>
Signed-off-by: Wang Yinfeng <[email protected]>
@MingcongBai MingcongBai force-pushed the bai/kernel-rolling/phytium-rng branch from 16a11f9 to b319ebd Compare May 29, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants