Age | Commit message (Collapse) | Author |
|
The previous build_with_updated_interfaces_of_linux_v4.8_and_above.patch
does not alloc struct ahash_request before using it. This will cause the
kernel call trace below when calling gen_scsiid on kernel 4.8 or later
version.
This patch normalizes the calling of ahash API according to the example
in kernel doc Documentation/crypto/api-intro.txt.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
IP: [<ffffffffa0008d45>] volume_add+0x625/0x7f0 [iscsi_trgt]
PGD dd77067 PUD dd7c067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: iscsi_trgt(O)
CPU: 0 PID: 350 Comm: ietd Tainted: G O 4.8.12-yocto-standard #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014
task: ffff88000dfe2c00 task.stack: ffff88000de88000
RIP: 0010:[<ffffffffa0008d45>] [<ffffffffa0008d45>] volume_add+0x625/0x7f0 [iscsi_trgt]
RSP: 0018:ffff88000de8bd90 EFLAGS: 00000206
RAX: 000000000000ddfa RBX: ffff88000ddd1d78 RCX: ffffea0000000000
RDX: 0000000000000600 RSI: 0000000000000000 RDI: ffff88000ddd1c14
RBP: ffff88000de8be38 R08: ffff88000de44180 R09: ffff88000de8bdd0
R10: 000000000000002c R11: 0000000000000000 R12: ffff88000ddfa600
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88000de92200
FS: 00007f767548b700(0000) GS:ffff88000fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000020 CR3: 000000000dd2d000 CR4: 00000000000006f0
Stack:
ffff88000de8bdd0 ffff88000dc1b3d0 ffff88000ddfa650 ffff88000ddfa660
ffff88000df8f000 ffff88000ddd1c00 ffff88000de44180 0000000000000000
ffffea0000377440 0000000f00000c14 0000000000000000 0000000000000000
Call Trace:
[<ffffffffa0006547>] ioctl+0x217/0x390 [iscsi_trgt]
[<ffffffff81192574>] do_vfs_ioctl+0x94/0x5c0
[<ffffffff8117ff73>] ? vfs_read+0xf3/0x120
[<ffffffff81192b19>] SyS_ioctl+0x79/0x90
[<ffffffff8191a45b>] entry_SYSCALL_64_fastpath+0x13/0x8f
Code: 4c 01 e0 0f 82 a2 01 00 00 48 b9 00 00 00 80 ff 77 00 00 48 01
c8 45 31 f6 48 b9 00 00 00 00 00 ea ff ff 89 54 24 68 48 c1 e8 0c <49>
8b 56 20 4c 89 44 24 20 4c 89 f7 48 c1 e0 06 c7 44 24 6c 04
RIP [<ffffffffa0008d45>] volume_add+0x625/0x7f0 [iscsi_trgt]
RSP <ffff88000de8bd90>
CR2: 0000000000000020
end trace cd2016297df21635 ]
ietd_response_recv 200 0 -5
Input/output error.
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|
|
The below changes in kernel source, triggered iscsitarget
build fail with linux kernel v4.8.
1. An extra 'flags' argument has been passed to vfs_readv/vfs_writev
syscalls in v4.8. So, set this argument to "0" for now
(as there is no real need for that).
Ref: https://github.com/torvalds/linux/commit/793b80ef14af56d20c998265287648ad34239b6f
Solves:
-- snip --
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/nthread.c: In function 'write_data':
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/nthread.c:350:9: error: too few arguments to function 'vfs_writev'
res = vfs_writev(file, (struct iovec __user *) iop, count, &off);
^~~~~~~~~~
-- snip --
2. Redefine dropped PAGE_CACHE_* and page_cache_{get,release} definitions,
as they have been dropped with v4.8
Ref: https://github.com/torvalds/linux/commit/1fa64f198b9f8d6ec0f7aec7c18dc94684391140
Solves:
-- snip --
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/param.c: In function 'sess_param_check':
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/param.c:48:41: error: 'PAGE_CACHE_SIZE' undeclared (first use in this function)
(u32) ((ISCSI_CONN_IOV_MAX - 1) * PAGE_CACHE_SIZE));
^
-- snip --
3. Replace crypto_hash interfaces with crypto_ahash interfaces,
Ref: https://github.com/torvalds/linux/commit/896545098777564212b9e91af4c973f094649aa7
Ref: https://www.redhat.com/archives/dm-devel/2016-January/msg00244.html
Solves:
-- snip --
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/digest.c: In function 'digest_init':
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/digest.c:42:23: error: implicit declaration of function 'crypto_alloc_hash' [-Werror=implicit-function-declaration]
conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0,
^~~~~~~~~~~~~~~~~
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/digest.c: In function 'digest_cleanup':
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/digest.c:77:3: error: implicit declaration of function 'crypto_free_hash' [-Werror=implicit-function-declaration]
crypto_free_hash(conn->tx_hash.tfm);
^~~~~~~~~~~~~~~~
-- snip --
4. The earlier "rw" parameter has been set in "bi_rw" within
bio structure, hence remove "rw" argument.
Ref: https://github.com/torvalds/linux/commit/4e49ea4a3d276365bf7396c9b77b4d1d5923835a
Solves:
-- snip --
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/block-io.c:140:14: warning: passing argument 1 of 'submit_bio' makes pointer from integer without a cast [-Wint-conversion]
submit_bio(rw, bio);
^~
-- snip --
5. The 'len' argument from sk_data_ready() callback has been removed in
linux kernel v4.3 and above.
Ref: https://github.com/torvalds/linux/commit/676d23690fb62b5d51ba5d659935e9f7d9da9f8e
Solves:
-- snip --
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/conn.c: In function 'iet_socket_bind':
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/conn.c:143:38: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
target->nthread_info.old_data_ready = conn->sock->sk->sk_data_ready;
^
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/conn.c:144:32: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
conn->sock->sk->sk_data_ready = iet_data_ready;
^
-- snip --
6.
A. The "size" argument has been dropped from sock_recvmsg syscall in v4.8,
as all callers have it equal to msg_data_left(msg).
B. 'struct user_msghdr' is being used for userland-side msghdr instead
of 'struct msghdr', which is used for kernel-side msghdr in linux v3.19
and above, so typecase it while calling sock_recvmsg syscall.
Ref: https://github.com/torvalds/linux/commit/2da62906b1e298695e1bb725927041cd59942c98
https://github.com/torvalds/linux/commit/666547ff591cebdedc4679bf6b1b3f3383a8dea3
Solves:
-- snip --
TOPDIR/tmp-glibc/work-shared/qemux86/kernel-source/include/linux/net.h:222:5: note: expected 'struct msghdr *' but argument is of type 'struct user_msghdr *'
int sock_recvmsg(struct socket *sock, struct msghdr *msg, int flags);
^~~~~~~~~~~~
TOPDIR/tmp-glibc/work/qemux86-oe-linux/iscsitarget/1.4.20.3+svn502-r0/iscsitarget-1.4.20.3+svn502/kernel/nthread.c:129:8: error: too many arguments to function 'sock_recvmsg'
res = sock_recvmsg(conn->sock, &msg, len, MSG_DONTWAIT | MSG_NOSIGNAL);
^~~~~~~~~~~~
-- snip --
Detailed error log is at: http://errors.yoctoproject.org/Errors/Details/83334/
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|
|
default kernel version 4.8
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
Split kernel module and user space build. Ensure the LDFLAGS is passed
when build user space code.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
1. test_bit was used to return true boolean value, if
BIO_UPTODATE bit of bio->bi_flags is set. But the same
job can be done by checking bio->bi_error, implemented in
linux kernel 4.3 and above. If bio->bi_error is set, then
it denotes error.
Ref: https://github.com/torvalds/linux/commit/4246a0b63bd8f56a1469b12eafeb875b1041a451
It solves below build error:
-- snip --
iscsitarget-1.4.20.3+svn502/kernel/block-io.c:40:19: error: 'BIO_UPTODATE' undeclared (first use in this function)
error = test_bit(BIO_UPTODATE, &bio->bi_flags) ? error : -EIO;
-- CUT --
2. bio can always be filled to a maximum value of BIO_MAX_PAGES,
so no need to check for min value for linux kernel 4.3 and above.
Ref: https://github.com/torvalds/linux/commit/b54ffb73cadcdcff9cc1ae0e11f502407e3e2e4c
It solves below build error:
-- snip --
iscsitarget-1.4.20.3+svn502/kernel/block-io.c:80:15: error: implicit declaration of function 'bio_get_nr_vecs' [-Werror=implicit-function-declaration]
max_pages = bio_get_nr_vecs(bio_data->bdev);
-- CUT --
3. Remove unwanted explicit setting of CFLAGS and CC flags. Setting them in
oe_runmake command, will override CFLAGS mentioned in iscsitarget Makefile
and resulting in a below error:
-- snip --
In file included from iscsid.c:38:0:
iscsid.h:38:19: fatal error: iet_u.h: No such file or directory
compilation terminated.
In file included from conn.c:15:0:
iscsid.h:38:19: fatal error: iet_u.h: No such file or directory
compilation terminated.
-- CUT --
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|
|
inherit module instead of module-base, so the module is
split into kernel-module-iscsi-trgt and make PN rdepends
on it.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|
|
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|
|
The element skc_v6_daddr (in struct sock_common) is defined in
kernel source only when CONFIG_IPV6 is enabled. Hence, access
sk_v6_daddr element (i.e __sk_common.skc_v6_daddr) only when CONFIG_IPV6
is defined; to fix below error in world build:
-- snip --
/home/jenkins/oe/world/shr-core/tmp-glibc/work-shared/qemux86/kernel-source/include/net/sock.h:330:33: error: 'struct sock_common' has no member named 'skc_v6_daddr'
-- CUT --
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|
|
iSCSI Enterprise Target is aimed to develop an
open source iSCSI target with professional features,
that works well in enterprise environment under real
workload, and is scalable and versatile enough to meet the
challenge of future storage needs and developments.
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
|