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

libs/arch_libc:Add kasan protection for memset and other mm api #14570

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

W-M-R
Copy link
Contributor

@W-M-R W-M-R commented Oct 31, 2024

Summary

  1. libc/machine:Add prefixes to libc functions implemented by arch
    kasan does not instrument the assembly function,
    so it is checked in advance before calling.
    If Kasan is not turned on, the speed and space will
    be almost unchanged under compiler optimization.
  2. libs/machine:strnlen need check return
  3. arch_lib.c: close kasan readcheck no return
  4. libc: Modify the check length

Impact

After enabling archlibc, kasan checks will be performed when calling mm api

Testing

None

anjiahao1 and others added 4 commits October 31, 2024 10:40
kasan does not instrument the assembly function,
so it is checked in advance before calling.
If Kasan is not turned on, the speed and space will
be almost unchanged under compiler optimization.

Signed-off-by: anjiahao <[email protected]>
We should not check the length of both strings at the same time.

Signed-off-by: wangmingrong1 <[email protected]>
@github-actions github-actions bot added Area: OS Components OS Components issues Size: L The size of the change in this PR is large labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OS Components OS Components issues Size: L The size of the change in this PR is large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants