mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Revert "kasan: print the original fault addr when access invalid shadow"
This reverts commit1684909df3which is commitbabddbfb7dupstream. It just flat out breaks the build for KASAN builds, so revert it. Odd. Fixes:1684909df3("kasan: print the original fault addr when access invalid shadow") Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ida71f61b6ea32f2682091407144032928891c83e
This commit is contained in:
@@ -475,10 +475,10 @@ static inline void kasan_free_module_shadow(const struct vm_struct *vm) {}
|
|||||||
|
|
||||||
#endif /* (CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS) && !CONFIG_KASAN_VMALLOC */
|
#endif /* (CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS) && !CONFIG_KASAN_VMALLOC */
|
||||||
|
|
||||||
#ifdef CONFIG_KASAN
|
#ifdef CONFIG_KASAN_INLINE
|
||||||
void kasan_non_canonical_hook(unsigned long addr);
|
void kasan_non_canonical_hook(unsigned long addr);
|
||||||
#else /* CONFIG_KASAN */
|
#else /* CONFIG_KASAN_INLINE */
|
||||||
static inline void kasan_non_canonical_hook(unsigned long addr) { }
|
static inline void kasan_non_canonical_hook(unsigned long addr) { }
|
||||||
#endif /* CONFIG_KASAN */
|
#endif /* CONFIG_KASAN_INLINE */
|
||||||
|
|
||||||
#endif /* LINUX_KASAN_H */
|
#endif /* LINUX_KASAN_H */
|
||||||
|
|||||||
@@ -560,8 +560,9 @@ void kasan_report_async(void)
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_KASAN_HW_TAGS */
|
#endif /* CONFIG_KASAN_HW_TAGS */
|
||||||
|
|
||||||
|
#ifdef CONFIG_KASAN_INLINE
|
||||||
/*
|
/*
|
||||||
* With CONFIG_KASAN, accesses to bogus pointers (outside the high
|
* With CONFIG_KASAN_INLINE, accesses to bogus pointers (outside the high
|
||||||
* canonical half of the address space) cause out-of-bounds shadow memory reads
|
* canonical half of the address space) cause out-of-bounds shadow memory reads
|
||||||
* before the actual access. For addresses in the low canonical half of the
|
* before the actual access. For addresses in the low canonical half of the
|
||||||
* address space, as well as most non-canonical addresses, that out-of-bounds
|
* address space, as well as most non-canonical addresses, that out-of-bounds
|
||||||
@@ -597,3 +598,4 @@ void kasan_non_canonical_hook(unsigned long addr)
|
|||||||
pr_alert("KASAN: %s in range [0x%016lx-0x%016lx]\n", bug_type,
|
pr_alert("KASAN: %s in range [0x%016lx-0x%016lx]\n", bug_type,
|
||||||
orig_addr, orig_addr + KASAN_GRANULE_SIZE - 1);
|
orig_addr, orig_addr + KASAN_GRANULE_SIZE - 1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user