Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-18 Thread Vinod Koul
On Tue, Jun 17, 2014 at 01:48:59PM +0200, Arnd Bergmann wrote: > On Tuesday 17 June 2014, Vinod Koul wrote: > > > Anyway, if you use the __packed attribute, best apply it only to > > > the individual __u64 member(s), not the entire struct, otherwise > > > you might change user space programs in a

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-18 Thread Vinod Koul
On Tue, Jun 17, 2014 at 01:48:59PM +0200, Arnd Bergmann wrote: On Tuesday 17 June 2014, Vinod Koul wrote: Anyway, if you use the __packed attribute, best apply it only to the individual __u64 member(s), not the entire struct, otherwise you might change user space programs in a subtle way

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-17 Thread Arnd Bergmann
On Tuesday 17 June 2014, Vinod Koul wrote: > > Anyway, if you use the __packed attribute, best apply it only to > > the individual __u64 member(s), not the entire struct, otherwise > > you might change user space programs in a subtle way when the alignment > > changes from 4 to 1 byte. > > then

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-17 Thread Arnd Bergmann
On Tuesday 17 June 2014, Vinod Koul wrote: Anyway, if you use the __packed attribute, best apply it only to the individual __u64 member(s), not the entire struct, otherwise you might change user space programs in a subtle way when the alignment changes from 4 to 1 byte. then wouldn't it

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-16 Thread Vinod Koul
On Fri, Jun 13, 2014 at 04:19:32PM +0200, Arnd Bergmann wrote: > On Monday 09 June 2014, Vinod Koul wrote: > > On Mon, Jun 09, 2014 at 09:24:53AM +0200, Takashi Iwai wrote: > > > At Mon, 09 Jun 2014 16:46:32 -0400, > > > Wang, Xiaoming wrote: > > > > > > > > > > > > The size of struct

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-16 Thread Vinod Koul
On Fri, Jun 13, 2014 at 04:19:32PM +0200, Arnd Bergmann wrote: On Monday 09 June 2014, Vinod Koul wrote: On Mon, Jun 09, 2014 at 09:24:53AM +0200, Takashi Iwai wrote: At Mon, 09 Jun 2014 16:46:32 -0400, Wang, Xiaoming wrote: The size of struct snd_compr_avail is 0x1c in

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-13 Thread Arnd Bergmann
On Monday 09 June 2014, Vinod Koul wrote: > On Mon, Jun 09, 2014 at 09:24:53AM +0200, Takashi Iwai wrote: > > At Mon, 09 Jun 2014 16:46:32 -0400, > > Wang, Xiaoming wrote: > > > > > > > > > The size of struct snd_compr_avail is 0x1c in 32bit kernel, > > > while it is 0x20 in 64bit kernel 0x4

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-13 Thread Arnd Bergmann
On Monday 09 June 2014, Vinod Koul wrote: On Mon, Jun 09, 2014 at 09:24:53AM +0200, Takashi Iwai wrote: At Mon, 09 Jun 2014 16:46:32 -0400, Wang, Xiaoming wrote: The size of struct snd_compr_avail is 0x1c in 32bit kernel, while it is 0x20 in 64bit kernel 0x4 bytes added because

RE: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-12 Thread Wang, Xiaoming
Dear Takashi > -Original Message- > From: Koul, Vinod > Sent: Monday, June 09, 2014 11:36 PM > To: Takashi Iwai > Cc: Wang, Xiaoming; Kp, Jeeja; dhowe...@redhat.com; a...@arndb.de; > t...@linutronix.de; mtk.manpa...@gmail.com; > paul...@linux.vnet.ibm.com; da...@redhat.com; >

RE: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-12 Thread Wang, Xiaoming
Dear Takashi -Original Message- From: Koul, Vinod Sent: Monday, June 09, 2014 11:36 PM To: Takashi Iwai Cc: Wang, Xiaoming; Kp, Jeeja; dhowe...@redhat.com; a...@arndb.de; t...@linutronix.de; mtk.manpa...@gmail.com; paul...@linux.vnet.ibm.com; da...@redhat.com;

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-09 Thread Vinod Koul
On Mon, Jun 09, 2014 at 09:24:53AM +0200, Takashi Iwai wrote: > At Mon, 09 Jun 2014 16:46:32 -0400, > Wang, Xiaoming wrote: > > > > > > The size of struct snd_compr_avail is 0x1c in 32bit kernel, > > while it is 0x20 in 64bit kernel 0x4 bytes added because of > > alignment. It is OK when 32bit

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-09 Thread Takashi Iwai
At Mon, 09 Jun 2014 16:46:32 -0400, Wang, Xiaoming wrote: > > > The size of struct snd_compr_avail is 0x1c in 32bit kernel, > while it is 0x20 in 64bit kernel 0x4 bytes added because of > alignment. It is OK when 32bit kernel met 32bit user space. > There exist stack corruption if 64bit kernel

[PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-09 Thread Wang, Xiaoming
The size of struct snd_compr_avail is 0x1c in 32bit kernel, while it is 0x20 in 64bit kernel 0x4 bytes added because of alignment. It is OK when 32bit kernel met 32bit user space. There exist stack corruption if 64bit kernel met 32bit user space, because the size of struct snd_compr_avail is 0x1c

[PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-09 Thread Wang, Xiaoming
The size of struct snd_compr_avail is 0x1c in 32bit kernel, while it is 0x20 in 64bit kernel 0x4 bytes added because of alignment. It is OK when 32bit kernel met 32bit user space. There exist stack corruption if 64bit kernel met 32bit user space, because the size of struct snd_compr_avail is 0x1c

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-09 Thread Takashi Iwai
At Mon, 09 Jun 2014 16:46:32 -0400, Wang, Xiaoming wrote: The size of struct snd_compr_avail is 0x1c in 32bit kernel, while it is 0x20 in 64bit kernel 0x4 bytes added because of alignment. It is OK when 32bit kernel met 32bit user space. There exist stack corruption if 64bit kernel met

Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)

2014-06-09 Thread Vinod Koul
On Mon, Jun 09, 2014 at 09:24:53AM +0200, Takashi Iwai wrote: At Mon, 09 Jun 2014 16:46:32 -0400, Wang, Xiaoming wrote: The size of struct snd_compr_avail is 0x1c in 32bit kernel, while it is 0x20 in 64bit kernel 0x4 bytes added because of alignment. It is OK when 32bit kernel met