Re: [PATCH] MIPS: Avoid to cause watchpoint exception in kernel mode

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

 



On Fri, Mar 30, 2018 at 05:17:21PM +0800, r@xxxxxx wrote:
> From: Heiher <r@xxxxxx>
> 
> The following program cause an endless loop in kernel space:
> 
> 	#include <stdio.h>
> 	#include <unistd.h>
> 	#include <signal.h>
> 
> 	int
> 	main (int argc, char *argv[])
> 	{
> 		char buf[16];
> 
> 		printf ("%p\n", buf);
> 		raise (SIGINT);
> 
> 		write (1, buf, 16);
> 
> 		return 0;
> 	}
> 
> 	# gcc -O0 -o t t.c
> 	# gdb ./t
> 	(gdb) r
> 	(gdb) watch *<printed buf address>
> 	(gdb) c

Please add more explanation so that a future reader can see what the
problem was and how you fixed it.

Thanks
James

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux