diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index b015a4222..9c3061cd0 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,21 +3,21 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -4.15.7 \ -4.14.24-nc \ -4.13.12-nc \ +4.15.18 \ +4.14.52-nc \ +4.13.16-nc \ 4.12.14-nc \ 4.11.12-nc \ 4.10.17-nc \ -4.9.86-nc \ +4.9.110-nc \ 4.8.17-nc \ 4.7.10-nc \ 4.6.7-nc \ 4.5.7-nc \ -4.4.120-nc \ +4.4.138-nc \ 4.3.6-nc \ 4.2.8-nc \ -4.1.38-nc \ +4.1.52-nc \ 4.0.9-nc \ 3.19.8-nc \ 3.18.98-nc \ diff --git a/scripts/kernel-functions b/scripts/kernel-functions index d9ad40f4d..6e5605c04 100644 --- a/scripts/kernel-functions +++ b/scripts/kernel-functions @@ -225,6 +225,96 @@ index 3f2793d..96e45ea 100644 EOF fi fi + if [ "${1#4.15}" != "$1" ]; then + patch -f -s -p1 <<'EOF' +From ad343a98e74e85aa91d844310e797f96fee6983b Mon Sep 17 00:00:00 2001 +From: Sergey Senozhatsky +Date: Tue, 6 Feb 2018 15:37:52 -0800 +Subject: [PATCH] tools/lib/subcmd/pager.c: do not alias select() params + +Use a separate fd set for select()-s exception fds param to fix the +following gcc warning: + + pager.c:36:12: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict] + select(1, &in, NULL, &in, NULL); + ^~~ ~~~ + +Link: http://lkml.kernel.org/r/20180101105626.7168-1-sergey.senozhatsky@gmail.com +Signed-off-by: Sergey Senozhatsky +Cc: Arnaldo Carvalho de Melo +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + tools/lib/subcmd/pager.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tools/lib/subcmd/pager.c b/tools/lib/subcmd/pager.c +index 5ba754d17952..9997a8805a82 100644 +--- a/tools/lib/subcmd/pager.c ++++ b/tools/lib/subcmd/pager.c +@@ -30,10 +30,13 @@ static void pager_preexec(void) + * have real input + */ + fd_set in; ++ fd_set exception; + + FD_ZERO(&in); ++ FD_ZERO(&exception); + FD_SET(0, &in); +- select(1, &in, NULL, &in, NULL); ++ FD_SET(0, &exception); ++ select(1, &in, NULL, &exception, NULL); + + setenv("LESS", "FRSX", 0); + } +EOF + patch -f -s -p1 <<'EOF' +From 854e55ad289ef8888e7991f0ada85d5846f5afb9 Mon Sep 17 00:00:00 2001 +From: Josh Poimboeuf +Date: Thu, 15 Mar 2018 22:11:54 -0500 +Subject: [PATCH] objtool, perf: Fix GCC 8 -Wrestrict error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Starting with recent GCC 8 builds, objtool and perf fail to build with +the following error: + + ../str_error_r.c: In function 'str_error_r': + ../str_error_r.c:25:3: error: passing argument 1 to restrict-qualified parameter aliases with argument 5 [-Werror=restrict] + snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err); + +The code seems harmless, but there's probably no benefit in printing the +'buf' pointer in this situation anyway, so just remove it to make GCC +happy. + +Reported-by: Laura Abbott +Signed-off-by: Josh Poimboeuf +Tested-by: Laura Abbott +Cc: Adrian Hunter +Cc: Jiri Olsa +Cc: Namhyung Kim +Cc: Wang Nan +Link: http://lkml.kernel.org/r/20180316031154.juk2uncs7baffctp@treble +Signed-off-by: Arnaldo Carvalho de Melo +--- + tools/lib/str_error_r.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/lib/str_error_r.c b/tools/lib/str_error_r.c +index d6d65537b0d9..6aad8308a0ac 100644 +--- a/tools/lib/str_error_r.c ++++ b/tools/lib/str_error_r.c +@@ -22,6 +22,6 @@ char *str_error_r(int errnum, char *buf, size_t buflen) + { + int err = strerror_r(errnum, buf, buflen); + if (err) +- snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err); ++ snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, [buf], %zd)=%d", errnum, buflen, err); + return buf; + } +EOF + fi # After patch-v4.14.1[12] has been applied, the execute bit has to be # set for sync-check.sh since patch can't do that. for f in "tools/objtool/sync-check.sh"; do diff --git a/scst/include/backport.h b/scst/include/backport.h index 8fcd87edc..897288ee5 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -90,6 +90,16 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) } #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) +static inline void blk_queue_flag_set(unsigned int flag, + struct request_queue *q) +{ +#if !defined(RHEL_MAJOR) || RHEL_MAJOR -0 >= 6 + queue_flag_set_unlocked(flag, q); +#endif +} +#endif + /* */ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 00ecc91e4..7846d4348 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -4138,7 +4138,10 @@ static int vdisk_usn_vpd(uint8_t *buf, struct scst_cmd *cmd, read_lock(&vdisk_serial_rwlock); usn_len = strlen(virt_dev->usn); buf[3] = usn_len; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-truncation" strncpy(&buf[4], virt_dev->usn, usn_len); +#pragma GCC diagnostic pop read_unlock(&vdisk_serial_rwlock); } return buf[3] + 4; diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 11802297d..ead39a11f 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -6965,6 +6965,21 @@ out: return res; } +/** + * scsi_execute - insert a SCSI request and wait for the result + * @sdev: scsi device + * @cmd: scsi command + * @data_direction: data direction + * @buffer: data buffer + * @bufflen: length of buffer - DMA_TO_DEVICE, DMA_FROM_DEVICE or DMA_NONE + * @sense: optional sense buffer + * @timeout: request timeout in seconds + * @retries: number of times to retry request + * @flags: flags for ->cmd_flags, e.g. REQ_FAILFAST_DEV + * + * Returns the scsi_cmnd result field if a command was executed, or a negative + * Linux error code if we didn't get that far. + */ int scst_scsi_execute(struct scsi_device *sdev, const unsigned char *cmd, int data_direction, void *buffer, unsigned int bufflen, unsigned char *sense, int timeout, int retries, u64 flags) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 932ff9f2b..eef75fa97 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1230,9 +1230,7 @@ static int scst_local_change_queue_depth(struct scsi_device *sdev, int qdepth) static int scst_local_slave_alloc(struct scsi_device *sdev) { -#if !defined(RHEL_MAJOR) || RHEL_MAJOR -0 >= 6 - queue_flag_set_unlocked(QUEUE_FLAG_BIDI, sdev->request_queue); -#endif + blk_queue_flag_set(QUEUE_FLAG_BIDI, sdev->request_queue); return 0; } diff --git a/srpt/Makefile b/srpt/Makefile index bd7ead229..35da325f5 100644 --- a/srpt/Makefile +++ b/srpt/Makefile @@ -54,10 +54,14 @@ MODULE_SYMVERS:=$(shell if [ -e "$(KDIR)/Module.symvers" ]; then \ echo Module.symvers; else echo Modules.symvers; fi) # Name of the OFED kernel package. -OFED_KERNEL_IB_PKG:=$(shell for r in mlnx-ofa_kernel compat-rdma kernel-ib; do rpm -q $$r 2>/dev/null | grep -q "^$$r" && echo "$$r" && break; done; for p in mlnx-ofed-kernel-dkms; do dpkg-query -s "$$p" >/dev/null 2>&1 && echo "$$p" && break; done) +OFED_KERNEL_IB_RPM:=$(shell for r in mlnx-ofa_kernel compat-rdma kernel-ib; do rpm -q $$r 2>/dev/null | grep -q "^$$r" && echo "$$r" && break; done) +OFED_KERNEL_IB_DEB:=$(shell for p in mlnx-ofed-kernel-dkms; do dpkg-query -s "$$p" >/dev/null 2>&1 && echo "$$p" && break; done) +OFED_KERNEL_IB_PKG:=$(OFED_KERNEL_IB_RPM)$(OFED_KERNEL_IB_DEB) # Name of the OFED kernel development package. -OFED_KERNEL_IB_DEVEL_PKG:=$(shell for r in mlnx-ofa_kernel-devel compat-rdma-devel kernel-ib-devel; do rpm -q $$r 2>/dev/null | grep -q "^$$r" && echo "$$r" && break; done; for p in mlnx-ofed-kernel-dkms; do dpkg-query -s "$$p" >/dev/null 2>&1 && echo "$$p" && break; done) +OFED_KERNEL_IB_DEVEL_RPM:=$(shell for r in mlnx-ofa_kernel-devel compat-rdma-devel kernel-ib-devel; do rpm -q $$r 2>/dev/null | grep -q "^$$r" && echo "$$r" && break; done) +OFED_KERNEL_IB_DEVEL_DEB:=$(shell for p in mlnx-ofed-kernel-dkms; do dpkg-query -s "$$p" >/dev/null 2>&1 && echo "$$p" && break; done) +OFED_KERNEL_IB_DEVEL_PKG:=$(OFED_KERNEL_IB_DEVEL_RPM)$(OFED_KERNEL_IB_DEVEL_DEB) OFED_FLAVOR=$(shell if [ -e /usr/bin/ofed_info ]; then /usr/bin/ofed_info 2>/dev/null | head -n1 | sed -n 's/^\(MLNX_OFED\|OFED-internal\).*/MOFED/p;s/^OFED-.*/OFED/p'; else echo in-tree; fi) @@ -72,7 +76,9 @@ ifeq ($(OFED_FLAVOR),MOFED) # header files use the LINUX_BACKPORT() macro without including # , include that header file explicitly. OFED_KERNEL_DIR:=/usr/src/ofa_kernel/default -OFED_VERS=$(shell rpm -q --qf '%{version}\n' mlnx-ofa_kernel-devel 2>/dev/null | grep -v ' '; dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms 2>/dev/null) +OFED_RPM_VERS=$(shell rpm -q --qf '%{version}\n' mlnx-ofa_kernel-devel 2>/dev/null | grep -v ' ') +OFED_DEB_VERS=$(shell dpkg-query -W --showformat='$${Version}\n' mlnx-ofed-kernel-dkms 2>/dev/null) +OFED_VERS=$(OFED_RPM_VERS)$(OFED_DEB_VERS) OFED_CFLAGS:=-I$(OFED_KERNEL_DIR)/include -include "linux/compat-2.6.h" else # OFED 1.5 diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index a34cff61f..a29634d6b 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2244,7 +2244,7 @@ retry: */ ch->max_sge = sdev->dev_attr.max_sge - min(max_sge_delta, - max_t(unsigned int, 0, + max_t(int, 0, sdev->dev_attr.max_sge - max_sge_delta)); qp_init->cap.max_send_sge = ch->max_sge; qp_init->cap.max_recv_sge = ch->max_sge;