Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp181075rbb; Fri, 23 Feb 2024 17:04:58 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUJlgseVbPVW1XxhT9ZXFjjBhjTUj0qeoFErV8s4j4+FI5OR1HO4ku8fdnvXHGcVvGEN+d1kYECf4IsT30hUN6OaPh63/MggZvegRU7CA== X-Google-Smtp-Source: AGHT+IFNxERGFknzbUsvb3GQH6SO+meqS2uKVhZdlXdgQ4o2+HuGjIMc8cUIrCQSNWpCjwP/5N1/ X-Received: by 2002:a05:6a20:a89a:b0:1a0:d0ef:c652 with SMTP id ca26-20020a056a20a89a00b001a0d0efc652mr1278217pzb.29.1708736698106; Fri, 23 Feb 2024 17:04:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708736698; cv=pass; d=google.com; s=arc-20160816; b=dUhKcJf6P3MWMKGRgGGyg8ASzgPT/y6TGF8QsL5eUrYVuHJwPzYKKy6NuY3B18BH4b sgtLfz8iC4G7Gzm/p5diW4T23Sphd5r5Xx2w7d/C0J/3SF2GMHY2buT/G+N/rqjyyZgr yQmCIPB50ZQVPIgbVI2/MHAnQaPD/bTfwH4LgnAhG3Fv8xwa/uNy4TLjSUos1qkSiEEK z6oFZbuu0tfAFQaqoLRX36H/cv+ap2T5pruDJ/YdlPfq73+8ZhfEqmqsoIPs6XTiQXs1 9rkqSNTrhfZZ2j1knZDlvPsomioV80rvhNe6w8cKFeA6BvQ2f14nWtXgW/FQeU1cn880 NGHg== 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=pQKkVKoC62UNhXK21zihqEnfMAgk8ODcwjqvMq7e3Fw=; fh=U7vYxGSnP0gYqo0lF0KjTlNbBVTAy8od8vrjF4u91jk=; b=ozIvQTpLUr+kVMrS8JABWcDU0VJYH2g2ECZZ9UTg9//5YXp8KQRqSpBpPIYdwXipUK f5tTL8osfLpseiVSDlaGivTkucjnNbYcR9c3LXS0RFeTqdEhLHexl4a4ZkchCu+wjxSG 9EpUWcCvyJqj04NQya2oTUV8JOG5BW+66LfTvaDQYt00qB/0UFKZToAz0ceI3b6MV9Eg R1UyUq4qy74nCSpGUDhTy/TWQP/6CQAt7008nv9T0iQa2Tv/AINalORKF4VwoY0w6jh7 bf70AjmGuGDhCxiKxEK1k1cdjjHfwjAwgoCnr+fG6A5vehTtP0DLFNIfs0LLYkLSIkCG l6VA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hDTytCMZ; 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-79381-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79381-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u12-20020a63df0c000000b005dc422577a9si149069pgg.209.2024.02.23.17.04.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 17:04:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79381-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hDTytCMZ; 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-79381-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79381-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 C96922858A4 for ; Sat, 24 Feb 2024 01:04:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A0364691; Sat, 24 Feb 2024 01:04:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="hDTytCMZ" Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 64C9415A4 for ; Sat, 24 Feb 2024 01:04:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708736687; cv=none; b=jMfUusnPE0n6/o+i/tXA9Gf1qlljpnWq7exu6rayYWU9UPJ2mSBdzkO33ouJHR4sf8hC6nP6GI4FSEMTWAKIY+2VYKAT/WlBO8UIhCciwhsEi6AxDUWrnCPMtDG3+/D2dWUg/5ps4c30y8vRznf6IzHaqlHarXHq//B449edhZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708736687; c=relaxed/simple; bh=czByRd1ZtLG1ytyTx6JHZ0MsK0WUs6+OU6X2ecDmaiU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YXqKe1yldB3gw3U0bfqb/Bcn4Kw69mf9GWb3LFXVigDaXuNNN4Uk4eWn7mN/QAj4/qXAvRfmRPTnK5m4Mna40DXa4TGicgKjV67V6XP+vjEMCdbkdE78ptPvbga9UYpL8x0JTDxJLh4Z+yJWmJ9LHsBFwcV4IgKL4xfGTHa+1wE= 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=hDTytCMZ; arc=none smtp.client-ip=209.85.214.172 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-f172.google.com with SMTP id d9443c01a7336-1dc7abc692eso5715475ad.2 for ; Fri, 23 Feb 2024 17:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708736685; x=1709341485; 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=pQKkVKoC62UNhXK21zihqEnfMAgk8ODcwjqvMq7e3Fw=; b=hDTytCMZjXMcc7dOtYwFFM4rdy8tCW0LtvCuewIQXA+GNLevAOsOUKvHDkHn5M3/dL CTTWrNl3Dyevh0z6tXJBitwSesEHgNAhD16osTPqXoquEczotZbqww3bXThTbEW10jxR WGEiwWEBd5gzKwNDzmQ0EEw7GqcX/AEklXEdQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708736685; x=1709341485; 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=pQKkVKoC62UNhXK21zihqEnfMAgk8ODcwjqvMq7e3Fw=; b=vzdrtNXrAHEzyW06O6eES1+W5YewdehGJYrdd2FQlsRfIFFTNton0kvz3e4iZZSIS2 jtrG+X91MYxOOCQDLeALmojmj45oBed3gZ/Svb+/B+8e703/q+jg7unRFceLyZr5sPQh NLT8PtMTqLBARBeKJyYbhrQhMeV3K+EN+rhxK6UuDqN09KRJW7WiapsoqVdCIaemt8IG myXg9Oyq3ltodNN88rX6jwdaTa0dJBR9MbFJ0woWiIKEHxGg71drrETvYkVl9RNRi4R6 szi7maJhqALApIqhxho2EmmQOePcIOJFNYbA4+lB0AYKbSVRheB/OqVDEGo9GQPqfSTm Ey5Q== X-Forwarded-Encrypted: i=1; AJvYcCVMjv8jfKP/c/GOL80bNbiy3/A6UMnaoGcaTGEDOz2Hz7SIjwChqV1F6cXM1ksUkp47zDii+pdCNz80sBbVBMwPrVHkpCJ8DREVCmWa X-Gm-Message-State: AOJu0Yyc3SalLWCbSVhhEA6zGuGILtD5QsQzWSUtZuQ32SESZF1CCBJh XoAHPO2+30Z9tiXZWmnDZBjcSn3G8ZEon0t0N6VwMSVjJXooHua1zggi2jId6w== X-Received: by 2002:a17:902:eccb:b0:1db:b69a:3fb9 with SMTP id a11-20020a170902eccb00b001dbb69a3fb9mr1864564plh.25.1708736685645; Fri, 23 Feb 2024 17:04:45 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id bd3-20020a170902830300b001db6da30331sm33159plb.86.2024.02.23.17.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 17:04:45 -0800 (PST) Date: Fri, 23 Feb 2024 17:04:44 -0800 From: Kees Cook To: Li zeming Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, ebiederm@xmission.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] exec: Remove =?utf-8?Q?unneces?= =?utf-8?B?c2FyeSDigJhOVUxM4oCZ?= values from vma Message-ID: <202402231703.8D5E862@keescook> References: <20240220051830.61099-1-zeming@nfschina.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; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240220051830.61099-1-zeming@nfschina.com> On Tue, Feb 20, 2024 at 01:18:30PM +0800, Li zeming wrote: > vma is assigned first, so it does not need to initialize the > assignment. I don't really like removing explicit initializations. They don't cause any problems and the compiler will remove redundant stores, so there's no benefit in dropping them. -- Kees Cook