From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE4A218E0C for ; Wed, 14 Feb 2024 21:04:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707944682; cv=none; b=g08kQEw+C7Asg34f6it8nsVwN483GA5xFalX43QlvyeRE16Lkq8MpeAsyzrie67pRY0LrON89M7VlfpJ2AXOwsxdb8290xuBcQ/ynTot7i32vX7T09E1pd+EgW6mvZDEQCFL3I3pXoRrXyHtT5B3yKLuw5xrcOYAAnCPqs0rCv8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707944682; c=relaxed/simple; bh=4cgoQA0uOaKApZlR/TVs1KVmLIfcFOAw974qQYjg7qc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Q8u0XzYztgWchGk7aY0O0ZnZ45jLOXhlQXDxVjwQZb3pHQwhcj4S9hPoP1/9JS04Ncs48MzX0BeCgz+M338jH1VATUK+HF4esdeD8mV4k4mRYQA8XzEk9T9LJlmaql8cH3CRUybZ/GtQ/UciIsG/fhM7EkHw2c1F/hMdO0fcFkg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=Xl4a1Rkz; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Xl4a1Rkz" Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41EKmL89026717; Wed, 14 Feb 2024 21:04:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=Qq1KQloiMPLysQBqSBamrI0OR6iWHmkA2GIWqFqRSeA=; b=Xl4a1Rkzv/AOa3HYPPRWXSUQlt2cZp14bFf5fnrpwA4i2h50r7R6hJDjDr/vu9NW+yC6 +x+h0J3YBi6TbolH0uwgjoRNJzITVzQbGrfThl/z6sK5BJZCeUzWO1piP6TH0USmWnbc A2S4tHRn6FIRz4y4i3Bhs3EZc+/g1Sb39h4eb2lvD1rA8XrjC3wPU+dUI8GWgolXfIek E18uGcCeoOabFHYJKlNK6sDRyqJaW9Mui8U38YFSN84h86oil+krCHOUYSw0t7fAJGEo RQEZw2gKAcfEGSEbPf92WgYP0z13FPCPlLOe2Nq+sksOuLlRFIz/kfevG1RLGL5Ek3Mf 8Q== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w94vera3h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Feb 2024 21:04:06 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41EKjK3K004247; Wed, 14 Feb 2024 21:04:05 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3w6kv0gp4t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 14 Feb 2024 21:04:05 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41EL42Y122872758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 14 Feb 2024 21:04:05 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA13258059; Wed, 14 Feb 2024 21:04:02 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 691FD58043; Wed, 14 Feb 2024 21:03:59 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Wed, 14 Feb 2024 21:03:59 +0000 (GMT) Message-ID: <1569c07b-d66f-441d-8567-2669413c2a08@linux.ibm.com> Date: Wed, 14 Feb 2024 16:03:58 -0500 Precedence: bulk X-Mailing-List: linux-integrity@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 8/8] ima: measure kexec load and exec events as critical data Content-Language: en-US To: Tushar Sugandhi , zohar@linux.ibm.com, roberto.sassu@huaweicloud.com, roberto.sassu@huawei.com, eric.snowberg@oracle.com, ebiederm@xmission.com, noodles@fb.com, bauermann@kolabnow.com, linux-integrity@vger.kernel.org, kexec@lists.infradead.org Cc: code@tyhicks.com, nramas@linux.microsoft.com, paul@paul-moore.com References: <20240214153827.1087657-1-tusharsu@linux.microsoft.com> <20240214153827.1087657-9-tusharsu@linux.microsoft.com> From: Stefan Berger In-Reply-To: <20240214153827.1087657-9-tusharsu@linux.microsoft.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: XhSo3nQuQeW7beoLQvFLaAp5VwXeJMaw X-Proofpoint-ORIG-GUID: XhSo3nQuQeW7beoLQvFLaAp5VwXeJMaw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-14_13,2024-02-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402140163 On 2/14/24 10:38, Tushar Sugandhi wrote: > The amount of memory allocated at kexec load, even with the extra memory > allocated, might not be large enough for the entire measurement list. The > indeterminate interval between kexec 'load' and 'execute' could exacerbate > this problem. > > Define two new IMA events, 'kexec_load' and 'kexec_execute', to be > measured as critical data at kexec 'load' and 'execute' respectively. > Report the allocated kexec segment size, IMA binary log size and the > runtime measurements count as part of those events. > > These events, and the values reported through them, serve as markers in > the IMA log to verify the IMA events are captured during kexec soft > reboot. The presence of a 'kexec_load' event in between the last two > 'boot_aggregate' events in the IMA log implies this is a kexec soft > reboot, and not a cold-boot. And the absence of 'kexec_execute' event > after kexec soft reboot implies missing events in that window which > results in inconsistency with TPM PCR quotes, necessitating a cold boot > for a successful remote attestation. > > Signed-off-by: Tushar Sugandhi I successfully tested this series on ppc64. I will give you a Tested-by tag in the next round. Stefan