Re: [PATCH] PowerPC: kernel: memory access violation when rtas_data_buf contents are more than 1026

2013-04-24 Thread Chen Gang
On 2013年04月24日 15:23, Vasant Hegde wrote: > On 04/24/2013 12:33 PM, Chen Gang wrote: >> On 2013年04月24日 14:28, Vasant Hegde wrote: >>> On 04/23/2013 08:42 AM, Chen Gang wrote: need set '\0' for 'local_buffer'. SPLPAR_MAXLENGTH is 1026, RTAS_DATA_BUF_SIZE is 4096. so the cont

Re: [PATCH] PowerPC: kernel: memory access violation when rtas_data_buf contents are more than 1026

2013-04-24 Thread Vasant Hegde
On 04/24/2013 12:33 PM, Chen Gang wrote: On 2013年04月24日 14:28, Vasant Hegde wrote: On 04/23/2013 08:42 AM, Chen Gang wrote: need set '\0' for 'local_buffer'. SPLPAR_MAXLENGTH is 1026, RTAS_DATA_BUF_SIZE is 4096. so the contents of rtas_data_buf may truncated in memcpy. if contents are really

Re: [PATCH] PowerPC: kernel: memory access violation when rtas_data_buf contents are more than 1026

2013-04-24 Thread Chen Gang
On 2013年04月24日 14:28, Vasant Hegde wrote: > On 04/23/2013 08:42 AM, Chen Gang wrote: >> >> need set '\0' for 'local_buffer'. >> >> SPLPAR_MAXLENGTH is 1026, RTAS_DATA_BUF_SIZE is 4096. so the contents of >> rtas_data_buf may truncated in memcpy. >> >> if contents are really truncated. >>the spl

Re: [PATCH] PowerPC: kernel: memory access violation when rtas_data_buf contents are more than 1026

2013-04-23 Thread Vasant Hegde
On 04/23/2013 08:42 AM, Chen Gang wrote: need set '\0' for 'local_buffer'. SPLPAR_MAXLENGTH is 1026, RTAS_DATA_BUF_SIZE is 4096. so the contents of rtas_data_buf may truncated in memcpy. if contents are really truncated. the splpar_strlen is more than 1026. the next while loop checking will

[PATCH] PowerPC: kernel: memory access violation when rtas_data_buf contents are more than 1026

2013-04-22 Thread Chen Gang
need set '\0' for 'local_buffer'. SPLPAR_MAXLENGTH is 1026, RTAS_DATA_BUF_SIZE is 4096. so the contents of rtas_data_buf may truncated in memcpy. if contents are really truncated. the splpar_strlen is more than 1026. the next while loop checking will not find the end of buffer. that will cau