Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build tools/lkl failed #253

Closed
lamiaaMB opened this issue Oct 23, 2016 · 23 comments
Closed

build tools/lkl failed #253

lamiaaMB opened this issue Oct 23, 2016 · 23 comments

Comments

@lamiaaMB
Copy link

I'm building the lkl tools on Ubuntu 15, and I'm getting this error when I use the command
make -C tools/lkl

In file included from include/lkl_host.h:8:0,
from lib/posix-host.c:17:
include/lkl/asm/host_ops.h:5:1: error: two or more data types in declaration specifiers
struct lkl_mutex;
^
include/lkl/asm/host_ops.h:5:8: warning: useless type name in empty declaration [enabled by default]
struct lkl_mutex;
^
include/lkl/asm/host_ops.h:5:8: error: ‘inline’ in empty declaration

Regards,

@tavip
Copy link
Member

tavip commented Oct 24, 2016

Hi @lamiaaMB , thanks for reporting this. Can you please paste the last 20-30 lines of the build?

@lamiaaMB
Copy link
Author

lamiaaMB commented Feb 15, 2017

Hi @tavip ,
I'm sorry for being that late, kindly find below the lines you asked for

REPLACE /home/lamiaa/Documents/linux-master/tools/lkl/include/lkl/linux/fcntl.h
REPLACE /home/lamiaa/Documents/linux-master/tools/lkl/include/lkl/linux/poll.h
REPLACE /home/lamiaa/Documents/linux-master/tools/lkl/include/lkl/linux/ioctl.h
REPLACE /home/lamiaa/Documents/linux-master/tools/lkl/include/lkl/linux/fs.h
REPLACE /home/lamiaa/Documents/linux-master/tools/lkl/include/lkl/linux/sembuf.h
REPLACE /home/lamiaa/Documents/linux-master/tools/lkl/include/lkl/linux/ipc.h
REPLACE /home/lamiaa/Documents/linux-master/tools/lkl/include/lkl/linux/socket.h
CC lklfuse.o
LD lklfuse-in.o
CC lib/fs.o
lib/fs.c: In function ‘lkl_get_virtio_blkdev’:
lib/fs.c:145:10: warning: ‘device_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]
*pdevid = device_id;
^
CC lib/iomem.o
CC lib/net.o
CC lib/posix-host.o
In file included from include/lkl_host.h:8:0,
from lib/posix-host.c:17:
include/lkl/asm/host_ops.h:5:1: error: two or more data types in declaration specifiers
struct lkl_mutex;
^
include/lkl/asm/host_ops.h:5:8: warning: useless type name in empty declaration [enabled by default]
struct lkl_mutex;
^
include/lkl/asm/host_ops.h:5:8: error: ‘inline’ in empty declaration
cat: lib/.posix-host.o.d: No such file or directory
/home/lamiaa/Documents/linux-master/tools/build/Makefile.build:77: recipe for target 'lib/posix-host.o' failed
make[1]: *** [lib/posix-host.o] Error 1
Makefile:122: recipe for target 'lib/lkl-in.o' failed
make: *** [lib/lkl-in.o] Error 2
make: Leaving directory '/home/lamiaa/Documents/linux-master/tools/lkl'

@lamiaaMB lamiaaMB reopened this Feb 15, 2017
@lamiaaMB
Copy link
Author

It looks like you don't support ubuntu versions later that 14

@thehajime
Copy link
Member

I gave a quick try on my ubuntu 15.04 and 16.04. looks fine both make and make test.
@lamiaaMB could you try to git pull and build again ?

  • 15.04
root@f0442989e829:~/linux/tools/lkl# lsb_release -a ; gcc --version; git show
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 15.04
Release:	15.04
Codename:	vivid
gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

commit 5b3fcd5876a7ed31ee44f74bb17d8e6bff85700f
Merge: 84f6a9b 1025f3c1
Author: Octavian Purdila <tavi@cs.pub.ro>
Date:   Mon Feb 20 10:42:31 2017 +0200

    Merge pull request #322 from laijs/host_task_stub
    
    use host_task_stub() for host task

  • 16.04
root@zak-docker1:~/lkl/tools/lkl# gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@zak-docker1:~/lkl/tools/lkl# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial
root@zak-docker1:~/lkl/tools/lkl# git show
commit 84f6a9b4bcb0c17c6c1b5eacccba2f84159b05c4
Merge: 311a4ee 9045528
Author: Octavian Purdila <tavi@cs.pub.ro>
Date:   Thu Feb 16 22:31:46 2017 +0200

    Merge pull request #332 from laijs/lkl/stackoverflow
    
    fix stackoverflow in test_getdents64()

@lamiaaMB
Copy link
Author

lamiaaMB commented Feb 21, 2017

@thehajime
I've just tried to pull the latest update ( after the merge of the request ) and I still get the same error. when I tried to build on a remote machine that has ubuntu 14 installed on it , it built fine

@thehajime
Copy link
Member

please describe a bit more about your environment in order to reproduce this issue.

  • ubuntu release (lsb_release -a)
  • gcc version
  • full build log

did you try to make mrproper before your build ?

@lamiaaMB
Copy link
Author

Ubuntu release : 15.10
gcc version : 4.8
The full build and error logs are attached
Yes, I tried make mrproper before building and got the same error

blog.txt
elog.txt

@tavip
Copy link
Member

tavip commented Feb 21, 2017

@lamiaaMB could you also please attach an archive of the full tools/lkl directory after the build error?

@lamiaaMB
Copy link
Author

kindly find it attached
lkl.zip

@thehajime
Copy link
Member

kindly find it attached
lkl.zip

@lamiaaMB looks like you're not using the latest lkl tree according to the file lkl/lib/posix-host.c in your lkl.zip (mutex_alloc() is at least the old one).

one thing that was my mistake is make mrproper doesn't clean the tools/lkl directory. make clean -C tools/lkl instead may help you.

@thehajime
Copy link
Member

I gave a try with 15.10 ubuntu, almost fresh install and fresh clone of lkl, and can't reproduce the issue you reported.

@tavip
Copy link
Member

tavip commented Feb 21, 2017

@lamiaaMB can you please run the following command after the build fails (with the /home/tavi/... replaced with your paths)

~/src/linux/tools/lkl$ gcc -Wp,-MD,/home/tavi/src/linux/tools/lkl/lib/.posix-host.o.d,-MT,/home/tavi/src/linux/tools/lkl/lib/posix-host.o -I/home/tavi/src/linux/tools/lkl//include -Iinclude -Wall -g -O2 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fno-strict-aliasing -fPIC -pthread -DCONFIG_AUTO_LKL_POSIX_HOST -D"BUILD_STR(s)=#s" -D_FILE_OFFSET_BITS=64 -E -o /home/tavi/src/linux/tools/lkl/lib/posix-host.o lib/posix-host.c

and please post /home/tavi/src/linux/tools/lkl/lib/posix-host.o lib/posix-host.c

@lamiaaMB
Copy link
Author

@thehajime
I make a new fresh installation and here is the archive after the build failed

lkl.zip

@lamiaaMB
Copy link
Author

@tavip
I ran the command and here are the files :

posix-host.zip

@thehajime
Copy link
Member

hmm, still can't reproduce on my 15.10. changing gcc to 4.7.4 and 4.8.5 from the default one (5.2.1) doesn't help either.

looks like your issue is that a forwarding declartion in host_ops.h (struct lkl_mutex in particular) was interpreted as if an empty declaration with some 'inline' prefix before that. but I can't find any relevant portion from your posix-host.o so I'm almost lost what's going on.

maybe @tavip will look into this and I hope he find something :)

my ubuntu installation is from docker, then apt-get update;apt-get install various packages. I was wondering how you installed your fresh ubuntu 15.10.

@tavip
Copy link
Member

tavip commented Feb 22, 2017

@lamiaaMB Thanks. It looks like your "/usr/include/x86_64-linux-gnu/bits/poll2.h" file is truncated, it ends in the middle of a declaration. Can you please post it here to confirm?

@lamiaaMB
Copy link
Author

/* Checking macros for poll functions.
Copyright (C) 2012-2015 Free Software Foundation, Inc.
This file is part of the GNU C Library.

The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
http://www.gnu.org/licenses/. */

#ifndef _SYS_POLL_H

error "Never include <bits/poll2.h> directly; use <sys/poll.h> instead."

#endif

__BEGIN_DECLS

extern int __REDIRECT (__poll_alias, (struct pollfd *__fds, nfds_t __nfds,
int __timeout), poll);
extern int __poll_chk (struct pollfd *__fds, nfds_t __nfds, int __timeout,
SIZE_TYPE __fdslen);
extern int __REDIRECT (__poll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
int __timeout, SIZE_TYPE __fdslen),
__poll_chk)
__warnattr ("poll called with fds buffer too small file nfds entries");

__fortify_function int
/*poll (struct pollfd __fds, nfds_t __nfds, int __timeout)
{
if (__bos (__fds) != (SIZE_TYPE) -1)
{
if (! __builtin_constant_p (__nfds))
return __poll_chk (__fds, __nfds, __timeout, __bos (__fds));
else if (__bos (__fds) / sizeof (
__fds) < __nfds)
return __poll_chk_warn (__fds, __nfds, __timeout, __bos (__fds));
}

return __poll_alias (__fds, __nfds, __timeout);
}*/

#ifdef __USE_GNU
extern int __REDIRECT (__ppoll_alias, (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
const __sigset_t *__ss), ppoll);
extern int __ppoll_chk (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
const __sigset_t *__ss, SIZE_TYPE __fdslen);
extern int __REDIRECT (__ppoll_chk_warn, (struct pollfd *__fds, nfds_t __nfds,
const struct timespec *__timeout,
const __sigset_t *__ss,
SIZE_TYPE __fdslen),
__ppoll_chk)
__warnattr ("ppoll called with fds buffer too small file nfds entries");

__fortify_function int
ppoll (struct pollfd *__fds, nfds_t __nfds, const struct timespec *__timeout,
const __sigset_t __ss)
{
if (__bos (__fds) != (SIZE_TYPE) -1)
{
if (! __builtin_constant_p (__nfds))
return __ppoll_chk (__fds, __nfds, __timeout, __ss, __bos (__fds));
else if (__bos (__fds) / sizeof (
__fds) < __nfds)
return __ppoll_chk_warn (__fds, __nfds, __timeout, __ss,
__bos (__fds));
}

return __ppoll_alias (__fds, __nfds, __timeout, __ss);
}
#endif

__END_DECLS

@tavip
Copy link
Member

tavip commented Feb 22, 2017

@lamiaaMB OK, the file seems to be intact, but somehow the processing for it ends in the middle of that last definition. Lets try to compile the following simple program:

#include <pthread.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <signal.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <stdint.h>
#include <sys/uio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <poll.h>

with gcc -c -O2 -o a.o a.c

and see if it fails in which case there is something wrong with the headers/preprocessor/compiler, which is what I suspect at this point.

Also please run:

gcc -E -O2 -o a.o a.c

and upload a.o

@lamiaaMB
Copy link
Author

it fails to compile with this error :
a.c:17:0: error: expected identifier or ‘(’ at end of input

@lamiaaMB
Copy link
Author

This is the .o file after running the second command
a.o.zip

@thehajime
Copy link
Member

now I found in your reported poll2.h (#253 (comment)), the poll function is commented out - this may be why you got the compilation error.

I have completely no idea why this is.

__fortify_function int
/*poll (struct pollfd __fds, nfds_t __nfds, int __timeout)
{
if (__bos (__fds) != (SIZE_TYPE) -1)
{
if (! __builtin_constant_p (__nfds))
return __poll_chk (__fds, __nfds, __timeout, __bos (__fds));
else if (__bos (__fds) / sizeof (__fds) < __nfds)
return __poll_chk_warn (__fds, __nfds, __timeout, __bos (__fds));
}

return __poll_alias (__fds, __nfds, __timeout);
}*/

@tavip
Copy link
Member

tavip commented Feb 23, 2017

@lamiaaMB @thehajime It looks like your system header file is corrupted, can you try to force reinstall the libc6-dev:amd64 package?

@lamiaaMB
Copy link
Author

Thank you @tavip ,and @thehajime .
the system headers were, mysteriously, corrupted. After I upgraded the system and reinstalled libc6-dev:amd64, everything worked fine, and I managed to build it successfully.
Thanks a lot for your support and patience :)

thehajime pushed a commit to libos-nuse/lkl-linux that referenced this issue Mar 19, 2018
If userspace attempted to set a "security.capability" xattr shorter than
4 bytes (e.g. 'setfattr -n security.capability -v x file'), then
cap_convert_nscap() read past the end of the buffer containing the xattr
value because it accessed the ->magic_etc field without verifying that
the xattr value is long enough to contain that field.

Fix it by validating the xattr value size first.

This bug was found using syzkaller with KASAN.  The KASAN report was as
follows (cleaned up slightly):

    BUG: KASAN: slab-out-of-bounds in cap_convert_nscap+0x514/0x630 security/commoncap.c:498
    Read of size 4 at addr ffff88002d8741c0 by task syz-executor1/2852

    CPU: 0 PID: 2852 Comm: syz-executor1 Not tainted 4.15.0-rc6-00200-gcc0aac99d977 lkl#253
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014
    Call Trace:
     __dump_stack lib/dump_stack.c:17 [inline]
     dump_stack+0xe3/0x195 lib/dump_stack.c:53
     print_address_description+0x73/0x260 mm/kasan/report.c:252
     kasan_report_error mm/kasan/report.c:351 [inline]
     kasan_report+0x235/0x350 mm/kasan/report.c:409
     cap_convert_nscap+0x514/0x630 security/commoncap.c:498
     setxattr+0x2bd/0x350 fs/xattr.c:446
     path_setxattr+0x168/0x1b0 fs/xattr.c:472
     SYSC_setxattr fs/xattr.c:487 [inline]
     SyS_setxattr+0x36/0x50 fs/xattr.c:483
     entry_SYSCALL_64_fastpath+0x18/0x85

Fixes: 8db6c34 ("Introduce v3 namespaced file capabilities")
Cc: <stable@vger.kernel.org> # v4.14+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
boat0 pushed a commit to boat0/lkl-linux that referenced this issue May 18, 2018
syzkaller found an issue caused by lack of sufficient checks
in l2tp_tunnel_create()

RAW sockets can not be considered as UDP ones for instance.

In another patch, we shall replace all pr_err() by less intrusive
pr_debug() so that syzkaller can find other bugs faster.
Acked-by: Guillaume Nault <g.nault@alphalink.fr>
Acked-by: James Chapman <jchapman@katalix.com>

==================================================================
BUG: KASAN: slab-out-of-bounds in setup_udp_tunnel_sock+0x3ee/0x5f0 net/ipv4/udp_tunnel.c:69
dst_release: dst:00000000d53d0d0f refcnt:-1
Write of size 1 at addr ffff8801d013b798 by task syz-executor3/6242

CPU: 1 PID: 6242 Comm: syz-executor3 Not tainted 4.16.0-rc2+ lkl#253
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x24d lib/dump_stack.c:53
 print_address_description+0x73/0x250 mm/kasan/report.c:256
 kasan_report_error mm/kasan/report.c:354 [inline]
 kasan_report+0x23b/0x360 mm/kasan/report.c:412
 __asan_report_store1_noabort+0x17/0x20 mm/kasan/report.c:435
 setup_udp_tunnel_sock+0x3ee/0x5f0 net/ipv4/udp_tunnel.c:69
 l2tp_tunnel_create+0x1354/0x17f0 net/l2tp/l2tp_core.c:1596
 pppol2tp_connect+0x14b1/0x1dd0 net/l2tp/l2tp_ppp.c:707
 SYSC_connect+0x213/0x4a0 net/socket.c:1640
 SyS_connect+0x24/0x30 net/socket.c:1621
 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287
 entry_SYSCALL_64_after_hwframe+0x42/0xb7

Fixes: fd558d1 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
retrage pushed a commit to retrage/linux that referenced this issue Jan 15, 2019
syzbot managed to crash in skb_checksum_help() [1] :

        BUG_ON(offset + sizeof(__sum16) > skb_headlen(skb));

Root cause is the following check in skb_partial_csum_set()

	if (unlikely(start > skb_headlen(skb)) ||
	    unlikely((int)start + off > skb_headlen(skb) - 2))
		return false;

If skb_headlen(skb) is 1, then (skb_headlen(skb) - 2) becomes 0xffffffff
and the check fails to detect that ((int)start + off) is off the limit,
since the compare is unsigned.

When we fix that, then the first condition (start > skb_headlen(skb))
becomes obsolete.

Then we should also check that (skb_headroom(skb) + start) wont
overflow 16bit field.

[1]
kernel BUG at net/core/dev.c:2880!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 7330 Comm: syz-executor4 Not tainted 4.19.0-rc6+ lkl#253
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:skb_checksum_help+0x9e3/0xbb0 net/core/dev.c:2880
Code: 85 00 ff ff ff 48 c1 e8 03 42 80 3c 28 00 0f 84 09 fb ff ff 48 8b bd 00 ff ff ff e8 97 a8 b9 fb e9 f8 fa ff ff e8 2d 09 76 fb <0f> 0b 48 8b bd 28 ff ff ff e8 1f a8 b9 fb e9 b1 f6 ff ff 48 89 cf
RSP: 0018:ffff8801d83a6f60 EFLAGS: 00010293
RAX: ffff8801b9834380 RBX: ffff8801b9f8d8c0 RCX: ffffffff8608c6d7
RDX: 0000000000000000 RSI: ffffffff8608cc63 RDI: 0000000000000006
RBP: ffff8801d83a7068 R08: ffff8801b9834380 R09: 0000000000000000
R10: ffff8801d83a76d8 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000010001 R14: 000000000000ffff R15: 00000000000000a8
FS:  00007f1a66db5700(0000) GS:ffff8801daf00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7d77f091b0 CR3: 00000001ba252000 CR4: 00000000001406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 skb_csum_hwoffload_help+0x8f/0xe0 net/core/dev.c:3269
 validate_xmit_skb+0xa2a/0xf30 net/core/dev.c:3312
 __dev_queue_xmit+0xc2f/0x3950 net/core/dev.c:3797
 dev_queue_xmit+0x17/0x20 net/core/dev.c:3838
 packet_snd net/packet/af_packet.c:2928 [inline]
 packet_sendmsg+0x422d/0x64c0 net/packet/af_packet.c:2953

Fixes: 5ff8dda ("net: Ensure partial checksum offset is inside the skb head")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
thehajime pushed a commit to thehajime/linux that referenced this issue Aug 18, 2024
Toggle deleted anonymous sets as inactive in the next generation, so
users cannot perform any update on it. Clear the generation bitmask
in case the transaction is aborted.

The following KASAN splat shows a set element deletion for a bound
anonymous set that has been already removed in the same transaction.

[   64.921510] ==================================================================
[   64.923123] BUG: KASAN: wild-memory-access in nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.924745] Write of size 8 at addr dead000000000122 by task test/890
[   64.927903] CPU: 3 PID: 890 Comm: test Not tainted 6.3.0+ lkl#253
[   64.931120] Call Trace:
[   64.932699]  <TASK>
[   64.934292]  dump_stack_lvl+0x33/0x50
[   64.935908]  ? nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.937551]  kasan_report+0xda/0x120
[   64.939186]  ? nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.940814]  nf_tables_commit+0xa24/0x1490 [nf_tables]
[   64.942452]  ? __kasan_slab_alloc+0x2d/0x60
[   64.944070]  ? nf_tables_setelem_notify+0x190/0x190 [nf_tables]
[   64.945710]  ? kasan_set_track+0x21/0x30
[   64.947323]  nfnetlink_rcv_batch+0x709/0xd90 [nfnetlink]
[   64.948898]  ? nfnetlink_rcv_msg+0x480/0x480 [nfnetlink]

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
rodionov pushed a commit to rodionov/lkl that referenced this issue Jan 2, 2025
Add a new test case which performs double query of the bpf_mprog through
libbpf API, but also via raw bpf(2) syscall. This is testing to gather
first the count and then in a subsequent probe the full information with
the program array without clearing passed structs in between.

  # ./vmtest.sh -- ./test_progs -t tc_opts
  [...]
  ./test_progs -t tc_opts
  [    1.398818] tsc: Refined TSC clocksource calibration: 3407.999 MHz
  [    1.400263] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fd336761, max_idle_ns: 440795243819 ns
  [    1.402734] clocksource: Switched to clocksource tsc
  [    1.426639] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.428112] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  lkl#252     tc_opts_after:OK
  lkl#253     tc_opts_append:OK
  lkl#254     tc_opts_basic:OK
  lkl#255     tc_opts_before:OK
  lkl#256     tc_opts_chain_classic:OK
  lkl#257     tc_opts_chain_mixed:OK
  lkl#258     tc_opts_delete_empty:OK
  lkl#259     tc_opts_demixed:OK
  lkl#260     tc_opts_detach:OK
  lkl#261     tc_opts_detach_after:OK
  lkl#262     tc_opts_detach_before:OK
  lkl#263     tc_opts_dev_cleanup:OK
  lkl#264     tc_opts_invalid:OK
  lkl#265     tc_opts_max:OK
  lkl#266     tc_opts_mixed:OK
  lkl#267     tc_opts_prepend:OK
  lkl#268     tc_opts_query:OK            <--- (new test)
  lkl#269     tc_opts_replace:OK
  lkl#270     tc_opts_revision:OK
  Summary: 19/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
rodionov pushed a commit to rodionov/lkl that referenced this issue Jan 2, 2025
Add a new test case to query on an empty bpf_mprog and pass the revision
directly into expected_revision for attachment to assert that this does
succeed.

  ./test_progs -t tc_opts
  [    1.406778] tsc: Refined TSC clocksource calibration: 3407.990 MHz
  [    1.408863] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcaf6eb0, max_idle_ns: 440795321766 ns
  [    1.412419] clocksource: Switched to clocksource tsc
  [    1.428671] bpf_testmod: loading out-of-tree module taints kernel.
  [    1.430260] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  lkl#252     tc_opts_after:OK
  lkl#253     tc_opts_append:OK
  lkl#254     tc_opts_basic:OK
  lkl#255     tc_opts_before:OK
  lkl#256     tc_opts_chain_classic:OK
  lkl#257     tc_opts_chain_mixed:OK
  lkl#258     tc_opts_delete_empty:OK
  lkl#259     tc_opts_demixed:OK
  lkl#260     tc_opts_detach:OK
  lkl#261     tc_opts_detach_after:OK
  lkl#262     tc_opts_detach_before:OK
  lkl#263     tc_opts_dev_cleanup:OK
  lkl#264     tc_opts_invalid:OK
  lkl#265     tc_opts_max:OK
  lkl#266     tc_opts_mixed:OK
  lkl#267     tc_opts_prepend:OK
  lkl#268     tc_opts_query:OK
  lkl#269     tc_opts_query_attach:OK     <--- (new test)
  lkl#270     tc_opts_replace:OK
  lkl#271     tc_opts_revision:OK
  Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-6-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants