Re: Question about memcpy

2018-07-10 Thread valdis . kletnieks
On Tue, 10 Jul 2018 22:51:34 +0800, bing zhu said: > Thank you ,I use this func for both kernel and user ,result are same. > void *memcpy(void *dest, const void *src, size_t n) > { Might want to use 'void *my_memcpy(..)' instead, just in case the build environment plays #define games with you

Re: Question about memcpy

2018-07-10 Thread Greg KH
On Tue, Jul 10, 2018 at 10:51:34PM +0800, bing zhu wrote: > Thank you ,I use this func for both kernel and user ,result are same. > void *memcpy(void *dest, const void *src, size_t n) > { > long d0, d1, d2; > asm volatile( > "rep ; movsq\n\t" > "movq %4,%%rcx\n\t" > "rep ; movsb\n\t" > : "=" (d0),

Re: Question about memcpy

2018-07-10 Thread bing zhu
Thank you ,I use this func for both kernel and user ,result are same. void *memcpy(void *dest, const void *src, size_t n) { long d0, d1, d2; asm volatile( "rep ; movsq\n\t" "movq %4,%%rcx\n\t" "rep ; movsb\n\t" : "=" (d0), "=" (d1), "=" (d2) : "0" (n >> 3), "g" (n & 7), "1" (dest), "2" (src) :

Re: [linux-3.12.19] - kernel panic observed

2018-07-10 Thread valdis . kletnieks
ext-20180710 64362 files changed, 12400150 insertions(+), 4758460 deletions(-) If finding the fix in all that is too difficult for you, complain to the vendor who you're paying to support that kernel. pgpRxIfk7ww_O.pgp Description: PGP signat

Re: [linux-3.12.19] - kernel panic observed

2018-07-10 Thread ozgur
  10.07.2018, 10:39, "Sriram" :Hi,  Hello, I m working on linux-3.12.19 kernel. In our board, we have an IPsec tunnel which carries IPv6 traffic inside  whoops! you are working with a very old and unsupported kernel version. please you are sure that your payload packages are not a larger then 512

Re: [linux-3.12.19] - kernel panic observed

2018-07-10 Thread Greg KH
On Tue, Jul 10, 2018 at 12:08:25PM +0530, Sriram wrote: > Hi, > > I m working on linux-3.12.19 kernel. Wow that is old. And unsupported and obsolete and very very very insecure. Please work on updating to a newer kernel version that the community can help you out with (like 4.14 or 4.17). If

[linux-3.12.19] - kernel panic observed

2018-07-10 Thread Sriram
Hi, I m working on linux-3.12.19 kernel. In our board, we have an IPsec tunnel which carries IPv6 traffic inside Packet structure looks like below, IPv4(OuterIP) || ESP || IPv6(Inner IP) || IPv6 Frag HDR || UDP || Payload. I have written an application which constructs Inner IPv6 packets and

Re: Question about memcpy

2018-07-10 Thread Greg KH
On Tue, Jul 10, 2018 at 12:50:21PM +0800, bing zhu wrote: > I agree !,just i think the problem is still there,memcpy is indeed faster in > kernel than in user,i've tried both ways . Make sure you are actually using the same code for memcpy in both places. Do not rely on your libc or the kernel