From patchwork Fri Dec 13 22:20:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 13907998 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38AC01953A1 for ; Fri, 13 Dec 2024 22:20:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734128423; cv=none; b=NLd6+kxqq186TdWUUy3oVlAmwuYUhPrVaFMlZWUa1elh0Lea4Ki4+KlPHtoEgP0Eda7YBxIB+2Gqcgg7CoCP2ICB9znTxdxklRsGgywzUM35BwKgc2uu6Ip5apeiyPC/WnvAEReYEypqaqvjOTmYi9ahEHIgUiz4ikZJS6A/2BE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734128423; c=relaxed/simple; bh=/S5vMNaGRvXNypISjO8oFcAjY1dbhjEBo5arTNQRRDk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U4EZcu8fufG4AhGwl7h0nKb3yuQ1eRpYMDZjKJ1F6Yxv1RQ8F5p+G0svTauCg1kwOH779PqAlD+CTFiP47PgDkzg5xgmJjpKyjFZCx6TxDuwNbbM+RnN+QwbiHo3mn0Udvcow9wWyUe3qn76VTv9XgV9uRK2mm9xptUzGcE+ldg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 576CD1F74B; Fri, 13 Dec 2024 22:20:19 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 229D2137CF; Fri, 13 Dec 2024 22:20:19 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id OBgIByOzXGf5QQAAD6G6ig (envelope-from ); Fri, 13 Dec 2024 22:20:19 +0000 From: Petr Vorel To: ltp@lists.linux.it Cc: Petr Vorel , Mimi Zohar , linux-integrity@vger.kernel.org, Martin Doucha Subject: [PATCH v2 8/8] [RFC] ima_kexec.sh: Relax result on unreadable policy to TCONF Date: Fri, 13 Dec 2024 23:20:14 +0100 Message-ID: <20241213222014.1580991-9-pvorel@suse.cz> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241213222014.1580991-1-pvorel@suse.cz> References: <20241213222014.1580991-1-pvorel@suse.cz> Precedence: bulk X-Mailing-List: linux-integrity@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[]; ASN(0.00)[asn:25478, ipnet:::/0, country:RU] X-Spam-Flag: NO X-Spam-Score: -4.00 X-Rspamd-Queue-Id: 576CD1F74B X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: Although d1e29adca6, which set minimal version fixed some false positives, it might be better to be optimistic and exit with TCONF when result is unknown due policy not being readable than "fail" with TBROK and TWARN. Fixes: 731aae8121 ("IMA: Add test for kexec cmdline measurement") Reported-by: Martin Doucha Signed-off-by: Petr Vorel --- testcases/kernel/security/integrity/ima/tests/ima_kexec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh b/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh index df8658655d..c52d767fe7 100755 --- a/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh +++ b/testcases/kernel/security/integrity/ima/tests/ima_kexec.sh @@ -95,7 +95,7 @@ kexec_test() ROD kexec -su if ! measure "$cmdline"; then if ! check_policy_readable; then - res=TBROK + res=TCONF fi tst_brk $res "unable to find a correct measurement" fi