Powered by Linux
Re: [PATCH] Quick trial on tracing host inputs — Semantic Matching Tool

Re: [PATCH] Quick trial on tracing host inputs

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

 



On Tue, Mar 08, 2022 at 02:34:16PM +0300, Dan Carpenter wrote:
> void cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx,
>            unsigned int *ecx, unsigned int *edx);
> 
> unsigned int a, b, c, d e;
> unsigned int test(void)
> {
> 	cpuid(0, &a, &b, &c, &d);
> 	__smatch_states("host");
> 	return a;
> }
> 
> unsigned int test2(void)
> {
> 	unsigned int x = test();
> 	__smatch_states("host");
> }

I had to hack it a bit to get it to compile but my test seems to work.
"x" is correctl marked as host data correctly in test2().

regards,
dan carpenter




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux