Re: [PATCH 09/10] lscpu: blacklist vmware_bdoor() AddressSanitizer check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30 November 2014 at 16:34, Benno Schulenberg <bensberg@xxxxxxxxxxxxx> wrote:
> On Sun, Nov 30, 2014, at 14:57, Sami Kerola wrote:
>> AddressSanitizer is identifying the __asm__ segment as suspicious.
>
> Hmm...  How come that it doesn't flag the very similar segment in
> static inline void cpuid(...) as suspicious?  Is it the 'inl' command?
> (What does this do anyway?  It isn't an x86 assembly that I can find.)

I don't understand assembly enough to tell why that worked but not this.

>> -static inline
>> +static inline UL_ASAN_BLACKLIST
>>  void vmware_bdoor(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
>
> While here, maybe move the 'void' to the previous line?

I can do that.

Unless more radical approach is considered correct. The vmware_bdoor() came from

commit  b7744730f6e4b5b91c9846f3e7c58aaa7423a167

and the code looks remarkably similar as

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/cpu/vmware.c#n30

The kernel code is setting in vmware_platform() hyper_vendor_id that
lscpu consumes with read_hypervisor_cpuid(). Perhaps the
vmware_bdoor() can be removed.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux