Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp25857pxb; Tue, 23 Feb 2021 16:57:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyx639c0wfiNZtHTa56XIDefUJECTo1wX/33nCSWvjPYV5Ctic9PR5c+OEZtStcy8wF7Jls X-Received: by 2002:a17:907:2d8e:: with SMTP id gt14mr29124001ejc.325.1614128232307; Tue, 23 Feb 2021 16:57:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614128232; cv=none; d=google.com; s=arc-20160816; b=VaBvT4zFsy98PlyfY+zlCM3V28jaAy12u9/x0K8P/jCWy6556trfm7N5oPbOYRR5gm xKxA+NM8FXsjEVdt8UbcxyLLSAWVhwgM+queX02XJEbpwr1y85Xub7dO/tmI54tXyKGm 8C/5H79TvpC/SsnVSUyN2Zyal3OTbbpQ3P/1tbUroRu9Kdm2nd/ahvU4P/meBQCe27BE tVYCbAwkETiXfV5AGCkWrjnlObehSo+6pdO6PZZkA7qyO1UcTIH79E3A/BZhP+ogsClK 3WrsqEeduzW++rs0RveMR2TEaRMkRnTSryguS7lyB4pDFU70qeM0uzWRXFJ/Dm+4mD7J jxaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date; bh=5q8CycFsLWXaGvLPVKX3l8pLFYOtHAYeaeeeiP8QzGQ=; b=zSGUa6z1jTgmAFmFxlIoqDAOIS6FAGPZjsnKJ1dqIsB2XwT8DDP0K6XX/N7z+GC3cO +6grPI2/Q3OsSoaWwK/yGC5t98/sjqrQbi6z3Fkght/q5rsuve6qIcUSEbDNYJIOPJnD GIb3t3sj3K2pa5NGrb6U6nWkbZh0MlbMDExmc0Q/TvmYSMfIEhGQR6k+ExX5MbDjdgsi 6DB/qfjfeancjQ/fB3PISl0HzTs96yVg0+XbzofCQVUPck5KjH4lBm0MS3AVt9bSXIpT QYx5Tec20OaDNUX9EdtcWno7Zqvb3YQBnLDB52kySWYDs9PHJ/74Y4TJLvBzPJmFBfWz xrig== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si252231ejn.375.2021.02.23.16.56.22; Tue, 23 Feb 2021 16:57:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233852AbhBWXkR (ORCPT + 99 others); Tue, 23 Feb 2021 18:40:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:32968 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233839AbhBWXep (ORCPT ); Tue, 23 Feb 2021 18:34:45 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 93768AC6E; Tue, 23 Feb 2021 23:34:00 +0000 (UTC) Date: Wed, 24 Feb 2021 00:33:58 +0100 From: Petr Vorel To: Lakshmi Ramasubramanian Cc: Mimi Zohar , Greg KH , bauerman@linux.ibm.com, dmitry.kasatkin@gmail.com, ebiederm@xmission.com, sashal@kernel.org, tyhicks@linux.microsoft.com, linux-integrity@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] ima: Free IMA measurement buffer on error Message-ID: Reply-To: Petr Vorel References: <20210204174951.25771-1-nramas@linux.microsoft.com> <7000d128-272e-3654-8480-e46bf7dfad74@linux.microsoft.com> <6a5b7a1767265122d21f185c81399692d12191f4.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, > > > > > > > > This is not the correct way to submit patches for inclusion in the > > > > stable kernel tree. Please read: > > > > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > > > for how to do this properly. > > > > > > > Thanks for the info Greg. > > > I will re-submit the two patches in the proper format. > > No need. I'm testing these patches now. I'm not exactly sure what the > > problem is. Stable wasn't Cc'ed. Is it that you sent the patch > > directly to Greg or added "Fixes"? > I had not Cced stable, but had "Fixes" tag in the patch. > Fixes: 7b8589cc29e7 ("ima: on soft reboot, save the measurement list") > The problem is that the buffer allocated for forwarding the IMA measurement > list is not freed - at the end of the kexec call and also in an error path. > Please see the patch description for > [PATCH v2 2/2] ima: Free IMA measurement buffer after kexec syscall > IMA allocates kernel virtual memory to carry forward the measurement > list, from the current kernel to the next kernel on kexec system call, > in ima_add_kexec_buffer() function. This buffer is not freed before > completing the kexec system call resulting in memory leak. > thanks, > -lakshmi Mimi, Lakshmi, it looks like these two fixes haven't been submitted to stable kernels. Could you please submit them? Thanks a lot! Kind regards, Petr