Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp638223lqd; Wed, 24 Apr 2024 12:12:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvh2+ODQX7xc/l8ic0nmlvWSVMw0UZcxo/Bc44JcGwVdpPWQRnla4c4UdmUJ4wDDrFAr4bmRWoE1RBl5Be2F/2aIoQD2ujUvU/QMy5dg== X-Google-Smtp-Source: AGHT+IHh8y3ZKZh3VYkuMT+eFjFXZnwOzztPilqIBOttm/pVMvhfafOFfW/S3MVB/WkOanCsc/Sx X-Received: by 2002:a17:906:b811:b0:a58:96fc:bb53 with SMTP id dv17-20020a170906b81100b00a5896fcbb53mr1533191ejb.20.1713985949849; Wed, 24 Apr 2024 12:12:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713985949; cv=pass; d=google.com; s=arc-20160816; b=Uf4/+kaQtncJ6Xn5OtfUSHI56uNqYv3ME6dvACPVxkejdsGzXSlFpHcBr1VgqURL0l X2aj1xG/2mojzW7R6V/l426+4J6PTW8oqhWJksRojGdYKe2eSmW6kSoxleaw+qpxDwU/ /w+3om1rUff7zzMprUFrRr1HNFmjpMoze/CmVpvQjUSD8RCwQfgquxMSMC8DX8xeoGze QtRE1hUgLE3VNzeg0YljDrAGR7EmD7RoBg/YFvCcFVCXFLqPIyP0tJwkeq1kvpkIupXD na/8vUsJXvgu6SJ+kNJCxCBE3NwZJQTS7JHH3gN1+O4sBldPdc8Q/XAQ/aSoR4WGFxFR qLdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=CsoYNRdQdFyYPOpFhRGIWu2HF17TLBE1BjWiO2/KXZE=; fh=ynmEtEIe2Y2bOwYPbUOp/Rx6ilxYjG8MSm8tPsRJsi0=; b=sBJwrisEto+5f6M/5uXeb9Gt8iZOB4htWY4kxIKAsePrslxPmU+ey4p8pVNmDBfhyO yz7NEfccT8lZ/qhKEWj8yi0cePcGnvJT1ioh6SkNPkjLrffYqni06F/l/2u6nzV9HK3k yrhQKzdJbPs3awmFD+X5FRY6487Nn+/lWd6aGdISl20MawA/roixZ8domlUk6VBODDOO i15YC0UfHFlwo7HONZBLFboTRXLEF0SFQ/NwHqJ351NZFcVu3q5GYiK28e81qFGaBPpI 1kHg/khoheLFG3w8K9WCU/kZD2TzsNUHqG1Uki/AZnsOknQv6iIVL54dETS8DpXdhSSX n4rQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K8jCInls; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-157577-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id he7-20020a1709073d8700b00a52225ba13asi9861539ejc.25.2024.04.24.12.12.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 12:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157577-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=K8jCInls; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-157577-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 0E2A51F27D96 for ; Wed, 24 Apr 2024 19:02:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E623F1DDF4; Wed, 24 Apr 2024 19:02:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="K8jCInls" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 944561CD23; Wed, 24 Apr 2024 19:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713985320; cv=none; b=TxfrnL6ivfSkLpxun9Gnbz30n6vpQSBXK/qhrBNjUcZzZviyZAn/ZDRbtBnr4Zw7m/cmfZA4PKd46W7gMZIlH3hu6WDwwaXNVh2yT+QwwBeKZ32jvwsPXpQKyafYx4gEKBTYp+LnaRes4vHSdniL2Ru6G/SKX1X3FozofIzeEcA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713985320; c=relaxed/simple; bh=Q29+WUKSF1/TImyYIfU6qDFvpXG3ngAxtBKm3rf53yo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=WBm6cm+dznZ8lGNT4Ft8LhPgu4Zu7ZNBp+5YoApMpkvQh5SYBiXuYbO9BlSOs0swJzeygixHQm6XyT+BYLh21Ri06+LzY134uRt18FBH+F8kvJ6sNaVFf6lJJyP33ekqlir1oDICB+BC1MHPoBEZBAvmGVs30aOVAwYcd1o5+0E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=K8jCInls; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713985318; x=1745521318; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=Q29+WUKSF1/TImyYIfU6qDFvpXG3ngAxtBKm3rf53yo=; b=K8jCInlsDGfHGLBmaM3hKBGRYTMg8rFSZZan5ZjRuGPTAPCIUIYuQEix u7tFCBXQlCDsyBX59uAW60wUKm87oA/+vQLvkhvCf0b3p9IDrx4eM8Pn0 HsQujXak9s2EwJUQDezrn+x9XqH/ze0r5S1DEuoO3lKQEK6qYg0JyqsPo WFpdmQr7R+IuX4664vNs2+6cC4mk1FgYSQLqv8/rvgAP+M4OiHdupdqxW lTgQ/hBkmxuA44YlB2ymu5J6np/8wIWHV5lMs8x1FO2qVQblWFCPhYUJ3 g8V/xY8GtgMY/qwlbKSI3LLdatdF5m0XEol7jB/sZ9OUBb0JOYwlOtwkI A==; X-CSE-ConnectionGUID: Up/6OtC3TKG+7TrC0LfiIA== X-CSE-MsgGUID: DwCI+BOwTVinKy4nJvQFJg== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="12573097" X-IronPort-AV: E=Sophos;i="6.07,227,1708416000"; d="scan'208";a="12573097" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 12:01:57 -0700 X-CSE-ConnectionGUID: So5rGAlLTeCbfb1cfq4ejw== X-CSE-MsgGUID: gU70sMFeQ+iD9/Gl28NoFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,227,1708416000"; d="scan'208";a="29291859" Received: from unknown (HELO vcostago-mobl3) ([10.124.220.153]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 12:01:55 -0700 From: Vinicius Costa Gomes To: Miklos Szeredi Cc: brauner@kernel.org, amir73il@gmail.com, hu1.chen@intel.com, malini.bhandaru@intel.com, tim.c.chen@intel.com, mikko.ylinen@intel.com, lizhen.you@intel.com, linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 0/3] overlayfs: Optimize override/revert creds In-Reply-To: References: <20240403021808.309900-1-vinicius.gomes@intel.com> Date: Wed, 24 Apr 2024 12:01:54 -0700 Message-ID: <87frvay47x.fsf@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Miklos Szeredi writes: > On Wed, 3 Apr 2024 at 04:18, Vinicius Costa Gomes > wrote: > >> - in ovl_rename() I had to manually call the "light" the overrides, >> both using the guard() macro or using the non-light version causes >> the workload to crash the kernel. I still have to investigate why >> this is happening. Hints are appreciated. > > Don't know. Well, there's nesting (in ovl_nlink_end()) but I don't > see why that should be an issue. > > I see why Amir suggested moving away from scoped guards, but that also > introduces the possibility of subtle bugs if we don't audit every one > of those sites carefully... > > Maybe patchset should be restructured to first do the > override_creds_light() conversion without guards, and then move over > to guards. Or the other way round, I don't have a preference. But > mixing these two independent changes doesn't sound like a great idea > in any case. Sounds good. Here's I am thinking: patch 1: introduce *_creds_light() patch 2: move backing-file.c to *_creds_light() patch 3: move overlayfs to *_creds_light() patch 4: introduce the guard helpers patch 5: move backing-file.c to the guard helpers patch 6: move overlayfs to the guard helpers (and yeah, the subject of the patches will be better than these ;-) Is this what you had in mind? Cheers, -- Vinicius