From patchwork Fri Oct 12 13:10:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kholmanskikh X-Patchwork-Id: 983048 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="YiW215TK"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Wp7B6x20z9s47 for ; Sat, 13 Oct 2018 00:08:38 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 542BF3E6B1D for ; Fri, 12 Oct 2018 15:08:36 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id 5F5013E6608 for ; Fri, 12 Oct 2018 15:08:34 +0200 (CEST) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 69D261A00A29 for ; Fri, 12 Oct 2018 15:08:33 +0200 (CEST) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9CD4CGw158622 for ; Fri, 12 Oct 2018 13:08:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=BP+Bp/5E8JjyOfA4hpOk2luThibpGpu3j9MaYPDrxu0=; b=YiW215TK0xj0iQew2wOGfbtxQ5I4VSGwd8pibZfpBfKg8SuKOThRvocRxtF8fzmRAZ/Z 3tSqgCzSCPFZtr3FWFM9b2qElNjqfEtA4rxlW2Zqu2AdD0bWZdzwRduFCHcgu6sT3Rlm hblv+TU5CZi1P5ISzNBMjIqJ6mBkagaTByjFRit9PPseZwda/vKSUvHbYaT4UXYl73Ll AkYOIfzYDiVXoivitHbIuKAj8/9w3lmUCB+7BGMNKO8njcr1NyrYqPABivLXCvKtylST iaJ5pcD/+KFL686Ef2HHC3Xpt6FidJFxQjbbIVhHCO/DJ/i7py4ZQY0rVtBi4x2poPs8 2g== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2mxn0qjg88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:31 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8T9C012920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:30 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9CD8Tv2009394 for ; Fri, 12 Oct 2018 13:08:29 GMT Received: from kholmanskikh.ru.oracle.com (/10.162.81.17) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 12 Oct 2018 13:08:29 +0000 From: Stanislav Kholmanskikh To: ltp@lists.linux.it Date: Fri, 12 Oct 2018 16:10:53 +0300 Message-Id: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> X-Mailer: git-send-email 1.7.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9043 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810120130 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Cc: vasily.isaenko@oracle.com Subject: [LTP] [PATCH V2 1/5] Remove the pipes runtest file X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" We have two almost identical runtest files: [root@localhost runtest]# diff ipc pipes 1c1 < #DESCRIPTION:Interprocess communication stress --- > #DESCRIPTION:IPC pipes stress 30,32d29 < < sem01 sem01 < sem02 sem02 [root@localhost runtest]# Since both are part of the default scenario, their common tests are executed twice by LTP run. Let's fix that by removing the pipes file. If one needs to execute only pipeio* test cases, he/she will still be able to do it by executing the ipc file. Signed-off-by: Stanislav Kholmanskikh Acked-by: Cyril Hrubis --- Changes since V1: - added the ack runtest/pipes | 29 ----------------------------- scenario_groups/default | 1 - 2 files changed, 0 insertions(+), 30 deletions(-) delete mode 100644 runtest/pipes diff --git a/runtest/pipes b/runtest/pipes deleted file mode 100644 index 900c9a2..0000000 --- a/runtest/pipes +++ /dev/null @@ -1,29 +0,0 @@ -#DESCRIPTION:IPC pipes stress -# These tests use tests/pipeio to put pipes (named or unnamed) through a workout -# -pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80 -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe -# using blocking I/O -#pipeio_2 pipeio -T pipeio_2 -c 5 -s 4090 -i 100 -f x80 -# spawns 5 children to write 100 chunks of 4090 bytes to a named pipe -# using non-blocking I/O -# This test hits EAGAIN, which pipeio doesn't handle at the moment -pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80 -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe -# using blocking I/O -pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80 -# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe -# using non-blocking I/O -pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80 -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe -# using blocking I/O -pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80 -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe -# using blocking I/O -#pipeio_7 pipeio -T pipeio_7 -c 5 -s 5000 -i 10 -f x80 -# spawns 5 children to write 10 chunks of 5000 bytes to a named pipe -# using non-blocking I/O -# This test hits EAGAIN, which pipeio doesn't handle at the moment -pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80 -# spawns 5 children to write 10 chunks of 5000 bytes to an unnamed pipe -# using non-blocking I/O diff --git a/scenario_groups/default b/scenario_groups/default index 621ed9f..160d66c 100644 --- a/scenario_groups/default +++ b/scenario_groups/default @@ -25,7 +25,6 @@ commands hyperthreading kernel_misc fs_ext4 -pipes can cpuhotplug net.ipv6_lib From patchwork Fri Oct 12 13:10:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kholmanskikh X-Patchwork-Id: 983049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="goLsJHsL"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Wp7H37hgz9s3Z for ; Sat, 13 Oct 2018 00:08:43 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id E93C43E6C00 for ; Fri, 12 Oct 2018 15:08:40 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) by picard.linux.it (Postfix) with ESMTP id 40AFE3E6608 for ; Fri, 12 Oct 2018 15:08:35 +0200 (CEST) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 6E3E5200E08 for ; Fri, 12 Oct 2018 15:08:33 +0200 (CEST) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9CD4OeR158729 for ; Fri, 12 Oct 2018 13:08:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=zdR+m1yVmontMFjsjY40nK0b7MlT6BrVDRM9yy7D9IU=; b=goLsJHsL4mB5USYtJHjh9+9vpI5OhB7Wc/rgttUpHpgFb2QqAef5hU0Z7S88IFSdlS0A VVuoAdMjQey6fSOjtOD5mVtDv98Ve+5aAAF+R3qLN9iUlJqH8kauBIGs1MpJy3hw+pBH UTnJTQxlWV5r8y+RpYUisGS2isqxNUrHdKse0V479Dzq8ncKkkR2qOctgqlZ8U2vevvl vaDKJTN1HSmhB7U8zTMFnA7RiqDMvnXF22a90asSNyMo7qr0b8ZdK6meJqV/gYYsEGvM cIfykOFtwJVYD1x3NQ551Eb0Y49VZtF7+mzh4LuH6/04ihxn0XxVfyoeTJDwsGi6ABHx gQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2mxn0qjg8d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:31 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8VqU011619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:31 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8V5H032138 for ; Fri, 12 Oct 2018 13:08:31 GMT Received: from kholmanskikh.ru.oracle.com (/10.162.81.17) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 12 Oct 2018 13:08:30 +0000 From: Stanislav Kholmanskikh To: ltp@lists.linux.it Date: Fri, 12 Oct 2018 16:10:54 +0300 Message-Id: <1539349857-10633-2-git-send-email-stanislav.kholmanskikh@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> References: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9043 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810120130 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it Cc: vasily.isaenko@oracle.com Subject: [LTP] [PATCH V2 2/5] Rename CVE 2012-0957, 2016-4997, 2017-5669, 2017-6951 tests X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Signed-off-by: Stanislav Kholmanskikh --- Changes since V1: - moved source files to corresponding directories runtest/cve | 8 +- runtest/syscalls | 8 +- testcases/cve/.gitignore | 4 - testcases/cve/cve-2012-0957.c | 94 -------------- testcases/cve/cve-2016-4997.c | 129 -------------------- testcases/cve/cve-2017-5669.c | 113 ----------------- testcases/cve/cve-2017-6951.c | 46 ------- testcases/kernel/syscalls/ipc/shmat/.gitignore | 1 + testcases/kernel/syscalls/ipc/shmat/shmat03.c | 113 +++++++++++++++++ testcases/kernel/syscalls/request_key/.gitignore | 1 + .../kernel/syscalls/request_key/request_key05.c | 46 +++++++ testcases/kernel/syscalls/setsockopt/.gitignore | 1 + .../kernel/syscalls/setsockopt/setsockopt03.c | 129 ++++++++++++++++++++ testcases/kernel/syscalls/uname/.gitignore | 1 + testcases/kernel/syscalls/uname/Makefile | 2 + testcases/kernel/syscalls/uname/uname04.c | 94 ++++++++++++++ 16 files changed, 396 insertions(+), 394 deletions(-) delete mode 100644 testcases/cve/cve-2012-0957.c delete mode 100644 testcases/cve/cve-2016-4997.c delete mode 100644 testcases/cve/cve-2017-5669.c delete mode 100644 testcases/cve/cve-2017-6951.c create mode 100644 testcases/kernel/syscalls/ipc/shmat/shmat03.c create mode 100644 testcases/kernel/syscalls/request_key/request_key05.c create mode 100644 testcases/kernel/syscalls/setsockopt/setsockopt03.c create mode 100644 testcases/kernel/syscalls/uname/uname04.c diff --git a/runtest/cve b/runtest/cve index b38fb35..4fc67ce 100644 --- a/runtest/cve +++ b/runtest/cve @@ -2,13 +2,13 @@ cve-2011-0999 thp01 -I 120 cve-2011-2183 ksm05 -I 10 cve-2011-2496 vma03 -cve-2012-0957 cve-2012-0957 +cve-2012-0957 uname04 cve-2014-0196 cve-2014-0196 cve-2015-0235 gethostbyname_r01 cve-2015-7550 keyctl02 cve-2016-4470 keyctl01.sh cve-2015-3290 cve-2015-3290 -cve-2016-4997 cve-2016-4997 +cve-2016-4997 setsockopt03 cve-2016-5195 dirtyc0w cve-2016-7042 cve-2016-7042 cve-2016-7117 cve-2016-7117 @@ -16,8 +16,8 @@ cve-2016-9604 keyctl08 cve-2016-10044 cve-2016-10044 cve-2017-2618 cve-2017-2618 cve-2017-2671 cve-2017-2671 -cve-2017-5669 cve-2017-5669 -cve-2017-6951 cve-2017-6951 +cve-2017-5669 shmat03 +cve-2017-6951 request_key05 cve-2017-7308 setsockopt02 cve-2017-7472 keyctl04 cve-2017-12192 keyctl07 diff --git a/runtest/syscalls b/runtest/syscalls index 53a4a42..7ad4262 100644 --- a/runtest/syscalls +++ b/runtest/syscalls @@ -960,8 +960,8 @@ renameat202 renameat202 -i 10 request_key01 request_key01 request_key02 request_key02 request_key03 request_key03 -cve-2017-6951 cve-2017-6951 request_key04 request_key04 +request_key05 request_key05 rmdir01 rmdir01 rmdir02 rmdir02 @@ -1187,7 +1187,7 @@ setsid01 setsid01 setsockopt01 setsockopt01 setsockopt02 setsockopt02 -cve-2016-4997 cve-2016-4997 +setsockopt03 setsockopt03 settimeofday01 settimeofday01 settimeofday02 settimeofday02 @@ -1205,7 +1205,7 @@ setxattr03 setxattr03 shmat01 shmat01 shmat02 shmat02 -cve-2017-5669 cve-2017-5669 +shmat03 shmat03 shmctl01 shmctl01 shmctl02 shmctl02 @@ -1400,7 +1400,7 @@ umask01 umask01 uname01 uname01 uname02 uname02 uname03 uname03 -cve-2012-0957 cve-2012-0957 +uname04 uname04 unlink01 symlink01 -T unlink01 unlink05 unlink05 diff --git a/testcases/cve/.gitignore b/testcases/cve/.gitignore index b05c0de..01a3e4c 100644 --- a/testcases/cve/.gitignore +++ b/testcases/cve/.gitignore @@ -1,14 +1,10 @@ -cve-2012-0957 cve-2014-0196 cve-2015-3290 -cve-2016-4997 cve-2016-7042 cve-2016-7117 cve-2016-10044 cve-2017-2618 cve-2017-2671 -cve-2017-6951 -cve-2017-5669 meltdown stack_clash cve-2017-17052 diff --git a/testcases/cve/cve-2012-0957.c b/testcases/cve/cve-2012-0957.c deleted file mode 100644 index e4d9e8f..0000000 --- a/testcases/cve/cve-2012-0957.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2017 Richard Palethorpe - * Copyright (c) 2012, Kees Cook - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/* - * Check that memory after the string terminator in all the utsname fields has - * been zeroed. cve-2012-0957 leaked kernel memory through the release field - * when the UNAME26 personality was set. - * - * Thanks to Kees Cook for the original proof of concept: - * http://www.securityfocus.com/bid/55855/info - */ - -#include -#include -#include "tst_test.h" -#include "lapi/personality.h" - -static struct utsname saved_buf; - -static int check_field(char *bytes, char *saved_bytes, size_t length, - char *field) -{ - size_t i = strlen(bytes) + 1; - - for (; i < length; i++) { - if (bytes[i] && (bytes[i] != saved_bytes[i])) { - tst_res(TFAIL, "Bytes leaked in %s!", field); - return 1; - } - } - return 0; -} - - -static void try_leak_bytes(unsigned int test_nr) -{ - struct utsname buf; - - memset(&buf, 0, sizeof(buf)); - - if (uname(&buf)) - tst_brk(TBROK | TERRNO, "Call to uname failed"); - - if (!test_nr) - memcpy(&saved_buf, &buf, sizeof(saved_buf)); - -#define CHECK_FIELD(field_name) \ - (check_field(buf.field_name, saved_buf.field_name, \ - ARRAY_SIZE(buf.field_name), #field_name)) - - if (!(CHECK_FIELD(release) | - CHECK_FIELD(sysname) | - CHECK_FIELD(nodename) | - CHECK_FIELD(version) | - CHECK_FIELD(machine) | -#ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME - CHECK_FIELD(domainname) | -#endif - 0)) { - tst_res(TPASS, "No bytes leaked"); - } -#undef CHECK_FIELD -} - -static void run(unsigned int test_nr) -{ - if (!test_nr) { - tst_res(TINFO, "Calling uname with default personality"); - } else { - SAFE_PERSONALITY(PER_LINUX | UNAME26); - tst_res(TINFO, "Calling uname with UNAME26 personality"); - } - - try_leak_bytes(test_nr); -} - -static struct tst_test test = { - .test = run, - .tcnt = 2, -}; diff --git a/testcases/cve/cve-2016-4997.c b/testcases/cve/cve-2016-4997.c deleted file mode 100644 index 2d99865..0000000 --- a/testcases/cve/cve-2016-4997.c +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2017 Richard Palethorpe - * Based on repro-compatReleaseEntry.c by NCC group - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/* - * Test for CVE-2016-4997 - * - * For a full explanation of how the vulnerability works see: - * https://github.com/nccgroup/TriforceLinuxSyscallFuzzer/tree/master/crash_reports/report_compatIpt - * - * The original vulnerability was present in the 32-bit compatibility system - * call, so the test should be compiled with -m32 and run on a 64-bit kernel. - * For simplicities sake the test requests root privliges instead of creating - * a user namespace. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "tst_test.h" -#include "tst_safe_net.h" -#include "tst_kernel.h" - -#define TOO_SMALL_OFFSET 74 -#define OFFSET_OVERWRITE 0xFFFF -#define NEXT_OFFSET (sizeof(struct ipt_entry) \ - + sizeof(struct xt_entry_match) \ - + sizeof(struct xt_entry_target)) -#define PADDING (OFFSET_OVERWRITE - NEXT_OFFSET) - -#ifndef HAVE_STRUCT_XT_ENTRY_MATCH -struct xt_entry_match { - union { - struct { - uint16_t match_size; - char name[29]; - uint8_t revision; - } user; - struct { - uint16_t match_size; - void *match; - } kernel; - uint16_t match_size; - } u; - unsigned char data[0]; -}; -#endif - -#ifndef HAVE_STRUCT_XT_ENTRY_TARGET -struct xt_entry_target { - union { - struct { - uint16_t target_size; - char name[29]; - uint8_t revision; - } user; - struct { - uint16_t target_size; - void *target; - } kernel; - uint16_t target_size; - } u; - unsigned char data[0]; -}; -#endif - -struct payload { - struct ipt_replace repl; - struct ipt_entry ent; - struct xt_entry_match match; - struct xt_entry_target targ; - char padding[PADDING]; - struct xt_entry_target targ2; -}; - -static void setup(void) -{ - if (tst_kernel_bits() == 32 || sizeof(long) > 4) - tst_res(TCONF, - "The vulnerability was only present in 32-bit compat mode"); -} - -static void run(void) -{ - int ret, sock_fd; - struct payload p = { 0 }; - - sock_fd = SAFE_SOCKET(AF_INET, SOCK_DGRAM, 0); - - strncpy(p.match.u.user.name, "icmp", sizeof(p.match.u.user.name)); - p.match.u.match_size = OFFSET_OVERWRITE; - - p.ent.next_offset = NEXT_OFFSET; - p.ent.target_offset = TOO_SMALL_OFFSET; - - p.repl.num_entries = 2; - p.repl.num_counters = 1; - p.repl.size = sizeof(struct payload); - p.repl.valid_hooks = 0; - - ret = setsockopt(sock_fd, SOL_IP, IPT_SO_SET_REPLACE, - &p, sizeof(struct payload)); - tst_res(TPASS | TERRNO, "We didn't cause a crash, setsockopt returned %d", ret); -} - -static struct tst_test test = { - .min_kver = "2.6.32", - .setup = setup, - .test_all = run, - .needs_root = 1, -}; diff --git a/testcases/cve/cve-2017-5669.c b/testcases/cve/cve-2017-5669.c deleted file mode 100644 index 0834626..0000000 --- a/testcases/cve/cve-2017-5669.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2017 Richard Palethorpe - * Copyright (c) 2017 Fujitsu Ltd. (Xiao Yang ) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/* - * Test for CVE-2017-5669 which allows us to map the nil page using shmat. - * - * When the bug is present shmat(..., (void *)1, SHM_RND) will round address - * 0x1 down to zero and give us the (nil/null) page. With the current bug fix - * in place, shmat it will return EINVAL instead. We also check to see if the - * returned address is outside the nil page in case an alternative fix has - * been applied. - * - * In any case we manage to map some memory we also try to write to it. This - * is just to see if we get an access error or some other unexpected behaviour. - * - * See commit 95e91b831f (ipc/shm: Fix shmat mmap nil-page protection) - * - * The commit above disallowed SHM_RND maps to zero (and rounded) entirely and - * that broke userland for cases like Xorg. New behavior disallows REMAPs to - * lower addresses (0<=PAGESIZE). - * - * See commit a73ab244f0da (Revert "ipc/shm: Fix shmat mmap nil-page protect...) - * See commit 8f89c007b6de (ipc/shm: fix shmat() nil address after round-dow...) - * See https://github.com/linux-test-project/ltp/issues/319 - * - * This test needs root permissions or else security_mmap_addr(), from - * get_unmapped_area(), will cause permission errors when trying to mmap lower - * addresses. - */ - -#include -#include -#include - -#include -#include -#include - -#include "tst_test.h" -#include "tst_safe_sysv_ipc.h" - -static int shm_id; -static void *shm_addr; - -static void setup(void) -{ - shm_id = SAFE_SHMGET(IPC_PRIVATE, getpagesize(), 0777); -} - -static void cleanup(void) -{ - if (shm_addr) - SAFE_SHMDT(shm_addr); - - if (shm_id) - SAFE_SHMCTL(shm_id, IPC_RMID, 0); -} - -static void run(void) -{ - tst_res(TINFO, "Attempting to attach shared memory to null page"); - /* - * shmat() for 0 (or < PAGESIZE with RND flag) has to fail with REMAPs - * https://github.com/linux-test-project/ltp/issues/319 - */ - shm_addr = shmat(shm_id, ((void *)1), SHM_RND | SHM_REMAP); - if (shm_addr == (void *)-1) { - shm_addr = NULL; - if (errno == EINVAL) { - tst_res(TPASS, "shmat returned EINVAL"); - return; - } - tst_brk(TBROK | TERRNO, - "The bug was not triggered, but the shmat error is unexpected"); - } - - tst_res(TINFO, "Mapped shared memory to %p", shm_addr); - - if (!((size_t)shm_addr & (~0U << 16))) - tst_res(TFAIL, - "We have mapped a VM address within the first 64Kb"); - else - tst_res(TPASS, - "The kernel assigned a different VM address"); - - tst_res(TINFO, - "Touching shared memory to see if anything strange happens"); - ((char *)shm_addr)[0] = 'P'; - - SAFE_SHMDT(shm_addr); - shm_addr = NULL; -} - -static struct tst_test test = { - .needs_root = 1, - .setup = setup, - .cleanup = cleanup, - .test_all = run, -}; diff --git a/testcases/cve/cve-2017-6951.c b/testcases/cve/cve-2017-6951.c deleted file mode 100644 index 028e25f..0000000 --- a/testcases/cve/cve-2017-6951.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017 Richard Palethorpe - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/* - * Test for CVE-2016-6951, original reproducer can be found here: - * http://www.spinics.net/lists/keyrings/msg01845.html - * - * request_key() is not in glibc, so we just use the syscall directly instead - * of linking to keyutils. - */ - -#include -#include - -#include "tst_test.h" -#include "lapi/syscalls.h" - -#define ATTEMPTS 0x100 - -static void run(void) -{ - int i; - - tst_res(TINFO, "Requesting dead key"); - for (i = 0; i < ATTEMPTS; i++) - tst_syscall(__NR_request_key, "dead", "abc", "abc", 0, 0, 0); - - tst_res(TPASS, "No crash after %d attempts", ATTEMPTS); -} - -static struct tst_test test = { - .test_all = run, -}; diff --git a/testcases/kernel/syscalls/ipc/shmat/.gitignore b/testcases/kernel/syscalls/ipc/shmat/.gitignore index 488abd3..2b972f8 100644 --- a/testcases/kernel/syscalls/ipc/shmat/.gitignore +++ b/testcases/kernel/syscalls/ipc/shmat/.gitignore @@ -1,2 +1,3 @@ /shmat01 /shmat02 +/shmat03 diff --git a/testcases/kernel/syscalls/ipc/shmat/shmat03.c b/testcases/kernel/syscalls/ipc/shmat/shmat03.c new file mode 100644 index 0000000..0834626 --- /dev/null +++ b/testcases/kernel/syscalls/ipc/shmat/shmat03.c @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2017 Richard Palethorpe + * Copyright (c) 2017 Fujitsu Ltd. (Xiao Yang ) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* + * Test for CVE-2017-5669 which allows us to map the nil page using shmat. + * + * When the bug is present shmat(..., (void *)1, SHM_RND) will round address + * 0x1 down to zero and give us the (nil/null) page. With the current bug fix + * in place, shmat it will return EINVAL instead. We also check to see if the + * returned address is outside the nil page in case an alternative fix has + * been applied. + * + * In any case we manage to map some memory we also try to write to it. This + * is just to see if we get an access error or some other unexpected behaviour. + * + * See commit 95e91b831f (ipc/shm: Fix shmat mmap nil-page protection) + * + * The commit above disallowed SHM_RND maps to zero (and rounded) entirely and + * that broke userland for cases like Xorg. New behavior disallows REMAPs to + * lower addresses (0<=PAGESIZE). + * + * See commit a73ab244f0da (Revert "ipc/shm: Fix shmat mmap nil-page protect...) + * See commit 8f89c007b6de (ipc/shm: fix shmat() nil address after round-dow...) + * See https://github.com/linux-test-project/ltp/issues/319 + * + * This test needs root permissions or else security_mmap_addr(), from + * get_unmapped_area(), will cause permission errors when trying to mmap lower + * addresses. + */ + +#include +#include +#include + +#include +#include +#include + +#include "tst_test.h" +#include "tst_safe_sysv_ipc.h" + +static int shm_id; +static void *shm_addr; + +static void setup(void) +{ + shm_id = SAFE_SHMGET(IPC_PRIVATE, getpagesize(), 0777); +} + +static void cleanup(void) +{ + if (shm_addr) + SAFE_SHMDT(shm_addr); + + if (shm_id) + SAFE_SHMCTL(shm_id, IPC_RMID, 0); +} + +static void run(void) +{ + tst_res(TINFO, "Attempting to attach shared memory to null page"); + /* + * shmat() for 0 (or < PAGESIZE with RND flag) has to fail with REMAPs + * https://github.com/linux-test-project/ltp/issues/319 + */ + shm_addr = shmat(shm_id, ((void *)1), SHM_RND | SHM_REMAP); + if (shm_addr == (void *)-1) { + shm_addr = NULL; + if (errno == EINVAL) { + tst_res(TPASS, "shmat returned EINVAL"); + return; + } + tst_brk(TBROK | TERRNO, + "The bug was not triggered, but the shmat error is unexpected"); + } + + tst_res(TINFO, "Mapped shared memory to %p", shm_addr); + + if (!((size_t)shm_addr & (~0U << 16))) + tst_res(TFAIL, + "We have mapped a VM address within the first 64Kb"); + else + tst_res(TPASS, + "The kernel assigned a different VM address"); + + tst_res(TINFO, + "Touching shared memory to see if anything strange happens"); + ((char *)shm_addr)[0] = 'P'; + + SAFE_SHMDT(shm_addr); + shm_addr = NULL; +} + +static struct tst_test test = { + .needs_root = 1, + .setup = setup, + .cleanup = cleanup, + .test_all = run, +}; diff --git a/testcases/kernel/syscalls/request_key/.gitignore b/testcases/kernel/syscalls/request_key/.gitignore index 4c813a8..e8dc1c5 100644 --- a/testcases/kernel/syscalls/request_key/.gitignore +++ b/testcases/kernel/syscalls/request_key/.gitignore @@ -2,3 +2,4 @@ /request_key02 /request_key03 /request_key04 +/request_key05 diff --git a/testcases/kernel/syscalls/request_key/request_key05.c b/testcases/kernel/syscalls/request_key/request_key05.c new file mode 100644 index 0000000..028e25f --- /dev/null +++ b/testcases/kernel/syscalls/request_key/request_key05.c @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017 Richard Palethorpe + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* + * Test for CVE-2016-6951, original reproducer can be found here: + * http://www.spinics.net/lists/keyrings/msg01845.html + * + * request_key() is not in glibc, so we just use the syscall directly instead + * of linking to keyutils. + */ + +#include +#include + +#include "tst_test.h" +#include "lapi/syscalls.h" + +#define ATTEMPTS 0x100 + +static void run(void) +{ + int i; + + tst_res(TINFO, "Requesting dead key"); + for (i = 0; i < ATTEMPTS; i++) + tst_syscall(__NR_request_key, "dead", "abc", "abc", 0, 0, 0); + + tst_res(TPASS, "No crash after %d attempts", ATTEMPTS); +} + +static struct tst_test test = { + .test_all = run, +}; diff --git a/testcases/kernel/syscalls/setsockopt/.gitignore b/testcases/kernel/syscalls/setsockopt/.gitignore index 2b24f9f..d8fb0f3 100644 --- a/testcases/kernel/syscalls/setsockopt/.gitignore +++ b/testcases/kernel/syscalls/setsockopt/.gitignore @@ -1,2 +1,3 @@ /setsockopt01 /setsockopt02 +/setsockopt03 diff --git a/testcases/kernel/syscalls/setsockopt/setsockopt03.c b/testcases/kernel/syscalls/setsockopt/setsockopt03.c new file mode 100644 index 0000000..2d99865 --- /dev/null +++ b/testcases/kernel/syscalls/setsockopt/setsockopt03.c @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2017 Richard Palethorpe + * Based on repro-compatReleaseEntry.c by NCC group + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* + * Test for CVE-2016-4997 + * + * For a full explanation of how the vulnerability works see: + * https://github.com/nccgroup/TriforceLinuxSyscallFuzzer/tree/master/crash_reports/report_compatIpt + * + * The original vulnerability was present in the 32-bit compatibility system + * call, so the test should be compiled with -m32 and run on a 64-bit kernel. + * For simplicities sake the test requests root privliges instead of creating + * a user namespace. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "tst_test.h" +#include "tst_safe_net.h" +#include "tst_kernel.h" + +#define TOO_SMALL_OFFSET 74 +#define OFFSET_OVERWRITE 0xFFFF +#define NEXT_OFFSET (sizeof(struct ipt_entry) \ + + sizeof(struct xt_entry_match) \ + + sizeof(struct xt_entry_target)) +#define PADDING (OFFSET_OVERWRITE - NEXT_OFFSET) + +#ifndef HAVE_STRUCT_XT_ENTRY_MATCH +struct xt_entry_match { + union { + struct { + uint16_t match_size; + char name[29]; + uint8_t revision; + } user; + struct { + uint16_t match_size; + void *match; + } kernel; + uint16_t match_size; + } u; + unsigned char data[0]; +}; +#endif + +#ifndef HAVE_STRUCT_XT_ENTRY_TARGET +struct xt_entry_target { + union { + struct { + uint16_t target_size; + char name[29]; + uint8_t revision; + } user; + struct { + uint16_t target_size; + void *target; + } kernel; + uint16_t target_size; + } u; + unsigned char data[0]; +}; +#endif + +struct payload { + struct ipt_replace repl; + struct ipt_entry ent; + struct xt_entry_match match; + struct xt_entry_target targ; + char padding[PADDING]; + struct xt_entry_target targ2; +}; + +static void setup(void) +{ + if (tst_kernel_bits() == 32 || sizeof(long) > 4) + tst_res(TCONF, + "The vulnerability was only present in 32-bit compat mode"); +} + +static void run(void) +{ + int ret, sock_fd; + struct payload p = { 0 }; + + sock_fd = SAFE_SOCKET(AF_INET, SOCK_DGRAM, 0); + + strncpy(p.match.u.user.name, "icmp", sizeof(p.match.u.user.name)); + p.match.u.match_size = OFFSET_OVERWRITE; + + p.ent.next_offset = NEXT_OFFSET; + p.ent.target_offset = TOO_SMALL_OFFSET; + + p.repl.num_entries = 2; + p.repl.num_counters = 1; + p.repl.size = sizeof(struct payload); + p.repl.valid_hooks = 0; + + ret = setsockopt(sock_fd, SOL_IP, IPT_SO_SET_REPLACE, + &p, sizeof(struct payload)); + tst_res(TPASS | TERRNO, "We didn't cause a crash, setsockopt returned %d", ret); +} + +static struct tst_test test = { + .min_kver = "2.6.32", + .setup = setup, + .test_all = run, + .needs_root = 1, +}; diff --git a/testcases/kernel/syscalls/uname/.gitignore b/testcases/kernel/syscalls/uname/.gitignore index 1bcf6a4..4f153e7 100644 --- a/testcases/kernel/syscalls/uname/.gitignore +++ b/testcases/kernel/syscalls/uname/.gitignore @@ -1,3 +1,4 @@ /uname01 /uname02 /uname03 +/uname04 diff --git a/testcases/kernel/syscalls/uname/Makefile b/testcases/kernel/syscalls/uname/Makefile index bd617d8..eceaa64 100644 --- a/testcases/kernel/syscalls/uname/Makefile +++ b/testcases/kernel/syscalls/uname/Makefile @@ -20,4 +20,6 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk +uname04: CFLAGS += -D_GNU_SOURCE + include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/kernel/syscalls/uname/uname04.c b/testcases/kernel/syscalls/uname/uname04.c new file mode 100644 index 0000000..e4d9e8f --- /dev/null +++ b/testcases/kernel/syscalls/uname/uname04.c @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2017 Richard Palethorpe + * Copyright (c) 2012, Kees Cook + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* + * Check that memory after the string terminator in all the utsname fields has + * been zeroed. cve-2012-0957 leaked kernel memory through the release field + * when the UNAME26 personality was set. + * + * Thanks to Kees Cook for the original proof of concept: + * http://www.securityfocus.com/bid/55855/info + */ + +#include +#include +#include "tst_test.h" +#include "lapi/personality.h" + +static struct utsname saved_buf; + +static int check_field(char *bytes, char *saved_bytes, size_t length, + char *field) +{ + size_t i = strlen(bytes) + 1; + + for (; i < length; i++) { + if (bytes[i] && (bytes[i] != saved_bytes[i])) { + tst_res(TFAIL, "Bytes leaked in %s!", field); + return 1; + } + } + return 0; +} + + +static void try_leak_bytes(unsigned int test_nr) +{ + struct utsname buf; + + memset(&buf, 0, sizeof(buf)); + + if (uname(&buf)) + tst_brk(TBROK | TERRNO, "Call to uname failed"); + + if (!test_nr) + memcpy(&saved_buf, &buf, sizeof(saved_buf)); + +#define CHECK_FIELD(field_name) \ + (check_field(buf.field_name, saved_buf.field_name, \ + ARRAY_SIZE(buf.field_name), #field_name)) + + if (!(CHECK_FIELD(release) | + CHECK_FIELD(sysname) | + CHECK_FIELD(nodename) | + CHECK_FIELD(version) | + CHECK_FIELD(machine) | +#ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME + CHECK_FIELD(domainname) | +#endif + 0)) { + tst_res(TPASS, "No bytes leaked"); + } +#undef CHECK_FIELD +} + +static void run(unsigned int test_nr) +{ + if (!test_nr) { + tst_res(TINFO, "Calling uname with default personality"); + } else { + SAFE_PERSONALITY(PER_LINUX | UNAME26); + tst_res(TINFO, "Calling uname with UNAME26 personality"); + } + + try_leak_bytes(test_nr); +} + +static struct tst_test test = { + .test = run, + .tcnt = 2, +}; From patchwork Fri Oct 12 13:10:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kholmanskikh X-Patchwork-Id: 983050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="UIw9pEyj"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Wp7P08J4z9s3Z for ; Sat, 13 Oct 2018 00:08:48 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 088D13E6C2F for ; Fri, 12 Oct 2018 15:08:46 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) by picard.linux.it (Postfix) with ESMTP id 5D0F33E6608 for ; Fri, 12 Oct 2018 15:08:36 +0200 (CEST) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 7AFB8200FD7 for ; Fri, 12 Oct 2018 15:08:35 +0200 (CEST) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9CD4CtQ098209 for ; Fri, 12 Oct 2018 13:08:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=D4aiaB5lZAylX23DjsAczksOxopgogKyqFsUsRN8LC8=; b=UIw9pEyjitkpyZFRUtlTLwgwBvrGANf4G+i0Ii6buEUu5YeLkqStFA80jzNQ5yo/UFQm 9zGqTpbLsrgoFAlSp+xAViVypGUDQ4S1TzYgZWZHPEu/Afn8f85RMlaOChgtaFRcC9Su WBsmz+8/HulFWWIXc0ASuIhFYjjxkHNBJAnS7GpCyvXAabo+jpZ4PvTjESJvRz4xmaQL hOayDmzojva4GwBmz4TvYqAXzJNoSkXWybEUf5qm2a+NhrV1Bt+IZfb3nZiK2JbMWs+K WjmyQKltyYM2HadZ72FF0RDUeNLx0iHffY5rrGbRGNs3o5NTdqSPlmkt0rcvTaDA6lL9 Fw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2mxnprjb1u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:33 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8WiJ000321 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:32 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9CD8WWe009420 for ; Fri, 12 Oct 2018 13:08:32 GMT Received: from kholmanskikh.ru.oracle.com (/10.162.81.17) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 12 Oct 2018 13:08:31 +0000 From: Stanislav Kholmanskikh To: ltp@lists.linux.it Date: Fri, 12 Oct 2018 16:10:55 +0300 Message-Id: <1539349857-10633-3-git-send-email-stanislav.kholmanskikh@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> References: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9043 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810120130 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-7.smtp.seeweb.it Cc: vasily.isaenko@oracle.com Subject: [LTP] [PATCH V2 3/5] runtest/sched: removed sched_{set, get}attr test cases X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" All these test cases do not fall into the category of "Scheduler Stress Tests", so their better location is in runtest/syscalls, where they are already defined. Both runtest/sched and runtest/syscalls are part of the default scenario, these test cases will be executed in a default run anyway. Signed-off-by: Stanislav Kholmanskikh Acked-by: Cyril Hrubis --- Changes since V1: - added the ack runtest/sched | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/runtest/sched b/runtest/sched index 774d11f..bfc4f27 100644 --- a/runtest/sched +++ b/runtest/sched @@ -9,10 +9,6 @@ trace_sched01 trace_sched -c 1 hackbench01 hackbench 50 process 1000 hackbench02 hackbench 20 thread 1000 -sched_setattr01 sched_setattr01 -sched_getattr01 sched_getattr01 -sched_getattr02 sched_getattr02 - sched_cli_serv run_sched_cliserv.sh # Run this stress test for 2 minutes sched_stress sched_stress.sh From patchwork Fri Oct 12 13:10:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kholmanskikh X-Patchwork-Id: 983051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=2001:1418:10:5::2; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="eRIbWNx7"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Wp7T04Xxz9s3Z for ; Sat, 13 Oct 2018 00:08:52 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id ED5943E6C4A for ; Fri, 12 Oct 2018 15:08:48 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [IPv6:2001:4b78:1:20::3]) by picard.linux.it (Postfix) with ESMTP id 0D8F53E6B40 for ; Fri, 12 Oct 2018 15:08:37 +0200 (CEST) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 202C41A00A29 for ; Fri, 12 Oct 2018 15:08:35 +0200 (CEST) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9CD4Cfu158616 for ; Fri, 12 Oct 2018 13:08:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=cv3+dDWYlHDWI3YVapmB7Ihq+N/tQVI4FqTNBf8AH24=; b=eRIbWNx7qrKO49mKPEzVMMTE50W95Nar2gsKRI11jaOCe0r0/Upd4teQG5FZ+NOUEFru G9COMfuc4jxRAvbIXT59dmF2u0oF1toaXWJ0OjWSr8c8cobO67j8HD8vng2J0p9DAg+U l7CB8WJbriNd9qywqwfcoGsLGKHNv/m73hOHq5j9bVr46GCs0u/s56KGpwHO4jvWhc50 FT6J3SAOCYSSvt+/VVKYawQncPAg//GgejSD637YWmR4GyOrDiTPSNjqNXgc011NsYOI mKBciViUPrJoP07ubK8NqvkJCUPd+tZbvNpXSSHGz7E6V3BqJvkfbNbPU8XbkMg1Jnke PQ== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2mxn0qjg8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:34 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8XZ0011748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:33 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8Xfp018499 for ; Fri, 12 Oct 2018 13:08:33 GMT Received: from kholmanskikh.ru.oracle.com (/10.162.81.17) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 12 Oct 2018 13:08:32 +0000 From: Stanislav Kholmanskikh To: ltp@lists.linux.it Date: Fri, 12 Oct 2018 16:10:56 +0300 Message-Id: <1539349857-10633-4-git-send-email-stanislav.kholmanskikh@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> References: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9043 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=908 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810120130 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Cc: vasily.isaenko@oracle.com Subject: [LTP] [PATCH V2 4/5] runtest/commands: add _sh to all testcases X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" To avoid existing and possible name collisions in http://lists.linux.it/pipermail/ltp/2018-October/009490.html it was proposed to add '_sh' to all testcases in runtest/commands Signed-off-by: Stanislav Kholmanskikh --- Changes since V1: - changed the naming scheme - changed names of all test cases in commands runtest/commands | 82 +++++++++++++++++++++++++++--------------------------- 1 files changed, 41 insertions(+), 41 deletions(-) diff --git a/runtest/commands b/runtest/commands index 4626330..ac15e8b 100644 --- a/runtest/commands +++ b/runtest/commands @@ -1,42 +1,42 @@ #DESCRIPTION:General Linux commands -ar export TCdat=$LTPROOT/testcases/bin; ar01 -ld01 ld01 -ldd01 ldd01 -nm01 nm01 -file01 file01.sh -tar01 tar_tests.sh -logrotate export TCdat=$LTPROOT/testcases/bin; logrotate_tests.sh -cpio01 cpio_tests.sh -unzip01 unzip01.sh -gzip01 gzip_tests.sh -cp01 cp_tests.sh -ln01 ln_tests.sh -mkdir01 mkdir_tests.sh -mv01 mv_tests.sh -du01 du01.sh -df01_ext2 df01.sh -f ext2 -df01_ext3 df01.sh -f ext3 -df01_ext4 df01.sh -f ext4 -df01_xfs df01.sh -f xfs -df01_vfat df01.sh -f vfat -df01_exfat df01.sh -f exfat -df01_ntfs df01.sh -f ntfs -mkfs01 mkfs01.sh -mkfs01_ext2 mkfs01.sh -f ext2 -mkfs01_ext3 mkfs01.sh -f ext3 -mkfs01_ext4 mkfs01.sh -f ext4 -mkfs01_xfs mkfs01.sh -f xfs -mkfs01_btrfs mkfs01.sh -f btrfs -mkfs01_minix mkfs01.sh -f minix -mkfs01_msdos mkfs01.sh -f msdos -mkfs01_vfat mkfs01.sh -f vfat -mkfs01_ntfs mkfs01.sh -f ntfs -mkswap01 mkswap01.sh -which01 which01.sh -lsmod01 lsmod01.sh -insmod01 insmod01.sh -wc01 wc01.sh -keyctl01 keyctl01.sh -gdb01 gdb01.sh -unshare01 unshare01.sh -sysctl01 sysctl01.sh +ar_sh export TCdat=$LTPROOT/testcases/bin; ar01 +ld01_sh ld01 +ldd01_sh ldd01 +nm01_sh nm01 +file01_sh file01.sh +tar01_sh tar_tests.sh +logrotate_sh export TCdat=$LTPROOT/testcases/bin; logrotate_tests.sh +cpio01_sh cpio_tests.sh +unzip01_sh unzip01.sh +gzip01_sh gzip_tests.sh +cp01_sh cp_tests.sh +ln01_sh ln_tests.sh +mkdir01_sh mkdir_tests.sh +mv01_sh mv_tests.sh +du01_sh du01.sh +df01_ext2_sh df01.sh -f ext2 +df01_ext3_sh df01.sh -f ext3 +df01_ext4_sh df01.sh -f ext4 +df01_xfs_sh df01.sh -f xfs +df01_vfat_sh df01.sh -f vfat +df01_exfat_sh df01.sh -f exfat +df01_ntfs_sh df01.sh -f ntfs +mkfs01_sh mkfs01.sh +mkfs01_ext2_sh mkfs01.sh -f ext2 +mkfs01_ext3_sh mkfs01.sh -f ext3 +mkfs01_ext4_sh mkfs01.sh -f ext4 +mkfs01_xfs_sh mkfs01.sh -f xfs +mkfs01_btrfs_sh mkfs01.sh -f btrfs +mkfs01_minix_sh mkfs01.sh -f minix +mkfs01_msdos_sh mkfs01.sh -f msdos +mkfs01_vfat_sh mkfs01.sh -f vfat +mkfs01_ntfs_sh mkfs01.sh -f ntfs +mkswap01_sh mkswap01.sh +which01_sh which01.sh +lsmod01_sh lsmod01.sh +insmod01_sh insmod01.sh +wc01_sh wc01.sh +keyctl01_sh keyctl01.sh +gdb01_sh gdb01.sh +unshare01_sh unshare01.sh +sysctl01_sh sysctl01.sh From patchwork Fri Oct 12 13:10:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanislav Kholmanskikh X-Patchwork-Id: 983052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="BZql5Cbj"; dkim-atps=neutral Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42Wp7Z3LlZz9s3Z for ; Sat, 13 Oct 2018 00:08:58 +1100 (AEDT) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id AE50B3E6D6D for ; Fri, 12 Oct 2018 15:08:52 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [217.194.8.4]) by picard.linux.it (Postfix) with ESMTP id 5295B3E6B9C for ; Fri, 12 Oct 2018 15:08:38 +0200 (CEST) Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 66C541000B74 for ; Fri, 12 Oct 2018 15:08:37 +0200 (CEST) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9CD4Fp1158659 for ; Fri, 12 Oct 2018 13:08:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=4DJ5VxtzyE/THqIrVRsw2i2P4cm1wKm9Somg0Tw15TQ=; b=BZql5CbjaLE9pbHTwOcRaYCBof75G8tS2HoUaGNJjIXztcixHaC0O6/UhZXpwuD8AqfG 9IgGmJQV7qCtdT4D5XlJe/U7wwh+Z3hTYxJQRYVMsoKxrZ/1Sc0MZ0Dcw/EUYE28m8Wg ySBttRQXEcQCQrahkWltp66CfOteGW4beqPbyeOGt25ZpRGcnD+xTy74BR4qIK2+97fy 6Mo9evER9D+CqXKsUrA4CfPd9Wsw0WJHSraGOlRSU42srA2QOJpZ6IBquNE3jmZJVkPP JRXdFh6o+09TGpDjR/9sECUikht2d9q3vYg7leT9KyDnu3IKTeBuKt2AxqkPDsYLxYkA 0g== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2mxn0qjg8s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:35 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8YQq000457 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 12 Oct 2018 13:08:34 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9CD8YjW032152 for ; Fri, 12 Oct 2018 13:08:34 GMT Received: from kholmanskikh.ru.oracle.com (/10.162.81.17) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 12 Oct 2018 13:08:33 +0000 From: Stanislav Kholmanskikh To: ltp@lists.linux.it Date: Fri, 12 Oct 2018 16:10:57 +0300 Message-Id: <1539349857-10633-5-git-send-email-stanislav.kholmanskikh@oracle.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> References: <1539349857-10633-1-git-send-email-stanislav.kholmanskikh@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9043 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=927 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810120130 X-Virus-Scanned: clamav-milter 0.99.2 at in-4.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-4.smtp.seeweb.it Cc: vasily.isaenko@oracle.com Subject: [LTP] [PATCH V2 5/5] Remove numa from the default scenario X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Since the move_pages tests are in syscalls and numa01.sh is known to be broken. Signed-off-by: Stanislav Kholmanskikh --- Changes since V1: - In V1 I removed move_pages* from numa, here I remove numa from the default scenario scenario_groups/default | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/scenario_groups/default b/scenario_groups/default index 160d66c..9adb75d 100644 --- a/scenario_groups/default +++ b/scenario_groups/default @@ -19,7 +19,6 @@ fcntl-locktests connectors timers power_management_tests -numa hugetlb commands hyperthreading