linux-kernel-labs / linux Goto Github PK
View Code? Open in Web Editor NEWThis project forked from torvalds/linux
Linux kernel source tree
License: Other
This project forked from torvalds/linux
Linux kernel source tree
License: Other
Hello,
I'm trying to follow the device_drivers lab.
To do so, I have cloned this repository and typed the following commands as indicated:
$ cd tools/labs
$ make clean
$ LABS=device_drivers make skels
$ make build
However, I have the following error:
In file included from ./include/linux/types.h:6,
from ./include/linux/list.h:5,
from ./include/linux/module.h:12,
from /home/pierre/git/linux/tools/labs/skels/./device_drivers/kernel/so2_cdev.c:7:
./include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
5 | #include <asm/types.h>
| ^~~~~~~~~~~~~
This include file is correctly installed on my system under /usr/x86_64-linux-gnu/include
. However, only /usr/lib/gcc/x86_64-linux-gnu/9/include
is included by the Makefile. I have tried to add it manually but I still have include issues.
I also tried to install linux-libc-dev, linux-libc-dev-amd64-cross and linux-libc-dev-i386-cross but it has no effect.
How can I build the skels?
Thanks.
Assignment 1 - tracer_test.c:
1. #include "test.h"
2. #include "debug.h"
3. #include "util.h"
4.
5. #include "tracer.h"
6. #include "tracer_test.h"
7. #include "helper.h"
8.
9. /* use this to enable stats debugging */
10. #if 0
11. #define DEBUG
12. #endif
DEBUG is intended to be used for the print function (at least that is indicated in the comment on line 9). The print macro is defined in debug.h, which is included (line 2) earlier than the DEBUG macro is defined (line 11). I think this should be corrected.
One solution would be the following one, but I think this can be done more elegantly.
1. /* use this to enable stats debugging */
2. #if 0
3. #define DEBUG
4. #endif
5.
6. #include "test.h"
7. #include "debug.h"
8. #include "util.h"
9.
10. #include "tracer.h"
11. #include "tracer_test.h"
12. #include "helper.h"
For newbies would be a good idea to have an archive with labs/exercises/solutions already compiled.
This way would be easier to start with kernel-labs.
I've tried to build and open the qemu virtual machine with the following list of commands:
git clone https://github.com/linux-kernel-labs/linux.git --depth 1
cd linux/
make menuconfig
make -j8
cd tools/labs/
LABS="kernel_api" make skels
make build
make copy
make boot
This is the log for "make boot":
mkdir /tmp/tmp.1aUumDy9it
sudo mount -t ext4 -o loop core-image-minimal-qemux86.ext4 /tmp/tmp.1aUumDy9it
sudo make -C /home/relu/programming/anul4/5-so2/linux modules_install INSTALL_MOD_PATH=/tmp/tmp.1aUumDy9it
make: Entering directory '/home/relu/programming/anul4/5-so2/linux'
INSTALL arch/x86/crypto/aes-x86_64.ko
INSTALL arch/x86/crypto/aesni-intel.ko
INSTALL arch/x86/crypto/blowfish-x86_64.ko
INSTALL arch/x86/crypto/camellia-aesni-avx-x86_64.ko
INSTALL arch/x86/crypto/camellia-aesni-avx2.ko
INSTALL arch/x86/crypto/camellia-x86_64.ko
INSTALL arch/x86/crypto/cast5-avx-x86_64.ko
INSTALL arch/x86/crypto/cast6-avx-x86_64.ko
INSTALL arch/x86/crypto/chacha20-x86_64.ko
INSTALL arch/x86/crypto/crc32-pclmul.ko
INSTALL arch/x86/crypto/crct10dif-pclmul.ko
INSTALL arch/x86/crypto/des3_ede-x86_64.ko
INSTALL arch/x86/crypto/ghash-clmulni-intel.ko
INSTALL arch/x86/crypto/glue_helper.ko
INSTALL arch/x86/crypto/poly1305-x86_64.ko
INSTALL arch/x86/crypto/salsa20-x86_64.ko
INSTALL arch/x86/crypto/serpent-avx-x86_64.ko
INSTALL arch/x86/crypto/serpent-avx2.ko
INSTALL arch/x86/crypto/serpent-sse2-x86_64.ko
INSTALL arch/x86/crypto/sha1-mb/sha1-mb.ko
INSTALL arch/x86/crypto/sha1-ssse3.ko
INSTALL arch/x86/crypto/sha256-mb/sha256-mb.ko
INSTALL arch/x86/crypto/sha256-ssse3.ko
INSTALL arch/x86/crypto/sha512-mb/sha512-mb.ko
INSTALL arch/x86/crypto/sha512-ssse3.ko
INSTALL arch/x86/crypto/twofish-avx-x86_64.ko
INSTALL arch/x86/crypto/twofish-x86_64-3way.ko
INSTALL arch/x86/crypto/twofish-x86_64.ko
INSTALL arch/x86/events/intel/intel-cstate.ko
INSTALL arch/x86/events/intel/intel-rapl-perf.ko
INSTALL arch/x86/kernel/cpu/mcheck/mce-inject.ko
INSTALL arch/x86/kernel/cpuid.ko
INSTALL arch/x86/kernel/msr.ko
INSTALL arch/x86/kvm/kvm-amd.ko
INSTALL arch/x86/kvm/kvm-intel.ko
INSTALL arch/x86/kvm/kvm.ko
INSTALL arch/x86/oprofile/oprofile.ko
INSTALL arch/x86/platform/atom/punit_atom_debug.ko
INSTALL block/bfq.ko
INSTALL block/kyber-iosched.ko
INSTALL block/mq-deadline.ko
INSTALL crypto/842.ko
INSTALL crypto/ablk_helper.ko
INSTALL crypto/aes_ti.ko
INSTALL crypto/af_alg.ko
INSTALL crypto/algif_aead.ko
INSTALL crypto/algif_hash.ko
INSTALL crypto/algif_rng.ko
INSTALL crypto/algif_skcipher.ko
INSTALL crypto/ansi_cprng.ko
INSTALL crypto/anubis.ko
INSTALL crypto/arc4.ko
INSTALL crypto/asymmetric_keys/pkcs7_test_key.ko
INSTALL crypto/async_tx/async_memcpy.ko
INSTALL crypto/async_tx/async_pq.ko
INSTALL crypto/async_tx/async_raid6_recov.ko
INSTALL crypto/async_tx/async_tx.ko
INSTALL crypto/async_tx/async_xor.ko
INSTALL crypto/authenc.ko
INSTALL crypto/authencesn.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/authencesn.ko': No space left on device
INSTALL crypto/blowfish_common.ko
INSTALL crypto/blowfish_generic.ko
INSTALL crypto/camellia_generic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/camellia_generic.ko': No space left on device
INSTALL crypto/cast5_generic.ko
INSTALL crypto/cast6_generic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/cast6_generic.ko': No space left on device
INSTALL crypto/cast_common.ko
INSTALL crypto/ccm.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/ccm.ko': No space left on device
INSTALL crypto/chacha20_generic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/chacha20_generic.ko': No space left on device
INSTALL crypto/chacha20poly1305.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/chacha20poly1305.ko': No space left on device
INSTALL crypto/cmac.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/cmac.ko': No space left on device
INSTALL crypto/crc32_generic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/crc32_generic.ko': No space left on device
INSTALL crypto/cryptd.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/cryptd.ko': No space left on device
INSTALL crypto/crypto_engine.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/crypto_engine.ko': No space left on device
INSTALL crypto/crypto_simd.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/crypto_simd.ko': No space left on device
INSTALL crypto/crypto_user.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/crypto_user.ko': No space left on device
INSTALL crypto/deflate.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/deflate.ko': No space left on device
INSTALL crypto/des_generic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/des_generic.ko': No space left on device
INSTALL crypto/ecdh_generic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/ecdh_generic.ko': No space left on device
INSTALL crypto/echainiv.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/echainiv.ko': No space left on device
INSTALL crypto/fcrypt.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/fcrypt.ko': No space left on device
INSTALL crypto/keywrap.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/keywrap.ko': No space left on device
INSTALL crypto/khazad.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/khazad.ko': No space left on device
INSTALL crypto/lrw.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/lrw.ko': No space left on device
INSTALL crypto/lz4.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/lz4.ko': No space left on device
INSTALL crypto/lz4hc.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/lz4hc.ko': No space left on device
INSTALL crypto/mcryptd.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/mcryptd.ko': No space left on device
INSTALL crypto/md4.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/md4.ko': No space left on device
INSTALL crypto/michael_mic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/michael_mic.ko': No space left on device
INSTALL crypto/pcbc.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/pcbc.ko': No space left on device
INSTALL crypto/pcrypt.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/pcrypt.ko': No space left on device
INSTALL crypto/poly1305_generic.ko
cp: error writing '/tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/poly1305_generic.ko': No space left on device
At main.c:356:
- SSL error:0200101C:system library:fopen:No space left on device: bss_file.c:175
- SSL error:2006D002:BIO routines:BIO_new_file:system lib: bss_file.c:180
sign-file: /tmp/tmp.1aUumDy9it/lib/modules/4.15.0+/kernel/crypto/poly1305_generic.ko.~signed~: No space left on device
scripts/Makefile.modinst:36: recipe for target 'crypto/poly1305_generic.ko' failed
make[1]: *** [crypto/poly1305_generic.ko] Error 1
Makefile:1235: recipe for target '_modinst_' failed
It seems there are too many modules that are getting copied to the virtual machine and the virtual machine has only 50 MB.
Is there a way to deactivate the installation of these modules on the virtual machine?
$ make boot
mkdir /tmp/tmp.d5BYbqHJg6
sudo mount -t ext4 -o loop core-image-minimal-qemux86.ext4 /tmp/tmp.d5BYbqHJg6
sudo make -C /home/coolder/Git/linux modules_install INSTALL_MOD_PATH=/tmp/tmp.d5BYbqHJg6
make: Entering directory '/home/coolder/Git/linux'
INSTALL crypto/crypto_engine.ko
INSTALL drivers/crypto/virtio/virtio_crypto.ko
INSTALL drivers/net/netconsole.ko
DEPMOD 4.19.0+
make: Leaving directory '/home/coolder/Git/linux'
sudo umount /tmp/tmp.d5BYbqHJg6
rmdir /tmp/tmp.d5BYbqHJg6
sleep 1 && touch .modinst
qemu/create_net.sh tap0
dnsmasq: failed to create listening socket for 172.213.0.1: Address already in use
qemu/create_net.sh tap1
dnsmasq: failed to create listening socket for 127.0.0.1: Address already in use
/home/coolder/Git/linux/tools/labs/templates/assignments/6-e100/nttcp -v -i &
nttcp-l: nttcp, version 1.47
nttcp-l: running in inetd mode on port 5037 - ignoring options beside -v and -p
bind: Address already in use
nttcp-l: service-socket: bind:: Address already in use, errno=98
When I try to connect to it, I got, nothing happens next.
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on May 3 2018, 15:20:11.
Port serial.pts, 02:47:06
Press CTRL-A Z for help on special keys
rather than
$ minicom -D serial.pts
Poky (Yocto Project Reference Distro) 2.3 qemux86 /dev/hvc0
qemux86 login: root
root@qemux86:~#
I receive the following error on my Macbook.
make docs
make: realpath: Command not found
make: realpath: Command not found
make: realpath: Command not found
make: realpath: Command not found
make: realpath: Command not found
make: realpath: Command not found
make: realpath: Command not found
make: realpath: Command not found
/Library/Developer/CommandLineTools/usr/bin/make -C DOCBOOKS= SPHINXDIRS=labs htmldocs
make: *** DOCBOOKS=: No such file or directory. Stop.
make: *** [docs] Error 2
Add some separators to make it easier to see what courses are and which are labs.
https://linux-kernel-labs.github.io/refs/heads/master/labs/arm_kernel_development.html#rootfs
$ cd tools/labs/
$ ARCH=arm make core-image-minimal-qemuarm.ext4
It seems this code should be run inside the cloned version of this project. But it doesn't describe this in the article from the website.
student@eg106:~/so2/linux/tools/labs$ QEMU_DISPLAY=sdl make boot
mkdir /tmp/tmp.OGk8onAW85
sudo mount -t ext4 -o loop core-image-minimal-qemux86.ext4 /tmp/tmp.OGk8onAW85
sudo make -C /home/student/so2/linux modules_install INSTALL_MOD_PATH=/tmp/tmp.OGk8onAW85
make: Entering directory '/home/student/so2/linux'
INSTALL crypto/authenc.ko
INSTALL crypto/authencesn.ko
INSTALL crypto/crypto_engine.ko
INSTALL drivers/crypto/virtio/virtio_crypto.ko
DEPMOD 4.15.0+
depmod: FATAL: renameat(/tmp/tmp.OGk8onAW85/lib/modules/4.15.0+, modules.dep.tmp, /tmp/tmp.OGk8onAW85/lib/modules/4.15.0+, modules.dep): Structure needs cleaning
Makefile:1252: recipe for target '_modinst_post' failed
make: *** [_modinst_post] Error 1
make: Leaving directory '/home/student/so2/linux'
qemu/Makefile:40: recipe for target '.modinst' failed
make: *** [.modinst] Error 2
There is no documentation on how to use and update the tools/labs/qemu/kernel_config.x86
file. Document the use of make olddefconfig
and make savedefconfig
.
I'm following along with the "Kernel Modules" lab and whenever I try to load the hello_mod.ko
module I get the following error:
hello_mod: loading out-of-tree module taints kernel
The output of lsmod
is:
Tainted: G
hello_mod 16384 0 - Live 0xc884b000 (O)
And it looks like Hello!
and Goodbye!
are never actually printed to the syslog.
Any suggestions?
Hi,
First I want to tell that I thank you for the great document very very much.
I have a question about the ram-disk example.
When the user application opens a block file, I think the buffer-cache works between the driver and filesystem.
So I ran the ram-disk-test program without solving TODO 3.
Below is what I got when running ram-disk-test program without solving TODO 3.
What I guess:
/ # ./ramdisktest
insmod ./ram-disk.ko
mknod /dev/myblock b 240 0
mknod: /dev/myblock: File exists
[ 29.347210] my_block_open
use normal io
[ 29.349346] req: start=0 tsize=4096 dsize=4096 dir=read
[ 29.352516] bio: sector=0 offset=0, len=4096 dir=read
[ 29.354854] req: start=0 tsize=4096 dsize=4096 dir=write
[ 29.355560] bio: sector=0 offset=0, len=4096 dir=write
[ 29.356199] req: start=0 tsize=4096 dsize=4096 dir=write
test sector 0 [ 29.356864] bio: sector=0 offset=0, len=4096 dir=write
... passed
test sector 1 [ 29.357781] req: start=0 tsize=4096 dsize=4096 dir=write
... passed
[ 29.358652] bio: sector=0 offset=0, len=4096 dir=write
[ 29.359513] req: start=0 tsize=4096 dsize=4096 dir=write
test sector 2 [ 29.360191] bio: sector=0 offset=0, len=4096 dir=write
... passed
test sector 3 [ 29.361177] req: start=0 tsize=4096 dsize=4096 dir=write
... passed
[ 29.362016] bio: sector=0 offset=0, len=4096 dir=write
[ 29.362833] req: start=0 tsize=4096 dsize=4096 dir=write
test sector 4 [ 29.363529] bio: sector=0 offset=0, len=4096 dir=write
... passed
test sector 5 [ 29.364518] req: start=0 tsize=4096 dsize=4096 dir=write
... passed
[ 29.365369] bio: sector=0 offset=0, len=4096 dir=write
test sector 6 [ 29.366223] req: start=0 tsize=4096 dsize=4096 dir=write
... passed
[ 29.367067] bio: sector=0 offset=0, len=4096 dir=write
test sector 7 [ 29.367891] req: start=8 tsize=4096 dsize=4096 dir=read
... passed
[ 29.368737] bio: sector=8 offset=0, len=4096 dir=read
[ 29.369566] req: start=8 tsize=4096 dsize=4096 dir=write
[ 29.370235] bio: sector=8 offset=0, len=4096 dir=write
[ 29.370911] req: start=8 tsize=4096 dsize=4096 dir=write
test sector 8 [ 29.371590] bio: sector=8 offset=0, len=4096 dir=write
... passed
test sector 9 [ 29.372584] req: start=8 tsize=4096 dsize=4096 dir=write
... passed
[ 29.373435] bio: sector=8 offset=0, len=4096 dir=write
[ 29.374365] req: start=8 tsize=4096 dsize=4096 dir=write
test sector 10 [ 29.375054] bio: sector=8 offset=0, len=4096 dir=write
... passed
test sector 11 [ 29.376050] req: start=8 tsize=4096 dsize=4096 dir=write
... passed
[ 29.376917] bio: sector=8 offset=0, len=4096 dir=write
[ 29.377724] req: start=8 tsize=4096 dsize=4096 dir=write
test sector 12 [ 29.378405] bio: sector=8 offset=0, len=4096 dir=write
... passed
test sector 13 [ 29.379435] req: start=8 tsize=4096 dsize=4096 dir=write
... passed
[ 29.380260] bio: sector=8 offset=0, len=4096 dir=write
[ 29.381078] req: start=8 tsize=4096 dsize=4096 dir=write
test sector 14 [ 29.381764] bio: sector=8 offset=0, len=4096 dir=write
... passed
test sector 15 [ 29.382768] req: start=16 tsize=4096 dsize=4096 dir=read
... passed
.............................. skip..................
Therefore I guess the ram-disk-test program needs to use O_DIRECT flag.
So I re-build it with O_DIRECT flag.
Below is what I got.
/ # ./ramdisktest d
insmod ./ram-disk.ko
[ 4.929450] ram_disk: loading out-of-tree module taints kernel.
mknod /dev/myblock b 240 0
[ 6.985266] my_block_open
use direct io
test sector 0 ... failed
test sector 1 ... failed
test sector 2 ... failed
test sector 3 ... failed
test sector 4 ... failed
test sector 5 ... failed
test sector 6 ... failed
test sector 7 ... failed
test sector 8 ... failed
..........................................skip.......................
I don't understand why the driver did nothing when using O_DIRECT flag.
Here I attached ram-disk-test program code and ram-disk driver code.
Could you please inform me what I did wrong?
And please inform me whether the user application needs O_DIRECT flag or not.
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <time.h>
#include <errno.h>
#define NR_SECTORS 128
#define SECTOR_SIZE 512
#define DEVICE_NAME "/dev/myblock"
#define MODULE_NAME "ram-disk"
#define MY_BLOCK_MAJOR "240"
#define MY_BLOCK_MINOR "0"
#define max_elem_value(elem) (1 << 8 * sizeof(elem))
static unsigned char buffer[SECTOR_SIZE];
static unsigned char buffer_copy[SECTOR_SIZE];
static void test_sector(int fd, size_t sector)
{
int i;
for (i = 0; i < sizeof(buffer) / sizeof(buffer[0]); i++)
buffer[i] = rand() % max_elem_value(buffer[0]);
printf("test sector %3d ... ", sector);
lseek(fd, sector * SECTOR_SIZE, SEEK_SET);
write(fd, buffer, sizeof(buffer));
fsync(fd);
lseek(fd, sector * SECTOR_SIZE, SEEK_SET);
read(fd, buffer_copy, sizeof(buffer_copy));
if (memcmp(buffer, buffer_copy, sizeof(buffer_copy)) == 0)
printf("passed\n");
else
printf("failed\n");
}
int main(int argc, char **argv)
{
int fd;
size_t i;
int back_errno;
printf("insmod ./" MODULE_NAME ".ko\n");
if (system("insmod ./" MODULE_NAME ".ko\n")) {
fprintf(stderr, "insmod failed\n");
exit(EXIT_FAILURE);
}
sleep(1);
printf("mknod " DEVICE_NAME " b " MY_BLOCK_MAJOR " " MY_BLOCK_MINOR
"\n");
system("mknod " DEVICE_NAME " b " MY_BLOCK_MAJOR " " MY_BLOCK_MINOR
"\n");
sleep(1);
if (argc == 2 && argv[1][0] == 'd') {
printf("use direct io\n");
fd = open(DEVICE_NAME, O_RDWR | O_DIRECT | O_SYNC);
} else {
printf("use normal io\n");
fd = open(DEVICE_NAME, O_RDWR);
}
if (fd < 0) {
back_errno = errno;
perror("open");
fprintf(stderr, "errno is %d\n", back_errno);
exit(EXIT_FAILURE);
}
srand(time(NULL));
for (i = 0; i < NR_SECTORS; i++)
test_sector(fd, i);
close(fd);
sleep(1);
printf("rmmod " MODULE_NAME "\n");
system("rmmod " MODULE_NAME "\n");
return 0;
}
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/genhd.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/blk_types.h>
#include <linux/blkdev.h>
#include <linux/blk-mq.h>
#include <linux/bio.h>
#include <linux/vmalloc.h>
MODULE_DESCRIPTION("Simple RAM Disk");
MODULE_AUTHOR("SO2");
MODULE_LICENSE("GPL");
#define KERN_LOG_LEVEL KERN_ALERT
#define MY_BLOCK_MAJOR 240
#define MY_BLKDEV_NAME "mybdev"
#define MY_BLOCK_MINORS 1
#define NR_SECTORS 128
#define KERNEL_SECTOR_SIZE 512
/* TODO 6: use bios for read/write requests */
#define USE_BIO_TRANSFER 0
static struct my_block_dev {
struct blk_mq_tag_set tag_set;
struct request_queue *queue;
struct gendisk *gd;
u8 *data;
size_t size;
} g_dev;
static int my_block_open(struct block_device *bdev, fmode_t mode)
{
pr_info("my_block_open\n");
return 0;
}
static void my_block_release(struct gendisk *gd, fmode_t mode)
{
pr_info("my_block_release\n");
}
static const struct block_device_operations my_block_ops = {
.owner = THIS_MODULE,
.open = my_block_open,
.release = my_block_release
};
static void my_block_transfer(struct my_block_dev *dev, sector_t sector,
unsigned long len, char *buffer, int dir)
{
unsigned long offset = sector * KERNEL_SECTOR_SIZE;
/* check for read/write beyond end of block device */
if ((offset + len) > dev->size)
return;
/* TODO 3: read/write to dev buffer depending on dir */
if (dir == WRITE) {
memcpy(dev->data + offset, buffer, len);
} else {
memcpy(buffer, dev->data + offset, len);
}
}
/* to transfer data using bio structures enable USE_BIO_TRANFER */
#if USE_BIO_TRANSFER == 1
static void my_xfer_request(struct my_block_dev *dev, struct request *req)
{
/* TODO 6: iterate segments */
/* TODO 6: copy bio data to device buffer */
}
#endif
static blk_status_t my_block_request(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{
struct request *rq;
struct my_block_dev *dev = hctx->queue->queuedata;
struct bio_vec bvec;
struct req_iterator iter;
/* TODO 2: get pointer to request */
rq = bd->rq;
/* TODO 2: start request processing. */
blk_mq_start_request(rq);
/* TODO 2: check fs request. Return if passthrough. */
if (blk_rq_is_passthrough(rq)) {
pr_info("passthrough request\n");
blk_mq_end_request(rq, BLK_STS_IOERR);
goto out;
}
/* TODO 2: print request information */
pr_info("req: start=%llu tsize=%u dsize=%u dir=%s\n", blk_rq_pos(rq),
blk_rq_bytes(rq), blk_rq_cur_bytes(rq),
rq_data_dir(rq) == WRITE ? "write" : "read");
#if USE_BIO_TRANSFER == 1
/* TODO 6: process the request by calling my_xfer_request */
#else
/* TODO 3: process the request by calling my_block_transfer */
rq_for_each_segment (bvec, rq, iter) {
sector_t sector = iter.iter.bi_sector;
char *buf = kmap_atomic(bvec.bv_page);
unsigned long offset = bvec.bv_offset;
size_t len = bvec.bv_len;
int dir = bio_data_dir(iter.bio);
pr_info("bio: sector=%d offset=%d, len=%d dir=%s\n",
(int)sector, (int)offset, (int)len,
dir == WRITE ? "write" : "read");
//my_block_transfer(dev, sector, len, buf + offset, dir);
kunmap_atomic(buf);
}
#endif
/* TODO 2: end request successfully */
blk_mq_end_request(rq, BLK_STS_OK);
out:
return BLK_STS_OK;
}
static struct blk_mq_ops my_queue_ops = {
.queue_rq = my_block_request,
};
static int create_block_device(struct my_block_dev *dev)
{
int err;
dev->size = NR_SECTORS * KERNEL_SECTOR_SIZE;
dev->data = vmalloc(dev->size);
if (dev->data == NULL) {
printk(KERN_ERR "vmalloc: out of memory\n");
err = -ENOMEM;
goto out_vmalloc;
}
/* Initialize tag set. */
dev->tag_set.ops = &my_queue_ops;
dev->tag_set.nr_hw_queues = 1;
dev->tag_set.queue_depth = 128;
dev->tag_set.numa_node = NUMA_NO_NODE;
dev->tag_set.cmd_size = 0;
dev->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
err = blk_mq_alloc_tag_set(&dev->tag_set);
if (err) {
printk(KERN_ERR
"blk_mq_alloc_tag_set: can't allocate tag set\n");
goto out_alloc_tag_set;
}
/* Allocate queue. */
dev->queue = blk_mq_init_queue(&dev->tag_set);
if (IS_ERR(dev->queue)) {
printk(KERN_ERR "blk_mq_init_queue: out of memory\n");
err = -ENOMEM;
goto out_blk_init;
}
blk_queue_logical_block_size(dev->queue, KERNEL_SECTOR_SIZE);
dev->queue->queuedata = dev;
/* initialize the gendisk structure */
dev->gd = alloc_disk(MY_BLOCK_MINORS);
if (!dev->gd) {
printk(KERN_ERR "alloc_disk: failure\n");
err = -ENOMEM;
goto out_alloc_disk;
}
dev->gd->major = MY_BLOCK_MAJOR;
dev->gd->first_minor = 0;
dev->gd->fops = &my_block_ops;
dev->gd->queue = dev->queue;
dev->gd->private_data = dev;
snprintf(dev->gd->disk_name, DISK_NAME_LEN, "myblock");
set_capacity(dev->gd, NR_SECTORS);
add_disk(dev->gd);
return 0;
out_alloc_disk:
blk_cleanup_queue(dev->queue);
out_blk_init:
blk_mq_free_tag_set(&dev->tag_set);
out_alloc_tag_set:
vfree(dev->data);
out_vmalloc:
return err;
}
static int __init my_block_init(void)
{
int err = 0;
/* TODO 1: register block device */
err = register_blkdev(MY_BLOCK_MAJOR, MY_BLKDEV_NAME);
if (err < 0) {
pr_err("fail register\n");
return -EINVAL;
}
/* TODO 2: create block device using create_block_device */
err = create_block_device(&g_dev);
return 0;
out:
/* TODO 2: unregister block device in case of an error */
unregister_blkdev(MY_BLOCK_MAJOR, MY_BLKDEV_NAME);
return err;
}
static void delete_block_device(struct my_block_dev *dev)
{
if (dev->gd) {
del_gendisk(dev->gd);
put_disk(dev->gd);
}
if (dev->queue)
blk_cleanup_queue(dev->queue);
if (dev->tag_set.tags)
blk_mq_free_tag_set(&dev->tag_set);
if (dev->data)
vfree(dev->data);
}
static void __exit my_block_exit(void)
{
/* TODO 2: cleanup block device using delete_block_device */
delete_block_device(&g_dev);
/* TODO 1: unregister block device */
unregister_blkdev(MY_BLOCK_MAJOR, MY_BLKDEV_NAME);
}
module_init(my_block_init);
module_exit(my_block_exit);
Create a guideline to contribute to Linux kernel labs: correct errors, add content, use the GitHub fork-based workflow.
I happen to meet this error when running lx-ps
inside gdb
.
Traceback (most recent call last):
File "/home/pilot/codes/linux/scripts/gdb/linux/tasks.py", line 79, in invoke
task.format_string().split()[0],
AttributeError: 'gdb.Value' object has no attribute 'format_string'
Error occurred in Python command: 'gdb.Value' object has no attribute 'format_string'
I solved this error by modifying the code like this:
--- a/scripts/gdb/linux/tasks.py
+++ b/scripts/gdb/linux/tasks.py
@@ -76,9 +76,9 @@ class LxPs(gdb.Command):
gdb.write("{:>10} {:>12} {:>7}\n".format("TASK", "PID", "COMM"))
for task in task_lists():
gdb.write("{} {:^5} {}\n".format(
- task.format_string().split()[0],
- task["pid"].format_string(),
- task["comm"].string()))
+ str(task).split()[0],
+ str(task["pid"]),
+ str(task["comm"].string())))
Hope to help others.
There are multiple png images in the labs containing diagrams that can be converted to ditaa.
As suggested by Tavi: "We can use http://asciiflow.com/ to start the skeleton for the ascii diagrams."
The script generate_skels.py for make skels does't copy all required files for assignment 2-uart:
assignments/2-uart/checker/_test/solution.ko should be copied in skels but is not and one is not able to compile homework and check it locally.
LABS=assignments/2-uart make skels
make build
make[1]: *** No rule to make target '_test/solution.ko', needed by 'solution.ko'. Stop.
Off-topic: why assignments/2-uart/checker/_test/solution.ko source code is not public? or if it is public, where is the code?
Thank you
When building modules in the tools/labs/
infrastructure, the following non-critical error message is output:
dirname: missing operand
Try 'dirname --help' for more information.
Update build infrastructure to prevent the message from being displayed.
Is there a documentation available for other architecures than x86?
I tried to create a boot image for powerpc but it failed.
After "make boot ARCH=powerpc" I got:
gcc: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
gcc: error: unrecognized command line option ‘-mmultiple’; did you mean ‘-imultilib’?
@Sergiu121 It looks like Github Actions switched from Ubuntu 18.04 to 20.04 and now Documentation build fails:
For the same PR,
@Sergiu121 @tavip can you have a look if you have some time? As an workaround we could instruct Github Workflow to use Ubuntu 18.04
fatal error: asm/errno.h: No such file or directory
In "1. Displaying packets in kernel space" exercise, there is a sentence: "The diagram explains how to make a TCP connection."
That link is broken.
It is confusing that make clean
deletes the entire skels
folder and not just kernel modules/object files as it would seem more natural to do.
Maybe the current clean
rule should be named clean-skels
and the a new clean
rule should be added that removes every file that make build
created.
I ran those:
$ sudo apt update
$ sudo apt install -y flex bison build-essential gcc-multilib libncurses5-dev qemu-system-x86 qemu-system-arm qemu-kvm python3 minicom
$ git clone https://github.com/linux-kernel-labs/linux --depth 1
$ cd linux/tools/labs
$ make boot
which printed:
cp qemu/kernel_config.x86 /home/mahmoud/dev/linux/.config
make -C /home/mahmoud/dev/linux oldnoconfig
make[1]: Entering directory '/home/mahmoud/dev/linux'
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --olddefconfig Kconfig
#
# configuration written to .config
#
WARNING: "oldnoconfig" target will be removed after Linux 4.19
Please use "olddefconfig" instead, which is an alias.
make[1]: Leaving directory '/home/mahmoud/dev/linux'
make -C /home/mahmoud/dev/linux
make[1]: Entering directory '/home/mahmoud/dev/linux'
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
UPD include/config/kernel.release
WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h
WRAP arch/x86/include/generated/uapi/asm/poll.h
WRAP arch/x86/include/generated/asm/dma-contiguous.h
WRAP arch/x86/include/generated/asm/early_ioremap.h
WRAP arch/x86/include/generated/asm/export.h
WRAP arch/x86/include/generated/asm/mcs_spinlock.h
WRAP arch/x86/include/generated/asm/mm-arch-hooks.h
UPD include/generated/uapi/linux/version.h
UPD include/generated/utsrelease.h
UPD include/generated/timeconst.h
CC kernel/bounds.s
In file included from ./include/asm-generic/bug.h:5,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/compiler.h: In function ‘__read_once_size’:
./include/linux/compiler.h:187:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
187 | {
| ^
./include/linux/compiler.h: In function ‘__read_once_size_nocheck’:
./include/linux/compiler.h:205:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
205 | {
| ^
./include/linux/compiler.h: In function ‘__write_once_size’:
./include/linux/compiler.h:210:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
210 | {
| ^
In file included from ./include/linux/compiler.h:245,
from ./include/asm-generic/bug.h:5,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./arch/x86/include/asm/barrier.h: In function ‘array_index_mask_nospec’:
./arch/x86/include/asm/barrier.h:38:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
38 | {
| ^
In file included from ./include/linux/compiler.h:246,
from ./include/asm-generic/bug.h:5,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/kasan-checks.h: In function ‘kasan_check_read’:
./include/linux/kasan-checks.h:10:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
10 | { }
| ^
./include/linux/kasan-checks.h: In function ‘kasan_check_write’:
./include/linux/kasan-checks.h:12:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
12 | { }
| ^
In file included from ./include/asm-generic/bug.h:5,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/compiler.h: In function ‘read_word_at_a_time’:
./include/linux/compiler.h:268:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
268 | {
| ^
./include/linux/compiler.h: In function ‘offset_to_ptr’:
./include/linux/compiler.h:298:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
298 | {
| ^
In file included from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./arch/x86/include/asm/bitops.h: In function ‘set_bit’:
./arch/x86/include/asm/bitops.h:74:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
74 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__set_bit’:
./arch/x86/include/asm/bitops.h:96:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
96 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘clear_bit’:
./arch/x86/include/asm/bitops.h:112:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
112 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘clear_bit_unlock’:
./arch/x86/include/asm/bitops.h:133:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
133 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__clear_bit’:
./arch/x86/include/asm/bitops.h:139:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
139 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘clear_bit_unlock_is_negative_byte’:
./arch/x86/include/asm/bitops.h:144:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
144 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__clear_bit_unlock’:
./arch/x86/include/asm/bitops.h:169:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
169 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__change_bit’:
./arch/x86/include/asm/bitops.h:184:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
184 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘change_bit’:
./arch/x86/include/asm/bitops.h:198:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
198 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘test_and_set_bit’:
./arch/x86/include/asm/bitops.h:219:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
219 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘test_and_set_bit_lock’:
./arch/x86/include/asm/bitops.h:233:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
233 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__test_and_set_bit’:
./arch/x86/include/asm/bitops.h:247:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
247 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘test_and_clear_bit’:
./arch/x86/include/asm/bitops.h:266:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
266 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__test_and_clear_bit’:
./arch/x86/include/asm/bitops.h:288:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
288 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__test_and_change_bit’:
./arch/x86/include/asm/bitops.h:300:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
300 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘test_and_change_bit’:
./arch/x86/include/asm/bitops.h:320:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
320 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘constant_test_bit’:
./arch/x86/include/asm/bitops.h:326:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
326 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘variable_test_bit’:
./arch/x86/include/asm/bitops.h:332:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
332 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__ffs’:
./arch/x86/include/asm/bitops.h:364:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
364 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘ffz’:
./arch/x86/include/asm/bitops.h:378:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
378 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘__fls’:
./arch/x86/include/asm/bitops.h:392:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
392 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘ffs’:
./arch/x86/include/asm/bitops.h:414:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
414 | {
| ^
./arch/x86/include/asm/bitops.h: In function ‘fls’:
./arch/x86/include/asm/bitops.h:455:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
455 | {
| ^
In file included from ./arch/x86/include/asm/bitops.h:510,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/asm-generic/bitops/fls64.h: In function ‘fls64’:
./include/asm-generic/bitops/fls64.h:20:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
20 | {
| ^
In file included from ./arch/x86/include/asm/bitops.h:515,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/asm-generic/bitops/sched.h: In function ‘sched_find_first_bit’:
./include/asm-generic/bitops/sched.h:14:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
14 | {
| ^
In file included from ./arch/x86/include/asm/bitops.h:517,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./arch/x86/include/asm/arch_hweight.h: In function ‘__arch_hweight32’:
./arch/x86/include/asm/arch_hweight.h:24:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
24 | {
| ^
./arch/x86/include/asm/arch_hweight.h: In function ‘__arch_hweight16’:
./arch/x86/include/asm/arch_hweight.h:35:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
35 | {
| ^
./arch/x86/include/asm/arch_hweight.h: In function ‘__arch_hweight8’:
./arch/x86/include/asm/arch_hweight.h:40:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
40 | {
| ^
./arch/x86/include/asm/arch_hweight.h: In function ‘__arch_hweight64’:
./arch/x86/include/asm/arch_hweight.h:46:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
46 | {
| ^
In file included from ./include/uapi/linux/swab.h:7,
from ./include/linux/swab.h:5,
from ./include/uapi/linux/byteorder/little_endian.h:13,
from ./include/linux/byteorder/little_endian.h:5,
from ./arch/x86/include/uapi/asm/byteorder.h:5,
from ./include/asm-generic/bitops/le.h:6,
from ./arch/x86/include/asm/bitops.h:521,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./arch/x86/include/uapi/asm/swab.h: In function ‘__arch_swab32’:
./arch/x86/include/uapi/asm/swab.h:9:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
9 | {
| ^
./arch/x86/include/uapi/asm/swab.h: In function ‘__arch_swab64’:
./arch/x86/include/uapi/asm/swab.h:16:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
16 | {
| ^
In file included from ./include/linux/swab.h:5,
from ./include/uapi/linux/byteorder/little_endian.h:13,
from ./include/linux/byteorder/little_endian.h:5,
from ./arch/x86/include/uapi/asm/byteorder.h:5,
from ./include/asm-generic/bitops/le.h:6,
from ./arch/x86/include/asm/bitops.h:521,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/uapi/linux/swab.h: In function ‘__fswab16’:
./include/uapi/linux/swab.h:48:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
48 | {
| ^
./include/uapi/linux/swab.h: In function ‘__fswab32’:
./include/uapi/linux/swab.h:57:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
57 | {
| ^
./include/uapi/linux/swab.h: In function ‘__fswab64’:
./include/uapi/linux/swab.h:66:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
66 | {
| ^
./include/uapi/linux/swab.h: In function ‘__fswahw32’:
./include/uapi/linux/swab.h:79:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
79 | {
| ^
./include/uapi/linux/swab.h: In function ‘__fswahb32’:
./include/uapi/linux/swab.h:88:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
88 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swab16p’:
./include/uapi/linux/swab.h:162:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
162 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swab32p’:
./include/uapi/linux/swab.h:175:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
175 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swab64p’:
./include/uapi/linux/swab.h:188:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
188 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swahw32p’:
./include/uapi/linux/swab.h:203:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
203 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swahb32p’:
./include/uapi/linux/swab.h:218:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
218 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swab16s’:
./include/uapi/linux/swab.h:231:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
231 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swab32s’:
./include/uapi/linux/swab.h:243:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
243 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swab64s’:
./include/uapi/linux/swab.h:256:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
256 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swahw32s’:
./include/uapi/linux/swab.h:271:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
271 | {
| ^
./include/uapi/linux/swab.h: In function ‘__swahb32s’:
./include/uapi/linux/swab.h:286:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
286 | {
| ^
In file included from ./include/linux/byteorder/little_endian.h:5,
from ./arch/x86/include/uapi/asm/byteorder.h:5,
from ./include/asm-generic/bitops/le.h:6,
from ./arch/x86/include/asm/bitops.h:521,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/uapi/linux/byteorder/little_endian.h: In function ‘__cpu_to_le64p’:
./include/uapi/linux/byteorder/little_endian.h:45:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
45 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__le64_to_cpup’:
./include/uapi/linux/byteorder/little_endian.h:49:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
49 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__cpu_to_le32p’:
./include/uapi/linux/byteorder/little_endian.h:53:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
53 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__le32_to_cpup’:
./include/uapi/linux/byteorder/little_endian.h:57:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
57 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__cpu_to_le16p’:
./include/uapi/linux/byteorder/little_endian.h:61:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
61 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__le16_to_cpup’:
./include/uapi/linux/byteorder/little_endian.h:65:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
65 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__cpu_to_be64p’:
./include/uapi/linux/byteorder/little_endian.h:69:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
69 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__be64_to_cpup’:
./include/uapi/linux/byteorder/little_endian.h:73:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
73 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__cpu_to_be32p’:
./include/uapi/linux/byteorder/little_endian.h:77:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
77 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__be32_to_cpup’:
./include/uapi/linux/byteorder/little_endian.h:81:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
81 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__cpu_to_be16p’:
./include/uapi/linux/byteorder/little_endian.h:85:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
85 | {
| ^
./include/uapi/linux/byteorder/little_endian.h: In function ‘__be16_to_cpup’:
./include/uapi/linux/byteorder/little_endian.h:89:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
89 | {
| ^
In file included from ./include/linux/byteorder/little_endian.h:11,
from ./arch/x86/include/uapi/asm/byteorder.h:5,
from ./include/asm-generic/bitops/le.h:6,
from ./arch/x86/include/asm/bitops.h:521,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/byteorder/generic.h: In function ‘le16_add_cpu’:
./include/linux/byteorder/generic.h:145:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
145 | {
| ^
./include/linux/byteorder/generic.h: In function ‘le32_add_cpu’:
./include/linux/byteorder/generic.h:150:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
150 | {
| ^
./include/linux/byteorder/generic.h: In function ‘le64_add_cpu’:
./include/linux/byteorder/generic.h:155:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
155 | {
| ^
./include/linux/byteorder/generic.h: In function ‘le32_to_cpu_array’:
./include/linux/byteorder/generic.h:161:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
161 | {
| ^
./include/linux/byteorder/generic.h: In function ‘cpu_to_le32_array’:
./include/linux/byteorder/generic.h:169:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
169 | {
| ^
./include/linux/byteorder/generic.h: In function ‘be16_add_cpu’:
./include/linux/byteorder/generic.h:177:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
177 | {
| ^
./include/linux/byteorder/generic.h: In function ‘be32_add_cpu’:
./include/linux/byteorder/generic.h:182:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
182 | {
| ^
./include/linux/byteorder/generic.h: In function ‘be64_add_cpu’:
./include/linux/byteorder/generic.h:187:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
187 | {
| ^
./include/linux/byteorder/generic.h: In function ‘cpu_to_be32_array’:
./include/linux/byteorder/generic.h:192:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
192 | {
| ^
./include/linux/byteorder/generic.h: In function ‘be32_to_cpu_array’:
./include/linux/byteorder/generic.h:200:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
200 | {
| ^
In file included from ./arch/x86/include/asm/bitops.h:521,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/asm-generic/bitops/le.h: In function ‘find_next_zero_bit_le’:
./include/asm-generic/bitops/le.h:14:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
14 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘find_next_bit_le’:
./include/asm-generic/bitops/le.h:20:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
20 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘find_first_zero_bit_le’:
./include/asm-generic/bitops/le.h:26:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
26 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘test_bit_le’:
./include/asm-generic/bitops/le.h:54:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
54 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘set_bit_le’:
./include/asm-generic/bitops/le.h:59:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
59 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘clear_bit_le’:
./include/asm-generic/bitops/le.h:64:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
64 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘__set_bit_le’:
./include/asm-generic/bitops/le.h:69:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
69 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘__clear_bit_le’:
./include/asm-generic/bitops/le.h:74:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
74 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘test_and_set_bit_le’:
./include/asm-generic/bitops/le.h:79:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
79 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘test_and_clear_bit_le’:
./include/asm-generic/bitops/le.h:84:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
84 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘__test_and_set_bit_le’:
./include/asm-generic/bitops/le.h:89:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
89 | {
| ^
./include/asm-generic/bitops/le.h: In function ‘__test_and_clear_bit_le’:
./include/asm-generic/bitops/le.h:94:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
94 | {
| ^
In file included from ./include/linux/kernel.h:11,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/bitops.h: In function ‘get_bitmask_order’:
./include/linux/bitops.h:44:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
44 | {
| ^
./include/linux/bitops.h: In function ‘hweight_long’:
./include/linux/bitops.h:52:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
52 | {
| ^
./include/linux/bitops.h: In function ‘rol64’:
./include/linux/bitops.h:62:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
62 | {
| ^
./include/linux/bitops.h: In function ‘ror64’:
./include/linux/bitops.h:72:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
72 | {
| ^
./include/linux/bitops.h: In function ‘rol32’:
./include/linux/bitops.h:82:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
82 | {
| ^
./include/linux/bitops.h: In function ‘ror32’:
./include/linux/bitops.h:92:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
92 | {
| ^
./include/linux/bitops.h: In function ‘rol16’:
./include/linux/bitops.h:102:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
102 | {
| ^
./include/linux/bitops.h: In function ‘ror16’:
./include/linux/bitops.h:112:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
112 | {
| ^
./include/linux/bitops.h: In function ‘rol8’:
./include/linux/bitops.h:122:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
122 | {
| ^
./include/linux/bitops.h: In function ‘ror8’:
./include/linux/bitops.h:132:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
132 | {
| ^
./include/linux/bitops.h: In function ‘sign_extend32’:
./include/linux/bitops.h:144:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
144 | {
| ^
./include/linux/bitops.h: In function ‘sign_extend64’:
./include/linux/bitops.h:155:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
155 | {
| ^
./include/linux/bitops.h: In function ‘fls_long’:
./include/linux/bitops.h:161:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
161 | {
| ^
./include/linux/bitops.h: In function ‘get_count_order’:
./include/linux/bitops.h:168:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
168 | {
| ^
./include/linux/bitops.h: In function ‘get_count_order_long’:
./include/linux/bitops.h:184:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
184 | {
| ^
./include/linux/bitops.h: In function ‘__ffs64’:
./include/linux/bitops.h:202:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
202 | {
| ^
./include/linux/bitops.h: In function ‘assign_bit’:
./include/linux/bitops.h:220:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
220 | {
| ^
./include/linux/bitops.h: In function ‘__assign_bit’:
./include/linux/bitops.h:229:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
229 | {
| ^
In file included from ./include/linux/kernel.h:12,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/log2.h: In function ‘__ilog2_u32’:
./include/linux/log2.h:27:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
27 | {
| ^
./include/linux/log2.h: In function ‘__ilog2_u64’:
./include/linux/log2.h:35:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
35 | {
| ^
./include/linux/log2.h: In function ‘is_power_of_2’:
./include/linux/log2.h:50:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
50 | {
| ^
./include/linux/log2.h: In function ‘__roundup_pow_of_two’:
./include/linux/log2.h:60:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
60 | {
| ^
./include/linux/log2.h: In function ‘__rounddown_pow_of_two’:
./include/linux/log2.h:70:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
70 | {
| ^
./include/linux/log2.h: In function ‘__order_base_2’:
./include/linux/log2.h:203:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
203 | {
| ^
In file included from ./include/linux/printk.h:6,
from ./include/linux/kernel.h:14,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/init.h: In function ‘initcall_from_entry’:
./include/linux/init.h:123:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
123 | {
| ^
In file included from ./include/linux/kernel.h:14,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/printk.h: In function ‘printk_get_level’:
./include/linux/printk.h:17:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
17 | {
| ^
./include/linux/printk.h: In function ‘printk_skip_level’:
./include/linux/printk.h:30:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
30 | {
| ^
./include/linux/printk.h: In function ‘printk_skip_headers’:
./include/linux/printk.h:38:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
38 | {
| ^
./include/linux/printk.h: In function ‘console_silent’:
./include/linux/printk.h:71:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
71 | {
| ^
./include/linux/printk.h: In function ‘console_verbose’:
./include/linux/printk.h:76:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
76 | {
| ^
./include/linux/printk.h: In function ‘print_hex_dump_debug’:
./include/linux/printk.h:529:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
529 | {
| ^
In file included from ./include/linux/kernel.h:207,
from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./arch/x86/include/asm/div64.h: In function ‘div_u64_rem’:
./arch/x86/include/asm/div64.h:44:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
44 | {
| ^
./arch/x86/include/asm/div64.h: In function ‘mul_u32_u32’:
./arch/x86/include/asm/div64.h:64:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
64 | {
| ^
In file included from ./include/asm-generic/bug.h:18,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/kernel.h: In function ‘reciprocal_scale’:
./include/linux/kernel.h:312:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
312 | {
| ^
./include/linux/kernel.h: In function ‘kstrtoul’:
./include/linux/kernel.h:367:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
367 | {
| ^
./include/linux/kernel.h: In function ‘kstrtol’:
./include/linux/kernel.h:396:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
396 | {
| ^
./include/linux/kernel.h: In function ‘kstrtou64’:
./include/linux/kernel.h:412:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
412 | {
| ^
./include/linux/kernel.h: In function ‘kstrtos64’:
./include/linux/kernel.h:417:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
417 | {
| ^
./include/linux/kernel.h: In function ‘kstrtou32’:
./include/linux/kernel.h:422:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
422 | {
| ^
./include/linux/kernel.h: In function ‘kstrtos32’:
./include/linux/kernel.h:427:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
427 | {
| ^
./include/linux/kernel.h: In function ‘kstrtou64_from_user’:
./include/linux/kernel.h:450:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
450 | {
| ^
./include/linux/kernel.h: In function ‘kstrtos64_from_user’:
./include/linux/kernel.h:455:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
455 | {
| ^
./include/linux/kernel.h: In function ‘kstrtou32_from_user’:
./include/linux/kernel.h:460:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
460 | {
| ^
./include/linux/kernel.h: In function ‘kstrtos32_from_user’:
./include/linux/kernel.h:465:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
465 | {
| ^
./include/linux/kernel.h: In function ‘set_arch_panic_timeout’:
./include/linux/kernel.h:552:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
552 | {
| ^
./include/linux/kernel.h: In function ‘hex_byte_pack’:
./include/linux/kernel.h:616:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
616 | {
| ^
./include/linux/kernel.h: In function ‘hex_byte_pack_upper’:
./include/linux/kernel.h:627:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
627 | {
| ^
./include/linux/kernel.h: In function ‘____trace_printk_check_format’:
./include/linux/kernel.h:677:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
677 | {
| ^
In file included from ./include/linux/page-flags.h:10,
from kernel/bounds.c:10:
./include/linux/bug.h: In function ‘is_warning_bug’:
./include/linux/bug.h:35:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
35 | {
| ^
./include/linux/bug.h: In function ‘check_data_corruption’:
./include/linux/bug.h:65:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
65 | static inline __must_check bool check_data_corruption(bool v) { return v; }
| ^~~~~~
In file included from ./arch/x86/include/asm/cmpxchg.h:143,
from ./arch/x86/include/asm/atomic.h:8,
from ./include/linux/atomic.h:7,
from ./include/asm-generic/qspinlock_types.h:28,
from ./arch/x86/include/asm/spinlock_types.h:27,
from ./include/linux/spinlock_types.h:13,
from kernel/bounds.c:14:
./arch/x86/include/asm/cmpxchg_32.h: In function ‘set_64bit’:
./arch/x86/include/asm/cmpxchg_32.h:25:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
25 | {
| ^
./arch/x86/include/asm/cmpxchg_32.h: In function ‘__cmpxchg64’:
./arch/x86/include/asm/cmpxchg_32.h:48:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
48 | {
| ^
./arch/x86/include/asm/cmpxchg_32.h: In function ‘__cmpxchg64_local’:
./arch/x86/include/asm/cmpxchg_32.h:61:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
61 | {
| ^
In file included from ./include/linux/atomic.h:7,
from ./include/asm-generic/qspinlock_types.h:28,
from ./arch/x86/include/asm/spinlock_types.h:27,
from ./include/linux/spinlock_types.h:13,
from kernel/bounds.c:14:
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_read’:
./arch/x86/include/asm/atomic.h:26:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
26 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_set’:
./arch/x86/include/asm/atomic.h:42:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
42 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_add’:
./arch/x86/include/asm/atomic.h:54:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
54 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_sub’:
./arch/x86/include/asm/atomic.h:68:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
68 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_sub_and_test’:
./arch/x86/include/asm/atomic.h:84:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
84 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_inc’:
./arch/x86/include/asm/atomic.h:96:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
96 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_dec’:
./arch/x86/include/asm/atomic.h:109:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
109 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_dec_and_test’:
./arch/x86/include/asm/atomic.h:124:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
124 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_inc_and_test’:
./arch/x86/include/asm/atomic.h:138:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
138 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_add_negative’:
./arch/x86/include/asm/atomic.h:153:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
153 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_add_return’:
./arch/x86/include/asm/atomic.h:166:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
166 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_sub_return’:
./arch/x86/include/asm/atomic.h:178:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
178 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_fetch_add’:
./arch/x86/include/asm/atomic.h:183:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
183 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_fetch_sub’:
./arch/x86/include/asm/atomic.h:188:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
188 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_cmpxchg’:
./arch/x86/include/asm/atomic.h:193:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
193 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_try_cmpxchg’:
./arch/x86/include/asm/atomic.h:199:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
199 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_xchg’:
./arch/x86/include/asm/atomic.h:204:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
204 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_and’:
./arch/x86/include/asm/atomic.h:209:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
209 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_fetch_and’:
./arch/x86/include/asm/atomic.h:217:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
217 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_or’:
./arch/x86/include/asm/atomic.h:226:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
226 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_fetch_or’:
./arch/x86/include/asm/atomic.h:234:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
234 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_xor’:
./arch/x86/include/asm/atomic.h:243:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
243 | {
| ^
./arch/x86/include/asm/atomic.h: In function ‘arch_atomic_fetch_xor’:
./arch/x86/include/asm/atomic.h:251:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
251 | {
| ^
In file included from ./arch/x86/include/asm/atomic.h:260,
from ./include/linux/atomic.h:7,
from ./include/asm-generic/qspinlock_types.h:28,
from ./arch/x86/include/asm/spinlock_types.h:27,
from ./include/linux/spinlock_types.h:13,
from kernel/bounds.c:14:
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_cmpxchg’:
./arch/x86/include/asm/atomic64_32.h:76:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
76 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_xchg’:
./arch/x86/include/asm/atomic64_32.h:89:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
89 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_set’:
./arch/x86/include/asm/atomic64_32.h:107:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
107 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_read’:
./arch/x86/include/asm/atomic64_32.h:122:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
122 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_add_return’:
./arch/x86/include/asm/atomic64_32.h:136:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
136 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_sub_return’:
./arch/x86/include/asm/atomic64_32.h:147:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
147 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_inc_return’:
./arch/x86/include/asm/atomic64_32.h:155:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
155 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_dec_return’:
./arch/x86/include/asm/atomic64_32.h:164:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
164 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_add’:
./arch/x86/include/asm/atomic64_32.h:180:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
180 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_sub’:
./arch/x86/include/asm/atomic64_32.h:195:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
195 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_inc’:
./arch/x86/include/asm/atomic64_32.h:209:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
209 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_dec’:
./arch/x86/include/asm/atomic64_32.h:222:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
222 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_add_unless’:
./arch/x86/include/asm/atomic64_32.h:239:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
239 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_inc_not_zero’:
./arch/x86/include/asm/atomic64_32.h:249:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
249 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_dec_if_positive’:
./arch/x86/include/asm/atomic64_32.h:258:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
258 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_and’:
./arch/x86/include/asm/atomic64_32.h:270:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
270 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_fetch_and’:
./arch/x86/include/asm/atomic64_32.h:278:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
278 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_or’:
./arch/x86/include/asm/atomic64_32.h:288:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
288 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_fetch_or’:
./arch/x86/include/asm/atomic64_32.h:296:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
296 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_xor’:
./arch/x86/include/asm/atomic64_32.h:306:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
306 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_fetch_xor’:
./arch/x86/include/asm/atomic64_32.h:314:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
314 | {
| ^
./arch/x86/include/asm/atomic64_32.h: In function ‘arch_atomic64_fetch_add’:
./arch/x86/include/asm/atomic64_32.h:324:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
324 | {
| ^
In file included from ./arch/x86/include/asm/atomic.h:265,
from ./include/linux/atomic.h:7,
from ./include/asm-generic/qspinlock_types.h:28,
from ./arch/x86/include/asm/spinlock_types.h:27,
from ./include/linux/spinlock_types.h:13,
from kernel/bounds.c:14:
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_read’:
./include/asm-generic/atomic-instrumented.h:20:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
20 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_read’:
./include/asm-generic/atomic-instrumented.h:26:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
26 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_set’:
./include/asm-generic/atomic-instrumented.h:32:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
32 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_set’:
./include/asm-generic/atomic-instrumented.h:38:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
38 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_xchg’:
./include/asm-generic/atomic-instrumented.h:44:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
44 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_xchg’:
./include/asm-generic/atomic-instrumented.h:50:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
50 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_cmpxchg’:
./include/asm-generic/atomic-instrumented.h:56:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
56 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_cmpxchg’:
./include/asm-generic/atomic-instrumented.h:62:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
62 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_try_cmpxchg’:
./include/asm-generic/atomic-instrumented.h:70:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
70 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_inc’:
./include/asm-generic/atomic-instrumented.h:108:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
108 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_inc’:
./include/asm-generic/atomic-instrumented.h:117:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
117 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_dec’:
./include/asm-generic/atomic-instrumented.h:126:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
126 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_add’:
./include/asm-generic/atomic-instrumented.h:142:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
142 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_add’:
./include/asm-generic/atomic-instrumented.h:148:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
148 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_sub’:
./include/asm-generic/atomic-instrumented.h:154:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
154 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_sub’:
./include/asm-generic/atomic-instrumented.h:160:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
160 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_and’:
./include/asm-generic/atomic-instrumented.h:166:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
166 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_and’:
./include/asm-generic/atomic-instrumented.h:172:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
172 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_or’:
./include/asm-generic/atomic-instrumented.h:178:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
178 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_or’:
./include/asm-generic/atomic-instrumented.h:184:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
184 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_xor’:
./include/asm-generic/atomic-instrumented.h:190:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
190 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_xor’:
./include/asm-generic/atomic-instrumented.h:196:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
196 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_dec_return’:
./include/asm-generic/atomic-instrumented.h:231:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
231 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_inc_not_zero’:
./include/asm-generic/atomic-instrumented.h:240:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
240 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_dec_if_positive’:
./include/asm-generic/atomic-instrumented.h:249:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
249 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_dec_and_test’:
./include/asm-generic/atomic-instrumented.h:258:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
258 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_inc_and_test’:
./include/asm-generic/atomic-instrumented.h:276:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
276 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_add_return’:
./include/asm-generic/atomic-instrumented.h:292:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
292 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_add_return’:
./include/asm-generic/atomic-instrumented.h:298:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
298 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_sub_return’:
./include/asm-generic/atomic-instrumented.h:304:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
304 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_sub_return’:
./include/asm-generic/atomic-instrumented.h:310:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
310 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_fetch_add’:
./include/asm-generic/atomic-instrumented.h:316:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
316 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_fetch_add’:
./include/asm-generic/atomic-instrumented.h:322:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
322 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_fetch_sub’:
./include/asm-generic/atomic-instrumented.h:328:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
328 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_fetch_sub’:
./include/asm-generic/atomic-instrumented.h:334:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
334 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_fetch_and’:
./include/asm-generic/atomic-instrumented.h:340:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
340 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_fetch_and’:
./include/asm-generic/atomic-instrumented.h:346:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
346 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_fetch_or’:
./include/asm-generic/atomic-instrumented.h:352:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
352 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_fetch_or’:
./include/asm-generic/atomic-instrumented.h:358:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
358 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_fetch_xor’:
./include/asm-generic/atomic-instrumented.h:364:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
364 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic64_fetch_xor’:
./include/asm-generic/atomic-instrumented.h:370:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
370 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_sub_and_test’:
./include/asm-generic/atomic-instrumented.h:378:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
378 | {
| ^
./include/asm-generic/atomic-instrumented.h: In function ‘atomic_add_negative’:
./include/asm-generic/atomic-instrumented.h:396:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
396 | {
| ^
In file included from ./include/asm-generic/qspinlock_types.h:28,
from ./arch/x86/include/asm/spinlock_types.h:27,
from ./include/linux/spinlock_types.h:13,
from kernel/bounds.c:14:
./include/linux/atomic.h: In function ‘atomic_fetch_add_unless’:
./include/linux/atomic.h:574:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
574 | {
| ^
./include/linux/atomic.h: In function ‘atomic_add_unless’:
./include/linux/atomic.h:596:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
596 | {
| ^
./include/linux/atomic.h: In function ‘atomic_inc_unless_negative’:
./include/linux/atomic.h:675:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
675 | {
| ^
./include/linux/atomic.h: In function ‘atomic_dec_unless_positive’:
./include/linux/atomic.h:689:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
689 | {
| ^
./include/linux/atomic.h: In function ‘atomic_dec_if_positive’:
./include/linux/atomic.h:710:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
710 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_fetch_add_unless’:
./include/linux/atomic.h:1163:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1163 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_add_unless’:
./include/linux/atomic.h:1185:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1185 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_inc_and_test’:
./include/linux/atomic.h:1210:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1210 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_dec_and_test’:
./include/linux/atomic.h:1225:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1225 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_sub_and_test’:
./include/linux/atomic.h:1241:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1241 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_add_negative’:
./include/linux/atomic.h:1257:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1257 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_inc_unless_negative’:
./include/linux/atomic.h:1264:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1264 | {
| ^
./include/linux/atomic.h: In function ‘atomic64_dec_unless_positive’:
./include/linux/atomic.h:1278:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
1278 | {
| ^
In file included from ./include/linux/atomic.h:1315,
from ./include/asm-generic/qspinlock_types.h:28,
from ./arch/x86/include/asm/spinlock_types.h:27,
from ./include/linux/spinlock_types.h:13,
from kernel/bounds.c:14:
./include/asm-generic/atomic-long.h: In function ‘atomic_long_read’:
./include/asm-generic/atomic-long.h:47:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
47 | ATOMIC_LONG_READ_OP()
| ^~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_read_acquire’:
./include/asm-generic/atomic-long.h:48:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
48 | ATOMIC_LONG_READ_OP(_acquire)
| ^~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_set’:
./include/asm-generic/atomic-long.h:59:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
59 | ATOMIC_LONG_SET_OP()
| ^~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_set_release’:
./include/asm-generic/atomic-long.h:60:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
60 | ATOMIC_LONG_SET_OP(_release)
| ^~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_add_return’:
./include/asm-generic/atomic-long.h:72:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
72 | ATOMIC_LONG_ADD_SUB_OP(add,)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_add_return_relaxed’:
./include/asm-generic/atomic-long.h:73:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
73 | ATOMIC_LONG_ADD_SUB_OP(add, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_add_return_acquire’:
./include/asm-generic/atomic-long.h:74:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
74 | ATOMIC_LONG_ADD_SUB_OP(add, _acquire)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_add_return_release’:
./include/asm-generic/atomic-long.h:75:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
75 | ATOMIC_LONG_ADD_SUB_OP(add, _release)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_sub_return’:
./include/asm-generic/atomic-long.h:76:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
76 | ATOMIC_LONG_ADD_SUB_OP(sub,)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_sub_return_relaxed’:
./include/asm-generic/atomic-long.h:77:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
77 | ATOMIC_LONG_ADD_SUB_OP(sub, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_sub_return_acquire’:
./include/asm-generic/atomic-long.h:78:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
78 | ATOMIC_LONG_ADD_SUB_OP(sub, _acquire)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_sub_return_release’:
./include/asm-generic/atomic-long.h:79:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
79 | ATOMIC_LONG_ADD_SUB_OP(sub, _release)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_inc’:
./include/asm-generic/atomic-long.h:120:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
120 | {
| ^
./include/asm-generic/atomic-long.h: In function ‘atomic_long_dec’:
./include/asm-generic/atomic-long.h:127:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
127 | {
| ^
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_add’:
./include/asm-generic/atomic-long.h:142:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
142 | ATOMIC_LONG_FETCH_OP(add, )
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_add_relaxed’:
./include/asm-generic/atomic-long.h:143:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
143 | ATOMIC_LONG_FETCH_OP(add, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_add_acquire’:
./include/asm-generic/atomic-long.h:144:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
144 | ATOMIC_LONG_FETCH_OP(add, _acquire)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_add_release’:
./include/asm-generic/atomic-long.h:145:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
145 | ATOMIC_LONG_FETCH_OP(add, _release)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_sub’:
./include/asm-generic/atomic-long.h:146:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
146 | ATOMIC_LONG_FETCH_OP(sub, )
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_sub_relaxed’:
./include/asm-generic/atomic-long.h:147:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
147 | ATOMIC_LONG_FETCH_OP(sub, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_sub_acquire’:
./include/asm-generic/atomic-long.h:148:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
148 | ATOMIC_LONG_FETCH_OP(sub, _acquire)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_sub_release’:
./include/asm-generic/atomic-long.h:149:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
149 | ATOMIC_LONG_FETCH_OP(sub, _release)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_and’:
./include/asm-generic/atomic-long.h:150:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
150 | ATOMIC_LONG_FETCH_OP(and, )
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_and_relaxed’:
./include/asm-generic/atomic-long.h:151:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
151 | ATOMIC_LONG_FETCH_OP(and, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_and_acquire’:
./include/asm-generic/atomic-long.h:152:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
152 | ATOMIC_LONG_FETCH_OP(and, _acquire)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_and_release’:
./include/asm-generic/atomic-long.h:153:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
153 | ATOMIC_LONG_FETCH_OP(and, _release)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_andnot’:
./include/asm-generic/atomic-long.h:154:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
154 | ATOMIC_LONG_FETCH_OP(andnot, )
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_andnot_relaxed’:
./include/asm-generic/atomic-long.h:155:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
155 | ATOMIC_LONG_FETCH_OP(andnot, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_andnot_acquire’:
./include/asm-generic/atomic-long.h:156:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
156 | ATOMIC_LONG_FETCH_OP(andnot, _acquire)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_andnot_release’:
./include/asm-generic/atomic-long.h:157:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
157 | ATOMIC_LONG_FETCH_OP(andnot, _release)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_or’:
./include/asm-generic/atomic-long.h:158:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
158 | ATOMIC_LONG_FETCH_OP(or, )
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_or_relaxed’:
./include/asm-generic/atomic-long.h:159:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
159 | ATOMIC_LONG_FETCH_OP(or, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_or_acquire’:
./include/asm-generic/atomic-long.h:160:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
160 | ATOMIC_LONG_FETCH_OP(or, _acquire)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_or_release’:
./include/asm-generic/atomic-long.h:161:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
161 | ATOMIC_LONG_FETCH_OP(or, _release)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_xor’:
./include/asm-generic/atomic-long.h:162:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
162 | ATOMIC_LONG_FETCH_OP(xor, )
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_xor_relaxed’:
./include/asm-generic/atomic-long.h:163:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
163 | ATOMIC_LONG_FETCH_OP(xor, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_xor_acquire’:
./include/asm-generic/atomic-long.h:164:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
164 | ATOMIC_LONG_FETCH_OP(xor, _acquire)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_xor_release’:
./include/asm-generic/atomic-long.h:165:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
165 | ATOMIC_LONG_FETCH_OP(xor, _release)
| ^~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_inc’:
./include/asm-generic/atomic-long.h:178:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
178 | ATOMIC_LONG_FETCH_INC_DEC_OP(inc,)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_inc_relaxed’:
./include/asm-generic/atomic-long.h:179:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
179 | ATOMIC_LONG_FETCH_INC_DEC_OP(inc, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_inc_acquire’:
./include/asm-generic/atomic-long.h:180:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
180 | ATOMIC_LONG_FETCH_INC_DEC_OP(inc, _acquire)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_inc_release’:
./include/asm-generic/atomic-long.h:181:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
181 | ATOMIC_LONG_FETCH_INC_DEC_OP(inc, _release)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_dec’:
./include/asm-generic/atomic-long.h:182:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
182 | ATOMIC_LONG_FETCH_INC_DEC_OP(dec,)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_dec_relaxed’:
./include/asm-generic/atomic-long.h:183:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
183 | ATOMIC_LONG_FETCH_INC_DEC_OP(dec, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_dec_acquire’:
./include/asm-generic/atomic-long.h:184:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
184 | ATOMIC_LONG_FETCH_INC_DEC_OP(dec, _acquire)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_fetch_dec_release’:
./include/asm-generic/atomic-long.h:185:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
185 | ATOMIC_LONG_FETCH_INC_DEC_OP(dec, _release)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_add’:
./include/asm-generic/atomic-long.h:198:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
198 | ATOMIC_LONG_OP(add)
| ^~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_sub’:
./include/asm-generic/atomic-long.h:199:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
199 | ATOMIC_LONG_OP(sub)
| ^~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_and’:
./include/asm-generic/atomic-long.h:200:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
200 | ATOMIC_LONG_OP(and)
| ^~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_andnot’:
./include/asm-generic/atomic-long.h:201:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
201 | ATOMIC_LONG_OP(andnot)
| ^~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_or’:
./include/asm-generic/atomic-long.h:202:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
202 | ATOMIC_LONG_OP(or)
| ^~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_xor’:
./include/asm-generic/atomic-long.h:203:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
203 | ATOMIC_LONG_OP(xor)
| ^~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_sub_and_test’:
./include/asm-generic/atomic-long.h:208:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
208 | {
| ^
./include/asm-generic/atomic-long.h: In function ‘atomic_long_dec_and_test’:
./include/asm-generic/atomic-long.h:215:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
215 | {
| ^
./include/asm-generic/atomic-long.h: In function ‘atomic_long_inc_and_test’:
./include/asm-generic/atomic-long.h:222:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
222 | {
| ^
./include/asm-generic/atomic-long.h: In function ‘atomic_long_add_negative’:
./include/asm-generic/atomic-long.h:229:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
229 | {
| ^
./include/asm-generic/atomic-long.h: In function ‘atomic_long_inc_return’:
./include/asm-generic/atomic-long.h:243:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
243 | ATOMIC_LONG_INC_DEC_OP(inc,)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_inc_return_relaxed’:
./include/asm-generic/atomic-long.h:244:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
244 | ATOMIC_LONG_INC_DEC_OP(inc, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_inc_return_acquire’:
./include/asm-generic/atomic-long.h:245:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
245 | ATOMIC_LONG_INC_DEC_OP(inc, _acquire)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_inc_return_release’:
./include/asm-generic/atomic-long.h:246:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
246 | ATOMIC_LONG_INC_DEC_OP(inc, _release)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_dec_return’:
./include/asm-generic/atomic-long.h:247:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
247 | ATOMIC_LONG_INC_DEC_OP(dec,)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_dec_return_relaxed’:
./include/asm-generic/atomic-long.h:248:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
248 | ATOMIC_LONG_INC_DEC_OP(dec, _relaxed)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_dec_return_acquire’:
./include/asm-generic/atomic-long.h:249:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
249 | ATOMIC_LONG_INC_DEC_OP(dec, _acquire)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_dec_return_release’:
./include/asm-generic/atomic-long.h:250:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
250 | ATOMIC_LONG_INC_DEC_OP(dec, _release)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/asm-generic/atomic-long.h: In function ‘atomic_long_add_unless’:
./include/asm-generic/atomic-long.h:255:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
255 | {
| ^
In file included from ./include/linux/lockdep.h:27,
from ./include/linux/spinlock_types.h:18,
from kernel/bounds.c:14:
./include/linux/list.h: In function ‘INIT_LIST_HEAD’:
./include/linux/list.h:27:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
27 | {
| ^
./include/linux/list.h: In function ‘__list_add_valid’:
./include/linux/list.h:41:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
41 | {
| ^
./include/linux/list.h: In function ‘__list_del_entry_valid’:
./include/linux/list.h:45:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
45 | {
| ^
./include/linux/list.h: In function ‘__list_add’:
./include/linux/list.h:59:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
59 | {
| ^
./include/linux/list.h: In function ‘list_add’:
./include/linux/list.h:78:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
78 | {
| ^
./include/linux/list.h: In function ‘list_add_tail’:
./include/linux/list.h:92:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
92 | {
| ^
./include/linux/list.h: In function ‘__list_del’:
./include/linux/list.h:104:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
104 | {
| ^
./include/linux/list.h: In function ‘__list_del_entry’:
./include/linux/list.h:116:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
116 | {
| ^
./include/linux/list.h: In function ‘list_del’:
./include/linux/list.h:124:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
124 | {
| ^
./include/linux/list.h: In function ‘list_replace’:
./include/linux/list.h:139:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
139 | {
| ^
./include/linux/list.h: In function ‘list_replace_init’:
./include/linux/list.h:148:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
148 | {
| ^
./include/linux/list.h: In function ‘list_del_init’:
./include/linux/list.h:158:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
158 | {
| ^
./include/linux/list.h: In function ‘list_move’:
./include/linux/list.h:169:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
169 | {
| ^
./include/linux/list.h: In function ‘list_move_tail’:
./include/linux/list.h:181:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
181 | {
| ^
./include/linux/list.h: In function ‘list_is_last’:
./include/linux/list.h:193:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
193 | {
| ^
./include/linux/list.h: In function ‘list_empty’:
./include/linux/list.h:202:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
202 | {
| ^
./include/linux/list.h: In function ‘list_empty_careful’:
./include/linux/list.h:220:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
220 | {
| ^
./include/linux/list.h: In function ‘list_rotate_left’:
./include/linux/list.h:230:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
230 | {
| ^
./include/linux/list.h: In function ‘list_is_singular’:
./include/linux/list.h:244:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
244 | {
| ^
./include/linux/list.h: In function ‘__list_cut_position’:
./include/linux/list.h:250:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
250 | {
| ^
./include/linux/list.h: In function ‘list_cut_position’:
./include/linux/list.h:276:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
276 | {
| ^
./include/linux/list.h: In function ‘list_cut_before’:
./include/linux/list.h:305:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
305 | {
| ^
./include/linux/list.h: In function ‘__list_splice’:
./include/linux/list.h:321:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
321 | {
| ^
./include/linux/list.h: In function ‘list_splice’:
./include/linux/list.h:339:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
339 | {
| ^
./include/linux/list.h: In function ‘list_splice_tail’:
./include/linux/list.h:351:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
351 | {
| ^
./include/linux/list.h: In function ‘list_splice_init’:
./include/linux/list.h:365:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
365 | {
| ^
./include/linux/list.h: In function ‘list_splice_tail_init’:
./include/linux/list.h:382:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
382 | {
| ^
./include/linux/list.h: In function ‘INIT_HLIST_NODE’:
./include/linux/list.h:659:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
659 | {
| ^
./include/linux/list.h: In function ‘hlist_unhashed’:
./include/linux/list.h:665:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
665 | {
| ^
./include/linux/list.h: In function ‘hlist_empty’:
./include/linux/list.h:670:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
670 | {
| ^
./include/linux/list.h: In function ‘__hlist_del’:
./include/linux/list.h:675:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
675 | {
| ^
./include/linux/list.h: In function ‘hlist_del’:
./include/linux/list.h:685:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
685 | {
| ^
./include/linux/list.h: In function ‘hlist_del_init’:
./include/linux/list.h:692:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
692 | {
| ^
./include/linux/list.h: In function ‘hlist_add_head’:
./include/linux/list.h:700:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
700 | {
| ^
./include/linux/list.h: In function ‘hlist_add_before’:
./include/linux/list.h:712:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
712 | {
| ^
./include/linux/list.h: In function ‘hlist_add_behind’:
./include/linux/list.h:721:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
721 | {
| ^
./include/linux/list.h: In function ‘hlist_add_fake’:
./include/linux/list.h:732:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
732 | {
| ^
./include/linux/list.h: In function ‘hlist_fake’:
./include/linux/list.h:737:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
737 | {
| ^
./include/linux/list.h: In function ‘hlist_is_singular_node’:
./include/linux/list.h:747:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
747 | {
| ^
./include/linux/list.h: In function ‘hlist_move_list’:
./include/linux/list.h:757:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
757 | {
| ^
In file included from ./include/linux/lockdep.h:28,
from ./include/linux/spinlock_types.h:18,
from kernel/bounds.c:14:
./include/linux/debug_locks.h: In function ‘__debug_locks_off’:
./include/linux/debug_locks.h:16:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
16 | {
| ^
In file included from ./include/linux/spinlock_types.h:18,
from kernel/bounds.c:14:
./include/linux/lockdep.h: In function ‘lockdep_copy_map’:
./include/linux/lockdep.h:165:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
165 | {
| ^
./include/linux/lockdep.h: In function ‘lockdep_match_key’:
./include/linux/lockdep.h:312:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
312 | {
| ^
./include/linux/lockdep.h: In function ‘lock_is_held’:
./include/linux/lockdep.h:343:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
343 | {
| ^
./include/linux/lockdep.h: In function ‘lock_set_subclass’:
./include/linux/lockdep.h:356:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
356 | {
| ^
./include/linux/lockdep.h: In function ‘lockdep_invariant_state’:
./include/linux/lockdep.h:475:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
475 | static inline void lockdep_invariant_state(bool force) {}
| ^~~~~~
./include/linux/lockdep.h: In function ‘lockdep_init_task’:
./include/linux/lockdep.h:476:45: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
476 | static inline void lockdep_init_task(struct task_struct *task) {}
| ^~~~~~~~~~~
./include/linux/lockdep.h: In function ‘lockdep_free_task’:
./include/linux/lockdep.h:477:45: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
477 | static inline void lockdep_free_task(struct task_struct *task) {}
| ^~~~~~~~~~~
kernel/bounds.c: In function ‘foo’:
kernel/bounds.c:17:1: error: ‘-mindirect-branch’ and ‘-fcf-protection’ are not compatible
17 | {
| ^
make[2]: *** [Kbuild:21: kernel/bounds.s] Error 1
make[1]: *** [Makefile:1102: prepare0] Error 2
make[1]: Leaving directory '/home/mahmoud/dev/linux'
make: *** [qemu/Makefile:42: /home/mahmoud/dev/linux/arch/x86/boot/bzImage] Error 2
QEMU_DISPLAY=sdl
will not be supported anymore and it doesn't even work for the most recent qemu's versions.
The actual way of opening the console in a GUI is using gtk
instead of sdl
.
This being said, I suggest refactoring the VM Setup.
Reference: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1829945/comments/1
root@ubuntu:/home/l/newdts/linux-master/tools/labs# make boot
qemu/create_net.sh tap0
dnsmasq: failed to create listening socket for 172.213.0.1: Address already in use
qemu/create_net.sh tap1
dnsmasq: failed to create listening socket for 127.0.0.1: Address already in use
/home/l/newdts/linux-master/tools/labs/templates/assignments/6-e100/nttcp -v -i &
ARCH=x86 qemu/qemu.sh -kernel /home/l/newdts/linux-master/arch/x86/boot/bzImage -device virtio-serial -chardev pty,id=virtiocon0 -device virtconsole,chardev=virtiocon0 -serial pipe:pipe1 -serial pipe:pipe2 -netdev tap,id=tap0,ifname=tap0,script=no,downscript=no -net nic,netdev=tap0,model=virtio -netdev tap,id=tap1,ifname=tap1,script=no,downscript=no -net nic,netdev=tap1,model=i82559er -drive file=core-image-minimal-qemux86.ext4,if=virtio,format=raw -drive file=disk1.img,if=virtio,format=raw -drive file=disk2.img,if=virtio,format=raw --append "root=/dev/vda loglevel=15 console=hvc0" --display none -s -m 256
nttcp-l: nttcp, version 1.47
nttcp-l: running in inetd mode on port 5037 - ignoring options beside -v and -p
bind: Address already in use
nttcp-l: service-socket: bind:: Address already in use, errno=98
char device redirected to /dev/pts/18 (label virtiocon0)
I followed the steps and do make boot
, though fail below:
p: error writing '/tmp/tmp.by1RENAIJx/lib/modules/4.19.0+/kernel/crypto/lz4hc.ko': No space left on device
INSTALL crypto/md4.ko
cp: error writing '/tmp/tmp.by1RENAIJx/lib/modules/4.19.0+/kernel/crypto/md4.ko': No space left on device
INSTALL crypto/michael_mic.ko
cp: error writing '/tmp/tmp.by1RENAIJx/lib/modules/4.19.0+/kernel/crypto/michael_mic.ko': No space left on device
INSTALL crypto/morus1280.ko
cp: error writing '/tmp/tmp.by1RENAIJx/lib/modules/4.19.0+/kernel/crypto/morus1280.ko': No space left on device
INSTALL crypto/morus640.ko
cp: error writing '/tmp/tmp.by1RENAIJx/lib/modules/4.19.0+/kernel/crypto/morus640.ko': No space left on device
At main.c:356:
- SSL error:0200101C:system library:fopen:No space left on device: ../crypto/bio/bss_file.c:72
- SSL error:2006D002:BIO routines:BIO_new_file:system lib: ../crypto/bio/bss_file.c:81
sign-file: /tmp/tmp.by1RENAIJx/lib/modules/4.19.0+/kernel/crypto/morus640.ko.~signed~: No space left on device
scripts/Makefile.modinst:36: recipe for target 'crypto/morus640.ko' failed
I checked the mounted img and seems it is already very full, but I thought that is the mounted image, does that mean any other configuration might need to change to have it more space to be install with the module?
/dev/loop4 48M 47M 0 100% /tmp/tmp.by1RENAIJx
Also , I was using :
YOCTO_IMAGE = core-image-minimal-qemu$(ARCH).ext4
We should add a tutorial for setting up the repo and qemu infrastructure like we have on OCW.
Add a section in the Networking lab on using specific printing formats for IP address, such as %pI4
. Add examples.
When running make boot dnsmasq fails to start and the guest gets assigned a random ip, not in the same subnet as tap0.
Here's the output of make boot
:
$ make boot
qemu/create_net.sh tap0
dnsmasq: TFTP directory /home/v/school/so2/linux/tools/labs/tftp inaccessible: Permission denied
qemu/create_net.sh tap1
dnsmasq: TFTP directory /home/v/school/so2/linux/tools/labs/tftp inaccessible: Permission denied
/home/v/school/so2/linux/tools/labs/templates/assignments/6-e100/nttcp -v -i &
nttcp-l: nttcp, version 1.47
nttcp-l: running in inetd mode on port 5037 - ignoring options beside -v and -p
bind: Address already in use
nttcp-l: service-socket: bind:: Address already in use, errno=98
ARCH=x86 qemu/qemu.sh -kernel /home/v/school/so2/linux/arch/x86/boot/bzImage -device virtio-serial -chardev pty,id=virtiocon0 -device virtconsole,chardev=virtiocon0 -serial pipe:pipe1 -serial pipe:pipe2 -netdev tap,id=tap0,ifname=tap0,script=no,downscript=no -net nic,netdev=tap0,model=virtio -netdev tap,id=tap1,ifname=tap1,script=no,downscript=no -net nic,netdev=tap1,model=i82559er -drive file=core-image-sato-qemux86.ext4,if=virtio,format=raw -drive file=disk1.img,if=virtio,format=raw -drive file=disk2.img,if=virtio,format=raw --append "root=/dev/vda loglevel=15 console=hvc0" --display none -s -m 256
char device redirected to /dev/pts/0 (label virtiocon0)
ifconfig
on the guest:
root@qemux86:~# ifconfig
eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
inet addr:169.254.170.68 Bcast:169.254.255.255 Mask:255.255.0.0
inet6 addr: fe80::5054:ff:fe12:3456%134535719/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7215 (7.0 KiB) TX bytes:29578 (28.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%134535719/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:380 (380.0 B) TX bytes:380 (380.0 B)
ifconfig
on the host:
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:cb:83:ab:88 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s20f0u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::16a6:9ec0:ab75:7d3a prefixlen 64 scopeid 0x20<link>
ether 00:0e:c6:ae:b3:ea txqueuelen 1000 (Ethernet)
RX packets 1462327 bytes 1088076753 (1.0 GiB)
RX errors 0 dropped 30 overruns 0 frame 0
TX packets 1074357 bytes 610418490 (582.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 7112 bytes 531925 (519.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7112 bytes 531925 (519.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.213.0.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::748a:4aff:fe32:6639 prefixlen 64 scopeid 0x20<link>
ether 76:8a:4a:32:66:39 txqueuelen 1000 (Ethernet)
RX packets 16300 bytes 2065161 (1.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17409 bytes 37152107 (35.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.30.0.1 netmask 255.255.255.0 broadcast 0.0.0.0
inet6 fe80::3c79:7cff:fe54:c83a prefixlen 64 scopeid 0x20<link>
ether 3e:79:7c:54:c8:3a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1879 bytes 280948 (274.3 KiB)
TX errors 0 dropped 36 overruns 0 carrier 0 collisions 0
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.11 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::a841:7ca2:68eb:2008 prefixlen 64 scopeid 0x20<link>
ether b4:69:21:e8:26:32 txqueuelen 1000 (Ethernet)
RX packets 2769 bytes 225431 (220.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1859 bytes 310461 (303.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Adding --tftp-no-fail
to the dnsmasq command in create_net.sh
fixes it for now as it lets dnsmasq start, but I don't know what is the usage of tftp and if it will be needed in the future.
dnsmasq version: 2.84rc2
qemu version: 5.2.0
The README.rst
symbolic link in the root directory points to Documentation/labs/index.rst
, but it's now Documentation/teaching/index.rst
.
Should we remove the README.rst
symbolic link or fix it to point to Documentation/teaching/index.rst
?
$ make boot
make -C /home/robert/code/linux-kernel-labs
make[1]: Entering directory '/home/robert/code/linux-kernel-labs'
Makefile:595: include/config/auto.conf: No such file or directory
LEX scripts/kconfig/zconf.lex.c
flex: -Cf/-CF and %option yylineno are incompatible
scripts/Makefile.lib:188: recipe for target 'scripts/kconfig/zconf.lex.c' failed
make[3]: *** [scripts/kconfig/zconf.lex.c] Error 1
Makefile:539: recipe for target 'syncconfig' failed
make[2]: *** [syncconfig] Error 2
Makefile:635: recipe for target 'include/config/auto.conf' failed
make[1]: *** [include/config/auto.conf] Error 2
make[1]: Leaving directory '/home/robert/code/linux-kernel-labs'
qemu/Makefile:42: recipe for target '/home/robert/code/linux-kernel-labs/arch/x86/boot/bzImage' failed
make: *** [/home/robert/code/linux-kernel-labs/arch/x86/boot/bzImage] Error 2
Documentation here:
https://linux-kernel-labs.github.io/refs/heads/master/info/vm.html#vm-link
Says use python3
Running make docs
Gives error
SyntaxError: Missing parentheses in call to 'print'
This is a common error when using Python 3 on Python 2 code
➜ make docs
make -C /home/luis/github/TMP/kernel/linux DOCBOOKS= SPHINXDIRS="teaching" htmldocs
make[1]: Entering directory '/home/luis/github/TMP/kernel/linux'
HOSTCC scripts/basic/fixdep
SPHINX htmldocs --> file:///home/luis/github/TMP/kernel/linux/Documentation/output/teaching
PARSE include/uapi/linux/dvb/audio.h
PARSE include/uapi/linux/dvb/ca.h
PARSE include/uapi/linux/dvb/dmx.h
PARSE include/uapi/linux/dvb/frontend.h
PARSE include/uapi/linux/dvb/net.h
PARSE include/uapi/linux/dvb/video.h
PARSE include/uapi/linux/videodev2.h
PARSE include/uapi/linux/media.h
PARSE include/uapi/linux/cec.h
PARSE include/uapi/linux/lirc.h
Running Sphinx v1.7.9
Warning: The Sphinx 'sphinx_rtd_theme' HTML theme was not found. Make sure you have the theme installed to produce pretty HTML output. Falling back to the default theme.
load additional sphinx-config: /home/luis/github/TMP/kernel/linux/Documentation/teaching/conf.py
Exception occurred:
File "/home/luis/anaconda3/lib/python3.5/site-packages/sphinx/registry.py", line 315, in load_extension
mod = __import__(extname, None, None, ['setup'])
File "/home/luis/github/TMP/kernel/linux/Documentation/sphinx/ditaa.py", line 79
print self.arguments
^
SyntaxError: Missing parentheses in call to 'print'
The full traceback has been saved in /tmp/sphinx-err-ck7oub5u.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Documentation/Makefile:68: recipe for target 'htmldocs' failed
Errors occurs when running:
$ linux/tools/labs$ make docs
/home/daniel/w/repos/linux/Documentation/teaching/labs/deferred_work.rst:721: ERROR: Undefined substitution referenced: "LXR".
/home/daniel/w/repos/linux/Documentation/teaching/labs/deferred_work.rst:721: ERROR: Unknown target name: "lxr".
/home/daniel/w/repos/linux/Documentation/teaching/labs/interrupts.rst:688: ERROR: Undefined substitution referenced: "LXR".
/home/daniel/w/repos/linux/Documentation/teaching/labs/interrupts.rst:688: ERROR: Unknown target name: "lxr".
/home/daniel/w/repos/linux/Documentation/teaching/labs/kernel_api.rst:739: ERROR: Unexpected indentation.
/home/daniel/w/repos/linux/Documentation/teaching/labs/kernel_api.rst:582: ERROR: Undefined substitution referenced: "LXR".
/home/daniel/w/repos/linux/Documentation/teaching/labs/kernel_api.rst:582: ERROR: Unknown target name: "lxr".
/home/daniel/w/repos/linux/Documentation/teaching/labs/kernel_modules.rst:810: ERROR: Undefined substitution referenced: "LXR".
/home/daniel/w/repos/linux/Documentation/teaching/labs/kernel_modules.rst:939: ERROR: Undefined substitution referenced: "LXR".
/home/daniel/w/repos/linux/Documentation/teaching/labs/kernel_modules.rst:810: ERROR: Unknown target name: "lxr".
/home/daniel/w/repos/linux/Documentation/teaching/labs/kernel_modules.rst:939: ERROR: Unknown target name: "lxr".
I receive the following error when I build the documentation from the tools/labs directory:
Sphinx error:
Builder name slides not registered or available through entry point
Documentation/Makefile:71: recipe for target 'slides' failed
make[2]: *** [slides] Error 1
Makefile:1470: recipe for target 'slides' failed
make[1]: *** [slides] Error 2
make[1]: Leaving directory '/home/sergiu/build/SO2/linux-testing.fork'
Makefile:34: recipe for target 'docs' failed
make: *** [docs] Error 2
I think there is just update sbi (struct minfs_sb_info) but not sbi->sbh (struct minfs_super_block).
kernel/minfs.c:332
/* TODO 7/2: Mark the inode as used in the bitmap and mark
* the superblock buffer head as dirty.
*/
__test_and_set_bit(idx, &sbi->imap);
mark_buffer_dirty(sbi->sbh);
/********* fix like this ? ********/
__test_and_set_bit(idx, &sbi->imap);
/* update sbi->sbh */
struct minfs_super_block *ms;
ms = (struct minfs_super_block *)(sbi->sbh->b_data);
ms->imap = sbi->imap;
mark_buffer_dirty(sbi->sbh);
Some assignments (if not all) require the kernel module to be in the same folder as the checker script. The user has to copy that manually. This is not stated in most (if not all) README files for assignments. Add this clarification as done in #120 .
I trying to solve this exercise, but I can't figure it out, I have a post https://stackoverflow.com/questions/62238868/enable-dynamic-debug-message-for-insmod for this question.
Wondering is there any hint about how to do so? I tried cmd : insmod dyndbg.ko dyndbg=\"func my_debug_func +p\
, but it not work since dyndbg doesn't match any module in kernel ddebug_tables
The last video on this page does not play because it is boot.cast file of size 0 bytes
https://linux-kernel-labs.github.io/refs/heads/master/so2/lec11-arch.html
Linux 5.0 have some break changes for the block devices API, in special how the request queue is handled. This article summarizes the new API. We should update the lab with the updated API.
The vlan
parameter for -net
has been removed in QEMU 3.0.
After removing all vlan=x,
entries in tools/labs/qemu/Makefile
the vm doesn't boot.
On the minimal QEMU image the test passes by luck as it checks for a return code error. As "file" doesn't exist, it will always return an error code.
On the DEV QEMU image, "file" exists and always returns error code 0. Even if the file doesn't exist, so the test will always fail.
Solution: Replace "file" with "ls" in the test.
We need to find a better way to demonstrate compilation errors. Current approach in kernel modules lab is confusing, users are thinking that there is a problem with their code.
A possible solution was posted here: #113
I wanted to boot the vm and I saw that on some systems the make boot command does not create serial.pts file. You can still use minicom to connect on {/dev/pts/$$}.
Whenever I try to do my read-only tests on my currently-working-for-read-only implementation I get all tests but one passing, and the other one is failing miserably: I get accesses out of bounds on the underlying block device.
To note is that stat is also wrong about this file, it gives me a size of 32768. All other files have the correct file size. Probably this is related.
I have not verified the file in hexdump but, given that all other files work correctly, I strongly believe the file itself is corrupt.
I cannot run the read-write tests because I haven't implemented the write side of it yet.
Automated verification (i.e. the use of vmchecker) requires a clean slate image file, installing check scripts inside the virtual machine and extracting output files. Create documentation for this.
Scripts used for testing labs and assignments are required to have execution rights to be copied to the QEMU virtual machine. The simplest solution is to add execution rights to all scripts to have them copied.
To find out the buffer associated to the request, use bio_data`(:c:data:`rq->bio).
blk_rq_pos(rq), blk_rq_bytes(rq), blk_rq_cur_bytes(rq), rq_data_dir(rq)
)A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.