Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2412204pxb; Sun, 30 Jan 2022 15:41:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFTxnhJ4CKY7ip+tbbzXS4drjRFWRP6lajqrNV1mLMjyKbVjoXJmXua4EivOGgyV5/0kyp X-Received: by 2002:a17:907:3dab:: with SMTP id he43mr15715884ejc.599.1643585997293; Sun, 30 Jan 2022 15:39:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643585997; cv=none; d=google.com; s=arc-20160816; b=czXV1qu57U0C2fL2fUUvu/L+332RfguOi+7zPFoK7nxsyKl9uIk2t0Hq0HSuA9Jr6f qgGYJysGjg8Yl0lMGgE95m4CNxpdUJflDtLnJRNVtM/frS4Z+uMH6FjPR2MbKyIO0j7P +8o9A9N/uFLIHzoK6yfusss2PlsNBiJGbX+B4rf5bh7QnlwviWMCq+I++MwioaT10jqq FJhEnnoh69+bwcyBt5R6Oi3CLUGZn4m3R7GazKDPerjKabqimYNL/DMDcHeXuH5PRFmt mXI8Tvi9LRKWqWQElBfr4Y7+ZQfhHLE/GBwPgQ8MKOtm5T4Dl62waC5dDZ+aprNazV0L yhPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=YzOZljM4+kw5fApHznO2bKXKYmBDZpsJbWTYPrNljMg=; b=j46v8wUjhKhstqubdSDBKRp8mh0iiDn6JrP+gIi4H3DE2r706qkGM89yqEfTCqqVb5 3KVkbOPOm2iQNyORFC86//2oi7+l8ULw0n5w1803LefzgXEVoecC9IYemn6MV5/Q2rQd NHUK2eNkTmY481dUBLR9rMAd8+n2w9UExUqHbX+b+jKHAgeb+ys3u6djDqjJCypsLWfa Ob11iJr3LbBH0dYgfVO0b0+Q6hseYX+XQLr0WdOQApy+ps1I20LIA+/5v9l/jJpVUe18 HyLcuhBtzjiIiwDEn1IaxXqp/Mzww7S70ysdz93m7e+w0SUi57KStFG79+yE8BJFZD5Q RWIw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs24si7655266ejc.295.2022.01.30.15.39.23; Sun, 30 Jan 2022 15:39:57 -0800 (PST) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347872AbiA1KYX convert rfc822-to-8bit (ORCPT + 99 others); Fri, 28 Jan 2022 05:24:23 -0500 Received: from szxga01-in.huawei.com ([45.249.212.187]:16932 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347864AbiA1KYU (ORCPT ); Fri, 28 Jan 2022 05:24:20 -0500 Received: from dggpemm500023.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4JlYPH73jfzZfYV; Fri, 28 Jan 2022 18:20:19 +0800 (CST) Received: from dggpemm100023.china.huawei.com (7.185.36.248) by dggpemm500023.china.huawei.com (7.185.36.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 28 Jan 2022 18:24:17 +0800 Received: from fraeml714-chm.china.huawei.com (10.206.15.33) by dggpemm100023.china.huawei.com (7.185.36.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 28 Jan 2022 18:24:16 +0800 Received: from fraeml714-chm.china.huawei.com ([10.206.15.33]) by fraeml714-chm.china.huawei.com ([10.206.15.33]) with mapi id 15.01.2308.021; Fri, 28 Jan 2022 11:24:14 +0100 From: Roberto Sassu To: Mimi Zohar , "Guozihua (Scott)" , Jonathan Corbet CC: "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , wangweiyang , Xiujianfeng , "linux-integrity@vger.kernel.org" Subject: RE: [RESEND][PATCH] Documentation: added order requirement for ima_hash= Thread-Topic: [RESEND][PATCH] Documentation: added order requirement for ima_hash= Thread-Index: AQHYEcpHUD88EJ3n70C3otG2igs7kax0bcMAgAAWmYCAACQEgIAAM52AgABVhoCAAwr2kA== Date: Fri, 28 Jan 2022 10:24:14 +0000 Message-ID: References: <20220125090237.120357-1-guozihua@huawei.com> <36b6058f2cdf6bead917c06ecc6e8769bb88130c.camel@linux.ibm.com> <3933adf5-4e9d-6b22-2e46-55643c504f52@huawei.com> <71508a72b042da330d07a624cf499561c46195f0.camel@linux.ibm.com> <97142483-d7e7-e310-0cb0-30a81414cb57@huawei.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.204.63.33] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Mimi Zohar [mailto:zohar@linux.ibm.com] > Sent: Wednesday, January 26, 2022 1:48 PM > On Wed, 2022-01-26 at 15:41 +0800, Guozihua (Scott) wrote: > > > > > > The main issue lies in ima_template_desc_current called by hash_setup, > > which does not just read ima_template global variable, but also tries to > > set it if that hasn't been done already. Causing ima_template_setup to quit. > > Right, which calls ima_init_template_list(). So part of the solution > could be to conditionally call ima_init_template_list() > in ima_template_setup(). > > - if (ima_template) > - return 1; > - > - ima_init_template_list(); > + if (!ima_template > + ima_init_template_list(); Hi Mimi is it still necessary to call ima_init_template_list() in template_setup()? I saw it is called in init_ima(). Thanks Roberto HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Zhong Ronghua > Roberto, what do you think? > > thanks, > > Mimi