* drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
@ 2016-02-27 23:15 kbuild test robot
2016-02-28 9:03 ` Michael S. Tsirkin
2016-03-06 8:37 ` Michael S. Tsirkin
0 siblings, 2 replies; 8+ messages in thread
From: kbuild test robot @ 2016-02-27 23:15 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
date: 1 year, 2 months ago
config: openrisc-allmodconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
# save the attached .config to linux build tree
make.cross ARCH=openrisc
All errors (new ones prefixed by >>):
drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
>> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
713 r = -EFAULT;
714 break;
715 }
716
717 /* Make sure it's safe to cast pointers to vring types. */
> 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 32019 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
2016-02-27 23:15 drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE kbuild test robot
@ 2016-02-28 9:03 ` Michael S. Tsirkin
2016-03-06 8:37 ` Michael S. Tsirkin
1 sibling, 0 replies; 8+ messages in thread
From: Michael S. Tsirkin @ 2016-02-28 9:03 UTC (permalink / raw)
To: kbuild test robot; +Cc: kbuild-all, linux-kernel, linux, jonas
On Sun, Feb 28, 2016 at 07:15:14AM +0800, kbuild test robot wrote:
> Hi Michael,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
> commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
> date: 1 year, 2 months ago
> config: openrisc-allmodconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
> # save the attached .config to linux build tree
> make.cross ARCH=openrisc
>
> All errors (new ones prefixed by >>):
>
> drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
> >> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
>
> vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
>
> 712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
> 713 r = -EFAULT;
> 714 break;
> 715 }
> 716
> 717 /* Make sure it's safe to cast pointers to vring types. */
> > 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
> 719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
> 720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
> 721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
I still think it's a bug in the openrisc compiler used.
struct vring_avail {
unsigned short flags;
unsigned short idx;
};
struct vring_avail *x;
int main(int argc, char **argv)
{
footest();
if (__alignof__(*x) == 1)
foo1();
else if (__alignof__(*x) == 2)
foo2();
else if (__alignof__(*x) == 4)
foo4();
else if (__alignof__(*x) == 8)
foo8();
else
fooother();
return 0;
}
when compiled with the openrisc compiler from kernel.org this calls foo4
and it really should call foo2, since the openrisc manual says:
16.1.2
Aggregates and Unions
Aggregates (structures and arrays) and unions assume the alignment of
their most
strictly aligned element.
and alignment for unsigned short is 2.
--
MST
^ permalink raw reply [flat|nested] 8+ messages in thread
* drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
@ 2016-03-06 3:35 kbuild test robot
0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2016-03-06 3:35 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 67944024c1cdd897e49a09b0d6af3ea38d1388ca
commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
date: 1 year, 2 months ago
config: openrisc-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
# save the attached .config to linux build tree
make.cross ARCH=openrisc
All errors (new ones prefixed by >>):
drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
>> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
713 r = -EFAULT;
714 break;
715 }
716
717 /* Make sure it's safe to cast pointers to vring types. */
> 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 32364 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
2016-02-27 23:15 drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE kbuild test robot
2016-02-28 9:03 ` Michael S. Tsirkin
@ 2016-03-06 8:37 ` Michael S. Tsirkin
2016-03-10 0:49 ` [kbuild-all] " Fengguang Wu
1 sibling, 1 reply; 8+ messages in thread
From: Michael S. Tsirkin @ 2016-03-06 8:37 UTC (permalink / raw)
To: kbuild test robot; +Cc: kbuild-all, linux-kernel, linux, jonas, Philip Li
I keep seeing these errors. Any openrisc/gcc/kbuild people
interested in looking into this?
On Sun, Feb 28, 2016 at 07:15:14AM +0800, kbuild test robot wrote:
> Hi Michael,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
> commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
> date: 1 year, 2 months ago
> config: openrisc-allmodconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
> # save the attached .config to linux build tree
> make.cross ARCH=openrisc
>
> All errors (new ones prefixed by >>):
>
> drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
> >> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
>
> vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
>
> 712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
> 713 r = -EFAULT;
> 714 break;
> 715 }
> 716
> 717 /* Make sure it's safe to cast pointers to vring types. */
> > 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
> 719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
> 720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
> 721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
I still think it's a bug in the openrisc compiler used.
struct vring_avail {
unsigned short flags;
unsigned short idx;
};
struct vring_avail *x;
int main(int argc, char **argv)
{
footest();
if (__alignof__(*x) == 1)
foo1();
else if (__alignof__(*x) == 2)
foo2();
else if (__alignof__(*x) == 4)
foo4();
else if (__alignof__(*x) == 8)
foo8();
else
fooother();
return 0;
}
when compiled with the openrisc compiler from kernel.org this calls foo4
and it really should call foo2, since the openrisc manual says:
16.1.2
Aggregates and Unions
Aggregates (structures and arrays) and unions assume the alignment of
their most
strictly aligned element.
and alignment for unsigned short is 2.
--
MST
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [kbuild-all] drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
2016-03-06 8:37 ` Michael S. Tsirkin
@ 2016-03-10 0:49 ` Fengguang Wu
2016-03-13 14:57 ` Michael S. Tsirkin
0 siblings, 1 reply; 8+ messages in thread
From: Fengguang Wu @ 2016-03-10 0:49 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: jonas, Philip Li, linux, kbuild-all, linux-kernel, Tony Breeds
Hi Michael,
On Sun, Mar 06, 2016 at 10:37:07AM +0200, Michael S. Tsirkin wrote:
> I keep seeing these errors. Any openrisc/gcc/kbuild people
> interested in looking into this?
Sorry, currently the buildbot is running old gcc 4.5.1 cross compiler
for openrisc:
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.1/x86_64-gcc-4.5.1-nolibc_or32-linux.tar.xz
I'll blacklist this error for now, until we upgraded to a new gcc
version that has this issue fixed.
Thanks,
Fengguang
> On Sun, Feb 28, 2016 at 07:15:14AM +0800, kbuild test robot wrote:
> > Hi Michael,
> >
> > FYI, the error/warning still remains.
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
> > commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
> > date: 1 year, 2 months ago
> > config: openrisc-allmodconfig (attached as .config)
> > reproduce:
> > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
> > # save the attached .config to linux build tree
> > make.cross ARCH=openrisc
> >
> > All errors (new ones prefixed by >>):
> >
> > drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
> > >> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
> >
> > vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
> >
> > 712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
> > 713 r = -EFAULT;
> > 714 break;
> > 715 }
> > 716
> > 717 /* Make sure it's safe to cast pointers to vring types. */
> > > 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
> > 719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
> > 720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
> > 721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
> >
> > ---
> > 0-DAY kernel test infrastructure Open Source Technology Center
> > https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
> I still think it's a bug in the openrisc compiler used.
>
> struct vring_avail {
> unsigned short flags;
> unsigned short idx;
> };
>
> struct vring_avail *x;
>
> int main(int argc, char **argv)
> {
>
> footest();
> if (__alignof__(*x) == 1)
> foo1();
> else if (__alignof__(*x) == 2)
> foo2();
> else if (__alignof__(*x) == 4)
> foo4();
> else if (__alignof__(*x) == 8)
> foo8();
> else
> fooother();
> return 0;
> }
>
> when compiled with the openrisc compiler from kernel.org this calls foo4
> and it really should call foo2, since the openrisc manual says:
>
> 16.1.2
> Aggregates and Unions
> Aggregates (structures and arrays) and unions assume the alignment of
> their most
> strictly aligned element.
>
> and alignment for unsigned short is 2.
>
>
>
> --
> MST
> _______________________________________________
> kbuild-all mailing list
> kbuild-all@lists.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all
^ permalink raw reply [flat|nested] 8+ messages in thread
* drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
@ 2016-03-13 2:49 kbuild test robot
0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2016-03-13 2:49 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
Hi Michael,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fda604a4daa19ead458ce5471892fa1d4b382d82
commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
date: 1 year, 2 months ago
config: openrisc-allmodconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
# save the attached .config to linux build tree
make.cross ARCH=openrisc
All errors (new ones prefixed by >>):
drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
>> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
713 r = -EFAULT;
714 break;
715 }
716
717 /* Make sure it's safe to cast pointers to vring types. */
> 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 32019 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [kbuild-all] drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
2016-03-10 0:49 ` [kbuild-all] " Fengguang Wu
@ 2016-03-13 14:57 ` Michael S. Tsirkin
2016-03-14 1:41 ` Fengguang Wu
0 siblings, 1 reply; 8+ messages in thread
From: Michael S. Tsirkin @ 2016-03-13 14:57 UTC (permalink / raw)
To: Fengguang Wu
Cc: jonas, Philip Li, linux, kbuild-all, linux-kernel, Tony Breeds
On Thu, Mar 10, 2016 at 08:49:24AM +0800, Fengguang Wu wrote:
> Hi Michael,
>
> On Sun, Mar 06, 2016 at 10:37:07AM +0200, Michael S. Tsirkin wrote:
> > I keep seeing these errors. Any openrisc/gcc/kbuild people
> > interested in looking into this?
>
> Sorry, currently the buildbot is running old gcc 4.5.1 cross compiler
> for openrisc:
>
> https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.1/x86_64-gcc-4.5.1-nolibc_or32-linux.tar.xz
>
> I'll blacklist this error for now, until we upgraded to a new gcc
> version that has this issue fixed.
>
> Thanks,
> Fengguang
Keep getting these errors, blacklisting did not seem to work.
> > On Sun, Feb 28, 2016 at 07:15:14AM +0800, kbuild test robot wrote:
> > > Hi Michael,
> > >
> > > FYI, the error/warning still remains.
> > >
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
> > > commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
> > > date: 1 year, 2 months ago
> > > config: openrisc-allmodconfig (attached as .config)
> > > reproduce:
> > > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> > > chmod +x ~/bin/make.cross
> > > git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
> > > # save the attached .config to linux build tree
> > > make.cross ARCH=openrisc
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > > drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
> > > >> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
> > >
> > > vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
> > >
> > > 712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
> > > 713 r = -EFAULT;
> > > 714 break;
> > > 715 }
> > > 716
> > > 717 /* Make sure it's safe to cast pointers to vring types. */
> > > > 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
> > > 719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
> > > 720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
> > > 721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
> > >
> > > ---
> > > 0-DAY kernel test infrastructure Open Source Technology Center
> > > https://lists.01.org/pipermail/kbuild-all Intel Corporation
> >
> > I still think it's a bug in the openrisc compiler used.
> >
> > struct vring_avail {
> > unsigned short flags;
> > unsigned short idx;
> > };
> >
> > struct vring_avail *x;
> >
> > int main(int argc, char **argv)
> > {
> >
> > footest();
> > if (__alignof__(*x) == 1)
> > foo1();
> > else if (__alignof__(*x) == 2)
> > foo2();
> > else if (__alignof__(*x) == 4)
> > foo4();
> > else if (__alignof__(*x) == 8)
> > foo8();
> > else
> > fooother();
> > return 0;
> > }
> >
> > when compiled with the openrisc compiler from kernel.org this calls foo4
> > and it really should call foo2, since the openrisc manual says:
> >
> > 16.1.2
> > Aggregates and Unions
> > Aggregates (structures and arrays) and unions assume the alignment of
> > their most
> > strictly aligned element.
> >
> > and alignment for unsigned short is 2.
> >
> >
> >
> > --
> > MST
> > _______________________________________________
> > kbuild-all mailing list
> > kbuild-all@lists.01.org
> > https://lists.01.org/mailman/listinfo/kbuild-all
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [kbuild-all] drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
2016-03-13 14:57 ` Michael S. Tsirkin
@ 2016-03-14 1:41 ` Fengguang Wu
0 siblings, 0 replies; 8+ messages in thread
From: Fengguang Wu @ 2016-03-14 1:41 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: jonas, Philip Li, linux, kbuild-all, linux-kernel, Tony Breeds
Hi Michael,
Sorry for the delay! I blacklisted it just now.
Fengguang
On Sun, Mar 13, 2016 at 04:57:26PM +0200, Michael S. Tsirkin wrote:
> On Thu, Mar 10, 2016 at 08:49:24AM +0800, Fengguang Wu wrote:
> > Hi Michael,
> >
> > On Sun, Mar 06, 2016 at 10:37:07AM +0200, Michael S. Tsirkin wrote:
> > > I keep seeing these errors. Any openrisc/gcc/kbuild people
> > > interested in looking into this?
> >
> > Sorry, currently the buildbot is running old gcc 4.5.1 cross compiler
> > for openrisc:
> >
> > https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.1/x86_64-gcc-4.5.1-nolibc_or32-linux.tar.xz
> >
> > I'll blacklist this error for now, until we upgraded to a new gcc
> > version that has this issue fixed.
> >
> > Thanks,
> > Fengguang
>
> Keep getting these errors, blacklisting did not seem to work.
>
> > > On Sun, Feb 28, 2016 at 07:15:14AM +0800, kbuild test robot wrote:
> > > > Hi Michael,
> > > >
> > > > FYI, the error/warning still remains.
> > > >
> > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > > > head: 691429e13dfaf5b0994b07cc166db41bd608ee3d
> > > > commit: 5d9a07b0de512b77bf28d2401e5fe3351f00a240 vhost: relax used address alignment
> > > > date: 1 year, 2 months ago
> > > > config: openrisc-allmodconfig (attached as .config)
> > > > reproduce:
> > > > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> > > > chmod +x ~/bin/make.cross
> > > > git checkout 5d9a07b0de512b77bf28d2401e5fe3351f00a240
> > > > # save the attached .config to linux build tree
> > > > make.cross ARCH=openrisc
> > > >
> > > > All errors (new ones prefixed by >>):
> > > >
> > > > drivers/vhost/vhost.c: In function 'vhost_vring_ioctl':
> > > > >> drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE
> > > >
> > > > vim +/__compiletime_assert_718 +718 drivers/vhost/vhost.c
> > > >
> > > > 712 (u64)(unsigned long)a.avail_user_addr != a.avail_user_addr) {
> > > > 713 r = -EFAULT;
> > > > 714 break;
> > > > 715 }
> > > > 716
> > > > 717 /* Make sure it's safe to cast pointers to vring types. */
> > > > > 718 BUILD_BUG_ON(__alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE);
> > > > 719 BUILD_BUG_ON(__alignof__ *vq->used > VRING_USED_ALIGN_SIZE);
> > > > 720 if ((a.avail_user_addr & (VRING_AVAIL_ALIGN_SIZE - 1)) ||
> > > > 721 (a.used_user_addr & (VRING_USED_ALIGN_SIZE - 1)) ||
> > > >
> > > > ---
> > > > 0-DAY kernel test infrastructure Open Source Technology Center
> > > > https://lists.01.org/pipermail/kbuild-all Intel Corporation
> > >
> > > I still think it's a bug in the openrisc compiler used.
> > >
> > > struct vring_avail {
> > > unsigned short flags;
> > > unsigned short idx;
> > > };
> > >
> > > struct vring_avail *x;
> > >
> > > int main(int argc, char **argv)
> > > {
> > >
> > > footest();
> > > if (__alignof__(*x) == 1)
> > > foo1();
> > > else if (__alignof__(*x) == 2)
> > > foo2();
> > > else if (__alignof__(*x) == 4)
> > > foo4();
> > > else if (__alignof__(*x) == 8)
> > > foo8();
> > > else
> > > fooother();
> > > return 0;
> > > }
> > >
> > > when compiled with the openrisc compiler from kernel.org this calls foo4
> > > and it really should call foo2, since the openrisc manual says:
> > >
> > > 16.1.2
> > > Aggregates and Unions
> > > Aggregates (structures and arrays) and unions assume the alignment of
> > > their most
> > > strictly aligned element.
> > >
> > > and alignment for unsigned short is 2.
> > >
> > >
> > >
> > > --
> > > MST
> > > _______________________________________________
> > > kbuild-all mailing list
> > > kbuild-all@lists.01.org
> > > https://lists.01.org/mailman/listinfo/kbuild-all
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-03-14 1:41 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-27 23:15 drivers/vhost/vhost.c:718:3: error: call to '__compiletime_assert_718' declared with attribute error: BUILD_BUG_ON failed: __alignof__ *vq->avail > VRING_AVAIL_ALIGN_SIZE kbuild test robot
2016-02-28 9:03 ` Michael S. Tsirkin
2016-03-06 8:37 ` Michael S. Tsirkin
2016-03-10 0:49 ` [kbuild-all] " Fengguang Wu
2016-03-13 14:57 ` Michael S. Tsirkin
2016-03-14 1:41 ` Fengguang Wu
-- strict thread matches above, loose matches on Subject: below --
2016-03-06 3:35 kbuild test robot
2016-03-13 2:49 kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).