ANDROID: 16K: Remove unescessary err log in randomize_page()
Since __PAGE_ALIGNED(x) automatically logs any parameter that is not
aligned, in the case of randomize_page() it incorrectly emits an error log.
The check in randomize_page() is to determine whether alignment should
be done on the start addr:
if (!__PAGE_ALIGNED(start)) {
range -= __PAGE_ALIGN(start) - start;
start = __PAGE_ALIGN(start);
}
Use __offset_in_page() instead of !__PAGE_ALIGNED() since this doesn't
emit a log.
Bug: 383389337
Bug: 330751658
Bug: 302403436
Bug: 315325080
Change-Id: I26bfde32bbc9df4c5b6c9ec0cc21b66657ebbb7a
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
This commit is contained in:
committed by
Carlos Llamas
parent
1ae0864980
commit
5e32ba9023
@@ -386,7 +386,7 @@ unsigned long randomize_stack_top(unsigned long stack_top)
|
||||
*/
|
||||
unsigned long randomize_page(unsigned long start, unsigned long range)
|
||||
{
|
||||
if (!__PAGE_ALIGNED(start)) {
|
||||
if (__offset_in_page(start)) {
|
||||
range -= __PAGE_ALIGN(start) - start;
|
||||
start = __PAGE_ALIGN(start);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user