Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1898337img; Wed, 27 Feb 2019 07:17:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IbwaS9DXvp7p1vuN84ESv/bzqoGbHC0R5zb0nmLYjI6oMtzljfp6wpTHau/WNdY4A+lrEEH X-Received: by 2002:a17:902:6b47:: with SMTP id g7mr2760401plt.100.1551280666808; Wed, 27 Feb 2019 07:17:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551280666; cv=none; d=google.com; s=arc-20160816; b=Uv5+DJAL8vCDaqaBMC2AqYUYacBxx52YigeJiOSpzW2wkZBOboHOc4w091cKeFvX6M pEaI9q9HjC2FRBCmJUEUpBoeKElzhxBvKA+fLoL5Uxati9RY4+JAQtwuKM4tFi05GF18 8chNKEIPrUAUxnbxPnpwGsDY/xnVVdUdXQEqN7H95UAGpVNXwiVpc7o5GRa9Bf+r8ypo 5A82sD0dYQV4Dxg/18SfGP+KzMzgIr9lIs2K0MxyQOBzZ+ZYII+FBibtaS6qfE9aBtqg g9W479UIubZCjsjqWiv+YEKP+XvW3crKyZa4M8cV0fRRIri5lfcrMfmILi27v2F4HRRW NxZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=4PhOO3QF/9xoVE4OYGrnZ1rW0NjiSvznAIGKlR9B2aE=; b=YDEabsowoXjbhLGgTjmQT1eCjMt6wnBgzZhEp2swrcEEe4bNIVkbGtgIZytoS8lAW+ na1gjlruX3ZrYabb/DBzRsgFzzkUhiXYoIKYCMRe5rYbZfDbwOW1eVe/e7JgDOJCpQOV kWp4J15Ho8qMDwqX6cCbVdf1fZ6gTFDCNyTexMC5H725v5KRuGJnjg33nvh1HTl9on2B 2GaQ9IkGqjAkC2k0d8cDFAVoiRslvL+iYVtckfSTEUgD29n4gMT/AMULJn5+yK2/694e rUtg4ci3nJVPbgTx/G5tHhp4t2IhZZKdNXCOPndnYlIrZZkO1LSu4dZ0td/l3OimJibR Cinw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l61si16004611plb.6.2019.02.27.07.17.30; Wed, 27 Feb 2019 07:17:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730561AbfB0OPN (ORCPT + 99 others); Wed, 27 Feb 2019 09:15:13 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56982 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729848AbfB0OPM (ORCPT ); Wed, 27 Feb 2019 09:15:12 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1REE6x7142330 for ; Wed, 27 Feb 2019 09:15:11 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2qwuva11w2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 27 Feb 2019 09:15:10 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 27 Feb 2019 14:15:09 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 27 Feb 2019 14:15:05 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x1REF4oN27197516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 27 Feb 2019 14:15:04 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A6C3942042; Wed, 27 Feb 2019 14:15:04 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A558042041; Wed, 27 Feb 2019 14:15:03 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.106.105]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 27 Feb 2019 14:15:03 +0000 (GMT) Subject: Re: [PATCH v2 5/5] selftests/ima: loading kernel modules From: Mimi Zohar To: shuah , linux-kselftest@vger.kernel.org Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Petr Vorel Date: Wed, 27 Feb 2019 09:14:53 -0500 In-Reply-To: <19d494c6-ecb1-b884-2d23-5f556b3ec05b@kernel.org> References: <1551223620-11586-1-git-send-email-zohar@linux.ibm.com> <1551223620-11586-6-git-send-email-zohar@linux.ibm.com> <19d494c6-ecb1-b884-2d23-5f556b3ec05b@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19022714-0012-0000-0000-000002FADB80 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19022714-0013-0000-0000-00002132839F Message-Id: <1551276893.10911.23.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-27_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902270096 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shuah, > > diff --git a/tools/testing/selftests/ima/test_kernel_module.sh b/tools/testing/selftests/ima/test_kernel_module.sh > > new file mode 100755 > > index 000000000000..4009e1b60b03 > > --- /dev/null > > +++ b/tools/testing/selftests/ima/test_kernel_module.sh > > @@ -0,0 +1,96 @@ > > +#!/bin/sh > > +# SPDX-License-Identifier: GPL-2.0-or-later > > Same here > > # SPDX-License-Identifier: GPL-2.0 Sure, I'll make the change here and in the other places. > > +get_secureboot_mode > > +if [ $? -eq 0 ]; then > > + log_skip "secure boot not enabled" > > +fi > > + > > +# get the kernel config > > +get_kconfig > > + > > get_kconfig() will be good candidate as a kselftest common > function. Is that possible? Sure, where would it go?  get_kconfig calls log_skip.  I didn't see any common logging functions.  Petr suggested defining a set of common logging functions.  Did you want to only make "log_skip" a common function or the other logging functions log_pass, log_fail, log_info as well? Thanks, Mimi