From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 0E7183203B0 for ; Tue, 10 Feb 2026 19:28:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770751694; cv=none; b=SSikI+Hsex0N0w7UNAQ2pf9H1pWZnveg2+E2CKXnTuNxuQFfnm7KwQc/IuS4EMYhA5olWLNs8+sjNqP3R8MNNsD6oDaP8WRQi09PVSFAEQPkI8brPXWwdRMh8rdF7MC7wpUhTL9Uux46bkxu8d1aWXdMOXKusJpBBze+q/ihYFI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770751694; c=relaxed/simple; bh=nhJZhYBxkbSh8inEMgiGwAe+rPO/lbxfcRT2zbOQwKI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OxW/jlo5C8FFEoTwOHJzViIRNgZ39qxKO6laNoPkm+nZ1ez9t0r0JEnxCm5SQ6EJwjJYoceoZL+UtnKqj5b5Omz8uMAm+Ky3o8aXcA9eYdMXznvu8KkHXDdjjusZWJfomKKJ5SbmsrWHQh8ZAbgWpkj7zUvDcBGnM6Ahor/v/rU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nFGuUSN+; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nFGuUSN+" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-4359228b7c6so2962465f8f.2 for ; Tue, 10 Feb 2026 11:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770751691; x=1771356491; darn=lists.linux.dev; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=LFyGR2DyLRU+91jbuLD+/fzhLRHaNo946KYs1mYXfdg=; b=nFGuUSN+wkdrUfr6YQXoiNXlST0bc3G4zV5J3Xqwh6bm7OCwN4CRZexUZ53+5mIUwF MlkZ3dV9dGtfBt4trBLZ+1SqQzSe3qlOoH3XCYTngNsaU/Uqc+6J0BoGARM4EaaGAt3z o8Cq3ihaz8mMZwOm+C0o+sQWxEhnocIaf67w/KiBIvFGY43V9fsSssk0/iUkx4KUtTXM HgRddhjmMaGvMbSixRExPm6mFj0D9l1LtfNNDA6qRtrrcE/0L+rnUcTBJ0ZlUwjvhNbD sI2/6z217EzwjAlPY9NL4N0g386FSpgi1VOHybM6SNP7xPC2L46qV64iBkdb6OS5aJ8e 3hiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770751691; x=1771356491; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LFyGR2DyLRU+91jbuLD+/fzhLRHaNo946KYs1mYXfdg=; b=J6x5KdPz5s+RB2jNPkJsdYqunsa6JF/WojzBQUukopurPLqWAYAOe7TF6qjBaihox8 otGwGGwC9HO7ijWnTYRpWnepZpwcBXbxFP/o+7kNOd5JmMQ84R2Oh2ygrCzbpGlms5Kn XYM5twopVM+k91vl7k2th7CJRMXhsoyEve72paubmcUFsbdcJ/JwCdzXi1juhmkgVbmo lBbVLBYbJfMdLxrfYByKLawsmbHu6lLNtW7EQ1Y7uFQv1Osio8XmoIaO2f5ke8vSjBdM 0JHGCSO705UhAl5rRQF5MYnINZPibyvt8paQIV6JB766Z8z4GIl2xVQVfx0+WVo4K2zX ecUQ== X-Forwarded-Encrypted: i=1; AJvYcCWBc0rP/UMCMAZfqdbqF+WCBzCdHnVca2NQ/74ze2TdnmoQCthliLq4iWoLZeHj5ng13P6s@lists.linux.dev X-Gm-Message-State: AOJu0YxosC7CHp8ZTq5DMnb0/LMZvMRxZ9KdlyX5FcyIvR84FkuLncUq HjqE3OgYe46m8NArA95jA6ZzHXS8Pxp+1kay2Bak0pkV7oU5kYJQigZf X-Gm-Gg: AZuq6aKBxnoYxW3xVjZnGSd9EvtYr0vBWV+y+SCn5X6T62MdvLtgf2YU1BlREemFKoQ j0Pytnu0RTawyaK28Se33eJU1/Zny5FgbGGT9Axa1iZrbcbJDjQ0eN4njT6GSvCOTBVVGEHFo4w nEEwE5nbufkvp1AKUZmAsmr3+9rlDo75XbcFSqQ97Sxe9vR0IebnVMPNfIRR9O++kV++2Orf1xH 3otMK71Mxo5v0zCK8iOVkUYpc0gZJ3aQ6t9J/5L/zvykYpSdPVdNeZcc6fUlEgQkAVvaa3ysM12 qyM/7+YgTcBanr8vo3zoemsBGpkzvUn99PmqiDH5OoWAEvLQYivn3lG1MFhK4OkpwSGE4A/ol1P ml4LC6vajV9S81ZDfTh+sLB+/GlRqAyw17KjyCtpLhKDy7g9sEPLpS6CFqTeNSfYE+GH9ig50EO 02pXd7Zv2Q78NPLw0fDInFpjaJRgw= X-Received: by 2002:a05:600c:470b:b0:477:7ae0:cd6e with SMTP id 5b1f17b1804b1-4835b8bbf77mr1193155e9.5.1770751691077; Tue, 10 Feb 2026 11:28:11 -0800 (PST) Received: from grain.localdomain ([212.46.38.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-436297462a8sm33795335f8f.30.2026.02.10.11.28.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Feb 2026 11:28:10 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id 8CBD35A004A; Tue, 10 Feb 2026 22:28:06 +0300 (MSK) Date: Tue, 10 Feb 2026 22:28:06 +0300 From: Cyrill Gorcunov To: Andrei Vagin Cc: Kees Cook , Andrew Morton , Mike Rapoport , Alexander Mikhalitsyn , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, criu@lists.linux.dev, Chen Ridong , Christian Brauner , David Hildenbrand , Eric Biederman , Lorenzo Stoakes , Michal Koutny Subject: Re: [PATCH 0/4 v3] exec: inherit HWCAPs from the parent process Message-ID: References: <20260209190605.1564597-1-avagin@google.com> Precedence: bulk X-Mailing-List: criu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260209190605.1564597-1-avagin@google.com> User-Agent: Mutt/2.2.14 (2025-02-20) On Mon, Feb 09, 2026 at 07:06:01PM +0000, Andrei Vagin wrote: > This patch series introduces a mechanism to inherit hardware capabilities > (AT_HWCAP, AT_HWCAP2, etc.) from a parent process when they have been > modified via prctl. > > To support C/R operations (snapshots, live migration) in heterogeneous > clusters, we must ensure that processes utilize CPU features available > on all potential target nodes. To solve this, we need to advertise a > common feature set across the cluster. > > Initially, a cgroup-based approach was considered, but it was decided > that inheriting HWCAPs from a parent process that has set its own > auxiliary vector via prctl is a simpler and more flexible solution. > > This implementation adds a new mm flag MMF_USER_HWCAP, which is set when the > auxiliary vector is modified via prctl(PR_SET_MM_AUXV). When execve() is > called, if the current process has MMF_USER_HWCAP set, the HWCAP values are > extracted from the current auxiliary vector and inherited by the new process. > > The first patch fixes AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4 > in binfmt_elf_fdpic and updates AT_VECTOR_SIZE_BASE. > > The second patch implements the core inheritance logic in execve(). > > The third patch adds a selftest to verify that HWCAPs are correctly > inherited across execve(). > > v3: synchronize saved_auxv access with arg_lock > > v1: https://lkml.org/lkml/2025/12/5/65 > v2: https://lkml.org/lkml/2026/1/8/219 > > Cc: Andrew Morton > Cc: Chen Ridong > Cc: Christian Brauner > Cc: David Hildenbrand > Cc: Eric Biederman > Cc: Kees Cook > Cc: Lorenzo Stoakes > Cc: Michal Koutny > Cc: Cyrill Gorcunov Looks ok to me. Thanks, Andrei! Reviewed-by: Cyrill Gorcunov