mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar: "A handful of fixes: a kexec linking fix, an AMD MWAITX fix, a vmware guest support fix when built under Clang, and new CPU model number definitions" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Add Comet Lake to the Intel CPU models header lib/string: Make memzero_explicit() inline instead of external x86/cpu/vmware: Use the full form of INL in VMWARE_PORT x86/asm: Fix MWAITX C-state hint value
This commit is contained in:
commit
fcb45a2848
6 changed files with 27 additions and 26 deletions
|
|
@ -227,7 +227,26 @@ static inline bool strstarts(const char *str, const char *prefix)
|
|||
}
|
||||
|
||||
size_t memweight(const void *ptr, size_t bytes);
|
||||
void memzero_explicit(void *s, size_t count);
|
||||
|
||||
/**
|
||||
* memzero_explicit - Fill a region of memory (e.g. sensitive
|
||||
* keying data) with 0s.
|
||||
* @s: Pointer to the start of the area.
|
||||
* @count: The size of the area.
|
||||
*
|
||||
* Note: usually using memset() is just fine (!), but in cases
|
||||
* where clearing out _local_ data at the end of a scope is
|
||||
* necessary, memzero_explicit() should be used instead in
|
||||
* order to prevent the compiler from optimising away zeroing.
|
||||
*
|
||||
* memzero_explicit() doesn't need an arch-specific version as
|
||||
* it just invokes the one of memset() implicitly.
|
||||
*/
|
||||
static inline void memzero_explicit(void *s, size_t count)
|
||||
{
|
||||
memset(s, 0, count);
|
||||
barrier_data(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* kbasename - return the last part of a pathname.
|
||||
|
|
|
|||
Loading…
Reference in a new issue