Bug 15862 - Devmem allocates more memory than it needs
Summary: Devmem allocates more memory than it needs
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.35.x
Hardware: All Linux
: P5 major
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 20:42 UTC by Mehmet BAL
Modified: 2023-11-20 20:42 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mehmet BAL 2023-11-20 20:42:14 UTC
In devmem program, check line 76.

Width local variable holds length in bit(s). However offset_in_page and page_size local variables holds value in byte(s). When check that read/write address block spans the two pages,  the left and right operands of the greater operator must be in units of bit(s) or byte(s).

"if (offset_in_page + width > page_size)" in devmem program, source code line 76.