Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp21328lqb; Tue, 16 Apr 2024 07:47:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUxwQADON8pujLHaqUfylFeyj6ptGzD9cLutNLDDawChyktVUQFkXwxkLPerprKj6AgRjcKv7PxeJ6kBQr3T5Mgg0zcQbVO0u7o3iLtQ== X-Google-Smtp-Source: AGHT+IG31KE+lH0RwKAMqqmADgZkyiLia/46u6aVSbyotBX33ATcUBfUHZmyfP5t5om/KKzw+Ame X-Received: by 2002:a17:907:1b1d:b0:a52:182c:f6cf with SMTP id mp29-20020a1709071b1d00b00a52182cf6cfmr10160041ejc.32.1713278856094; Tue, 16 Apr 2024 07:47:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713278856; cv=pass; d=google.com; s=arc-20160816; b=EOZxEeLWnmmQF1ji0dm8kjs0+JIKbm8jPKmGCuA0HGCkEi8Bv80c+Fm4rZoQFDKvZk WqxL4fYUwB8T8pd3KlOcrYLYogw3b15Qn6Hu7eKUYLMeyib8WJjZFtW9xYrfBotccpqp szKG3OZauYcSwFYC8HQJ0HXBCkS3kFa8zs5EK9OURTujx/uET044rlr1Yau/2XJHGCU1 CYDQAiy5YRLglASJWHSJmwOA96QDOYoUfi1ArCtKUzt0X3ohnGAoKhKPvVXDg3OBgwW6 ymI7e5c/Q3xfeY+mFGvG1sJ6kttb6yjt6buyA3SX6Nb6J3bl1XT+dXInYigMRMNcFlKU Xd0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=VdUNeq7IC88ql40wcww2SSOHhBozeb4bC7ktgyYktbA=; fh=YUqWZZTiAW8vx/LqLAwzzpte9gfHfCUUWL/NOmsB7bI=; b=VJTBAY15ZZfwYzN0PfohCI3JAmrtzTNwybw3/+eZ7Vcj1lC3n3th1meKD0uQpMvZlK ZStd4TORf51+PbWJYfBjXyM8oniYOt6Ttg2/FGRhclQ+2gSPBjUMiTmTVCrkMuo4MDvM AiOMZ2/pa+c2wNcud0PUDt+SJrnqDFhY+fK+uBHjj5Kd/hHjnY4PxrBAIMFn15lxUYvR djZbC65LEoF1ehB/2vmZzBQ++D4sQpRWP9jNPBc0gGOb4FabG0a0Vyli5NrzslaT6bOD Iw1dEhsZN/KOIyuucRTjkx9weZr0POj1kbu7DoNwuGyH5hzV11NpvLRo58IkLVlrX77w oPkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=UxN+QcvH; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-147055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c22-20020a170906171600b00a51ae5d5475si5720102eje.223.2024.04.16.07.47.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 07:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=UxN+QcvH; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-147055-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147055-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CEE551F21910 for ; Tue, 16 Apr 2024 14:47:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7AC612E1D9; Tue, 16 Apr 2024 14:47:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="UxN+QcvH" Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (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 5363F12F392 for ; Tue, 16 Apr 2024 14:47:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713278835; cv=none; b=mUBHt6t2NDxqhv/A+0q1yYKly7ee8cYCm92A7lUe7i1dsLC1/dOU6vWIo6x7f8n3imRBN+pqs/qtaBTrsUktwluh3LvqQSVJdncUt5DcIM7AjWkcY1BrMYVwXPDR9xr+2ow/qG4t4lCY/JS3e+dlL4eOvNt6DiRRehD8Ye0kpuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713278835; c=relaxed/simple; bh=lpIRWhyVZ0w6q5mXIuwstpp9Haqu8fvuxrXiwMYh2rk=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=nef0cGJsoiE0N2OKl/VZVRPYlU/4I83kgOp78KfmUmOrTaorp6auJBHxiB4Vbpz1Mr+kBQzW/E9ZVOxEz4lQqYM03zyTi+hR6TeyfXkc72XTQvFSZxaXLHBQsQPe7echuOS+aEHoK9x0pLrz85Z20bYm1+MtBLN8JghRpABHzNY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu; spf=pass smtp.mailfrom=szeredi.hu; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b=UxN+QcvH; arc=none smtp.client-ip=209.85.218.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szeredi.hu Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a526d0b2349so276374166b.3 for ; Tue, 16 Apr 2024 07:47:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1713278831; x=1713883631; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VdUNeq7IC88ql40wcww2SSOHhBozeb4bC7ktgyYktbA=; b=UxN+QcvH6qyWiipF31MNXyIb++13ZTuftGyKGO1g1GIJgq+DwD8444IfIIVuTw+WAg 9+sx7Vtga1lPpZ7tgzh9foJ+w3CyRxDNSXut6NhkkwgDMrifb1cmrsT01bkjVvham2oL w5NqhZQ/HTgbSJth9ZfmW3KQq4dMPOhFJVABI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713278831; x=1713883631; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VdUNeq7IC88ql40wcww2SSOHhBozeb4bC7ktgyYktbA=; b=qs8sCKQrmEkR0zcaprbtbMMI4zuGICcCD2wcZrQM9Z+QYdadpxITqyoQgCHTTaSuhI wTw9LiF5q/elOUiqbmMRn+5bsL5oxWzFfaPWKtEat3WW2TFaPCZu8scUzWWM7+gjj5OM 8eE2H7RwqL0t5hjgf9u5rGKqpIVKEOVN5QezDqamtD+RQFd0cQefHInNIvZMYc6ff+29 XQuaPuAfUCX08V2XEhfUkJPv9PsVnsReIFy/4TBF333OYZW3ZR/+MZrW3omH87dgS2rz g6uZW2Piz+7CRqDqmvuReeJRr4a3NNKdkGXDntjhVOIafR4ZSPvHpTtJ8A/p7W7gDKR5 s52Q== X-Forwarded-Encrypted: i=1; AJvYcCURLVSNPU5Tb4yMMBdAgn4kMMqVKhhXui1lPrFMu2su7Z8vXrf1t/hqk2zOfa+oI9eqW6OmSxDUknWX5zgLc960Vf3VXtCRkq+w68aa X-Gm-Message-State: AOJu0Yw4CEXoewIopHiSMhiHAMik8OGpsfhJhHTTgthoRjKz1CTfE/qY Z0wYHg24kJe6JWGOPz5/7s1OXbYbrKX/eGBjSCZf23/SwWDt6WaQPUMA1BzCU9ozi9Xmpus6AgQ kj8eDt7gbSMve+aT+/eDK0QdcdZzCYbb7C0TirQ== X-Received: by 2002:a17:906:c309:b0:a52:4246:7f65 with SMTP id s9-20020a170906c30900b00a5242467f65mr5693156ejz.35.1713278831418; Tue, 16 Apr 2024 07:47:11 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240412140122.2607743-1-stefanb@linux.ibm.com> <20240412140122.2607743-3-stefanb@linux.ibm.com> <89b4fb29-5906-4b21-8b5b-6b340701ffe4@linux.ibm.com> <52645fb25b424e10e68f0bde3b80906bbf8b9a37.camel@linux.ibm.com> In-Reply-To: From: Miklos Szeredi Date: Tue, 16 Apr 2024 16:46:59 +0200 Message-ID: Subject: Re: [RFC 2/2] ima: Fix detection of read/write violations on stacked filesystems To: Mimi Zohar Cc: Stefan Berger , Amir Goldstein , linux-integrity@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org, roberto.sassu@huawei.com, Christian Brauner Content-Type: text/plain; charset="UTF-8" On Tue, 16 Apr 2024 at 14:18, Mimi Zohar wrote: > Originally there was a single measureent unless the filesystem was mounted with > SB_I_VERSION. With commit a2a2c3c8580a ("ima: Use i_version only when > filesystem supports it") this changed to always re-measure the file if the > filesystem wasn't mounted with SB_I_VERSION. Does the i_version get stored and compared only while the inode is in memory? In that case I think it should be possible to support a version number for the overlay inode. Thanks, Miklos