Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3421882pxf; Mon, 29 Mar 2021 01:35:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGPUnFUDnYK1i6kr9fODW92E6GVwdZo0NdXC2JbF814LAAVxe1dbuzmhRD1VquOxPsCsNq X-Received: by 2002:a17:906:c414:: with SMTP id u20mr26954464ejz.215.1617006942919; Mon, 29 Mar 2021 01:35:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006942; cv=none; d=google.com; s=arc-20160816; b=JwZ4APbBKVv3MsI42V+qRDwWB9AihPcubYY73MVMx4BWHzacU3q1zD57ZQfPlf5jJi nUugN5Sg+858e0PrErhuh0VUw6z+8Z6eeKRoydYJqGR6Glm9YpHDzrvzm+eVuVoSNLxy 99fI2p6d9CFCbEYinBbBs2UprMN2Bzsxz4J2Z65p6I6BYTL4MJrosX2FvL/NgJeWTb7o 5JHXw+41PgboG0HcQK4uIGNp/J3pDjcWb88zqngKPYJVlvA+sFvNb2mzdAOt4IjnoJKL /Cu4EehGjzb5cfBAUTWZo9eEKTDkg2NRNvrQJ3lQzcJSMxF32w2fo3KrMWyzlhnC1byN BA6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Tvi9fZiwJsmqaS3OeTEUex5wUu8Oan1MkNIHQP3FTys=; b=cqlsmU/EHwho5I7KGjRJhZAhycjYS+F0qHUEP8INhF0OrwO+2vW6Z8b1jgNFAaSdoq I43dJpurNjLeOj/Mh8H3NoRS8yy20VUBm3Qgx4RtNJypGnMo7qbD62E22y41v04z2hFd REuc/a6MDycqbx5bwcprl3h8g4aFchvav0qBEbgLaDCQAMKUQ8wM24ndybAF1IhL22aA 0fAe1eRYQb+MQbLBchQpxh/hR8yZflmflQ7rMxE+5Ot53MQncOBjpntDKF8PWV/IZpmx ea8aH6f5JQVB+3UKyMtQ6A7Pzun+Jxaq7UaRhLECTh45vs5u6MiBLcmooQJp0LjBn1CU UcNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nj1UCvXQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si12333449ejn.151.2021.03.29.01.35.20; Mon, 29 Mar 2021 01:35:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nj1UCvXQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234306AbhC2Ico (ORCPT + 99 others); Mon, 29 Mar 2021 04:32:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:37344 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232209AbhC2IUZ (ORCPT ); Mon, 29 Mar 2021 04:20:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C201761959; Mon, 29 Mar 2021 08:20:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006022; bh=0IXQZf3dDztMvaSdtq5qt7YZM/yfrIAaDdJhNr36Yog=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nj1UCvXQG4R4s8ip+hTrgar5p8mq4TpDntRHe8plHaGyykRXjFaC1tbRIbVJmnKID kvXqyTdowMcfHjfJOxDETNqCoH861aQ2/CDmy1C732T9ZeimwFOU/lQIVVQhpWgQ1w AyeVdk1wHDn3TPbF29ZL3eRBp6OMlUd9vwUKIyDE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, JeongHyeon Lee , Mike Snitzer Subject: [PATCH 5.10 089/221] dm verity: fix DM_VERITY_OPTS_MAX value Date: Mon, 29 Mar 2021 09:57:00 +0200 Message-Id: <20210329075632.183656895@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: JeongHyeon Lee commit 160f99db943224e55906dd83880da1a704c6e6b9 upstream. Three optional parameters must be accepted at once in a DM verity table, e.g.: (verity_error_handling_mode) (ignore_zero_block) (check_at_most_once) Fix this to be possible by incrementing DM_VERITY_OPTS_MAX. Signed-off-by: JeongHyeon Lee Fixes: 843f38d382b1 ("dm verity: add 'check_at_most_once' option to only validate hashes once") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-verity-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/dm-verity-target.c +++ b/drivers/md/dm-verity-target.c @@ -34,7 +34,7 @@ #define DM_VERITY_OPT_IGN_ZEROES "ignore_zero_blocks" #define DM_VERITY_OPT_AT_MOST_ONCE "check_at_most_once" -#define DM_VERITY_OPTS_MAX (2 + DM_VERITY_OPTS_FEC + \ +#define DM_VERITY_OPTS_MAX (3 + DM_VERITY_OPTS_FEC + \ DM_VERITY_ROOT_HASH_VERIFICATION_OPTS) static unsigned dm_verity_prefetch_cluster = DM_VERITY_DEFAULT_PREFETCH_SIZE;