Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2862220imc; Wed, 13 Mar 2019 03:15:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzSRQFcCCcGJf5INVr1tZtlfAZMqDSfSLqcB5HG1KlgdtACMdEm+LNcA8sFIDStJq4+A4kp X-Received: by 2002:a17:902:b617:: with SMTP id b23mr16479606pls.200.1552472116618; Wed, 13 Mar 2019 03:15:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552472116; cv=none; d=google.com; s=arc-20160816; b=Aw/NEvy301eDW6ZY0TxvEW/l5l+aOXBlFC5dPKmcqJ7BAxl2MIdGFfzPWfExWALpge dF5ogV168h0D1d4xWQMZF/PQmLuxsz3ENBN4qMzg2EK7p/aOzYThnrwj88d/UHxqtRL3 yryywqH5Xho3TGUgJeQdMDgzbj/9kjabBUcRuHalYVl2oVrjPl4IeY6IN8vD3ipWotlW g9x2GdJEt2mlfjpc1zTu5jnp+y6Oecf6vuoM9/iSyqI9oJZrqmOswRciFz8mTjPVl8vt 675yDqadrHX0/xKzk8PKO0WE6s1y2Pd35iAhjX40v6xMc0fs1Y5CiTFVaKh6dOMtXCRN bf8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=809JYTudCo2fglJC3BWpqvvy8Mf+e8ojxOYKKh6TaIE=; b=c+Yn59Gc/xSm13+ieNigWvGWMgBUFLjSXk13K0XqvPGiC/KkeZlDb/KoolOFGbQzF4 2b8ouUf7h2HshUI6XE1nKx38/31o/XOccbrxoTBwDVUZAxrHdn9uRhZNJWZMB9xQjkPf Zl/a6mKsIxFTALXjfTSgSnrjIw0UtQcjNlLM65wQhVbRGyX2o4kfbbeEiGovPwIGGSZp YdPcOnCc6aMeiriVM4LnelxQdizQpaKycP5gU12hoCP4AFViw0KSMVczwLUjn5JlQtC3 qNpHuBdqnMF3REtc57XAA0rKX3l2wnDR7VriWDe3MIZK2SdXlllqVbaYM1PzzfyUciCQ eyQg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d8si10567335plr.409.2019.03.13.03.15.00; Wed, 13 Mar 2019 03:15:16 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbfCMKOj (ORCPT + 99 others); Wed, 13 Mar 2019 06:14:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:52602 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725889AbfCMKOj (ORCPT ); Wed, 13 Mar 2019 06:14:39 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DA033ACD7; Wed, 13 Mar 2019 10:14:37 +0000 (UTC) Date: Wed, 13 Mar 2019 11:14:36 +0100 From: Petr Vorel To: Mimi Zohar , Dave Young Cc: linux-integrity@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 5/7] selftests/ima: kexec_file_load syscall test Message-ID: <20190313101436.GB25643@dell5510> Reply-To: Petr Vorel References: <1552304473-3966-1-git-send-email-zohar@linux.ibm.com> <1552304473-3966-6-git-send-email-zohar@linux.ibm.com> <20190312121001.GA18510@dhcp-128-65.nay.redhat.com> <1552409474.24794.63.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1552409474.24794.63.camel@linux.ibm.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mimi, Dave, > > Frankly I did not read and followup much about the testing code changes, > > not sure if it is doable or not. The code sharing under testing folder > > seems not very good. For example the basic check_root is needed by > > different parts, but all have its own implementation. Anyway this is > > not the duty of this patch set. > > Also the selftests/lib/ is not a folder for sharing code for different > > tests, it looks a standalone test instead. Yes. Thus lib/ folder name is a bit confusing. > Shuah suggested upstreaming these tests first and defer introducing a > common set of functions to later. Make sense. > > So if split kexec tests to another folder is not doable please just > > ignore the comment. > Left in the selftests/ima is a similar test for kernel modules, which > uses the "common" functions. ?So either we wait to move the kexec > tests or allow them to reach into the ima directory and use the > ima_common_lib functions. I guess just load ima_common_lib.sh for now would be good enough. @Dave: BTW I has starting to work on kselftest common library. I thought I'd spent some time on it before posting it, but I might even send the small part I've done so far so we can discuss it. > > BTW, does CONFIG_KEXEC* is checked? in case a kernel without KEXEC or > > KEXEC_FILE compiled in then the tests can just return directly. > Good point. ?Now that there is a common function for reading the > Kconfig, I'll add that check to both the test_kexec_load.sh and > test_kexec_file_load.sh tests respectively. > Mimi Kind regards, Petr