Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp340635rdh; Wed, 7 Feb 2024 06:26:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNgU6CZjffhdOsnxVAbu3fgVjzaQhAzyYwbUuB6wV5rESWPUAGD1XeJy9T+BxNA22uKVc0 X-Received: by 2002:a17:902:a3c3:b0:1d9:4d3f:cbf6 with SMTP id q3-20020a170902a3c300b001d94d3fcbf6mr4790865plb.48.1707315969033; Wed, 07 Feb 2024 06:26:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707315969; cv=pass; d=google.com; s=arc-20160816; b=yfW1STrLBDJz64KkceQZF0inBO5BDydiYwtJwHnQncu33iK6MVGyJLJOtKldkaOsmI 7Jg/xVO/VWk1XZ5lckUMyHlcgGGjX9k+N+TFkQN8vHaIbwzTKt7BSD/OPyyvEKudrQ9V UJO0rWik2eWWZr7xadkzFucQURUC+5wOSS8X27ZU4dLhZtR9aViy1Yi3PNQoYoaYR1qH grmJqDyB7mRkEIu3eHtJhVMnPlLGEcNGFXzm52H7wpUeDJzUkh8VX/diNaNfceYdh9U8 YqRNo63niPq7WOffWFKsQaK5qynH7nk3WlcP1/kNbl9tq6OE/p3IoIMgMaynBn1QBjj3 6eZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OYwgf7EQVS6kgUofsqdrhhqlkfda6mSImwNoXN3rr6o=; fh=xsJia5umofsqDNYckKWupr2yB/bsmzfxoTcx55/vUDg=; b=h/6lHvFqUdI5nrAndqCAXYGpZh9k6ba72IVaL3/4j7pLlgkMdo8nmPFGZUtoBUjWi6 rGztABXQQ2CLAx035zuvTfBnsXazldnYsZWAuELVy0+vZwf0n0/FI+34QGkjNxt/Ej8t jYOGn3Qy+02GEKPktBP3QeALNwZtGaLYycoopQfbKR0jeD7IG7Y6Cd0cUgGy4fVhqw21 dCTEmWoAJsoQA0DoraOJR0I8opQsDODKpVPQfwTIZ7E3i+QJmNJzK/ep2VrjXI32mizI /rZzkUMhcVJ2+QQuEL/8+oiDxrM76+MHchyRADcMlmKP50Umq5uveLxW3XHJMTcuMBRl RUDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=V1u3i4D4; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-56617-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56617-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org X-Forwarded-Encrypted: i=2; AJvYcCUwn+hMYS1aDPL9mVsZ6yRxKHxtBqjLNWoILm9OGXBNigI7mEui7UDeixVt5cwgeX+DFSdWMn8oU97DfRSlNomd2VI8v7hdn1ni6z1Ntw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g11-20020a170902c98b00b001d785cd6ecdsi1592212plc.587.2024.02.07.06.26.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 06:26:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56617-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=V1u3i4D4; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-56617-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56617-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id A7758286B31 for ; Wed, 7 Feb 2024 14:26:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA4F97E58F; Wed, 7 Feb 2024 14:25:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="V1u3i4D4" Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 A38B67CF02 for ; Wed, 7 Feb 2024 14:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707315937; cv=none; b=BduyGYZOq6F2KrYXIIml9IJEgUjuHilGGkUw7PIPp3c5r4MoWKGdgIZ6/h81j8ZbRO5nc2s8unkfcldRJDEPpf4PpqzthjQBcqDVmzVSnNhs/Nzo/WpZPF4Qy6ANUTNAYf055tbwACMNwbdqAYxfUvfIXU3DCsc8XJkSMtzQwR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707315937; c=relaxed/simple; bh=YOOfDCDKRyHiEDZVQRysOqlslMv9uBFs7/uEKQIlLR0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CANwAshai5bxm7IW79TXeVMUH+p+tlSnIJ01f4YVO9724aTd/kMTukfNOOFtim07eDj5v5ujCa4JxdC1Ne6gsuEDd0THzLGQ3wdcLHl51B5ecyoMHG8J7MB9K/jjmouInRjAVNEH+YICMCRvjNl39DBt/HIr/dze5RqOGhFdNes= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=V1u3i4D4; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1d74045c463so6621285ad.3 for ; Wed, 07 Feb 2024 06:25:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1707315935; x=1707920735; darn=vger.kernel.org; h=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=OYwgf7EQVS6kgUofsqdrhhqlkfda6mSImwNoXN3rr6o=; b=V1u3i4D4OEzTYXD0UQjP99wxwtkfzUyHvVVVWVoMntteoPlGQOUfq6DOgT8zx9P0yQ 7VH2Zp3DAeeqeb18kGs1PlgfQ7JXOpIMo77dF0FAvnp8jFeaS58+hLWpNu7YA6tMjxi+ 4Bt6BefQpO5hA5cTJ9PCsfLViEGF/rIAP0XyI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707315935; x=1707920735; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=OYwgf7EQVS6kgUofsqdrhhqlkfda6mSImwNoXN3rr6o=; b=G2RQ/RzatMQzIZ3MjYTouC1Hya+7mg3cSNVZrNdHvq2hLHyxagxBQvAl+huZSbwPTX +rryU4bFZ82zo38HUk3XX9MFA8AJLfpyjGAyev60GHILQlWWx0CDXQG/qxcRWTsWifJl 1W1qDjrJKpsjE/jV3kcH2+ByJalUs7saPd1Nr+3mvq6rJzL3dNhpv7KoML8cyce7iDNB KP2h8U+ln4b+p5PasZqKDStHa+So8RgJs++OV0wqLvSsnRTDpq40SQTtJ1gEhSioZiFF bgVWxKiAIajWtVHM3RLS0UTQFz++1B6htcH/KgZ8JyxtBg+zxso9cR+jhehdE24n1Urq 1tPA== X-Gm-Message-State: AOJu0YzUPLCc5q9zQfrCHUH4egmhzel13XLaIxThpX2hWSi7ZhHMY/A0 qAQHXIEjDRRStw+C2XOi5FEfQ7l0cNrYc0UeyJEo3qYQAGlJ/LVzbymwsIaJcg== X-Received: by 2002:a17:903:2c9:b0:1d4:4df7:22ab with SMTP id s9-20020a17090302c900b001d44df722abmr5903706plk.55.1707315934840; Wed, 07 Feb 2024 06:25:34 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCW/ODWqYd00OkA7mJwb1/z7CtnnyIbVHYpzeZA9GZfzzER+2IAvqyAyAHn48eLuwcYPv7EvsrVq/SJnPAApUIAj/EBfI1tcqbAXRjWumX3t2FxzCUTkPNf954DGqlvHYNgBwmI43Jd8eGHPZ4Q5chSXv3p9PiznWPMITF8/UE1S7jSstARn1ciWcxPOdMdAEFnUxbJuM4k82yr6lb5gGMmwExTVDDbjSdSr1pi1fNQFrHKyUh3ErjIKzdJxLbrw6h5kL1kHsq+zPHFNITfe3AHM0VFJ55lQC+YWQcfKiNY2uOBSlWshVJvyAuOWECfbxYcLC1eK1mcGPizBRTtgO3lSKTmQ7Tg9Qu7otMjb6LgnJ8ZKen59kc+gcyjUPH8Q Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id d11-20020a170902cecb00b001d9aa663282sm1470017plg.266.2024.02.07.06.25.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 06:25:34 -0800 (PST) Date: Wed, 7 Feb 2024 06:25:33 -0800 From: Kees Cook To: Tetsuo Handa Cc: Linus Torvalds , Eric Biederman , Alexander Viro , Christian Brauner , Jan Kara , Paul Moore , James Morris , "Serge E. Hallyn" , linux-security-module , linux-fsdevel , LKML Subject: Re: [PATCH v2 2/3] tomoyo: replace current->in_execve flag with security_execve_abort() hook Message-ID: <202402070625.57945D6995@keescook> References: <8fafb8e1-b6be-4d08-945f-b464e3a396c8@I-love.SAKURA.ne.jp> <2a901d27-dba5-4ff4-9e47-373c54965253@I-love.SAKURA.ne.jp> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2a901d27-dba5-4ff4-9e47-373c54965253@I-love.SAKURA.ne.jp> On Sat, Feb 03, 2024 at 07:53:17PM +0900, Tetsuo Handa wrote: > TOMOYO was using current->in_execve flag in order to restore previous state > when previous execve() request failed. Since security_execve_abort() hook > was added, switch to use it. > > Signed-off-by: Tetsuo Handa With the kern-doc fixed, this looks good. (I can fix up the kern-doc if this goes via my tree.) Reviewed-by: Kees Cook -- Kees Cook