From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 0D184376A08 for ; Mon, 1 Jun 2026 12:31:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780317121; cv=none; b=UgulT/UQSRWg0upeyLbE9XC/wWJMi3YsrVJpei1G3JFatyY0ioN5BFwOZJyUAR5zZMBSfbBhmU2ieNG4tTfrQxqrP0XtWZQAVsYcgFPMIOMLJo3n6wH1WRXNC5GAhmSf6XHreQ7mKEO9THsud4GcXnnvqG0sndaZW2x3TZkjdHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780317121; c=relaxed/simple; bh=+D4PHK+G0v+lkjMJEe4hiF/O0fl6XamxHZ2AeM2qWhQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hzDyfySqo62ATLZc/e6DochgA3p69QHYCEJnHZOe7c8KKDj8ux/YLM+/f+oChRPznGH5lscKayO8PCdcPiVG8klGNyTgQifnaO7Zrdglh3+Z0FDCbmc9/9C2XwPsj637qhfZ0SJCBySax7IKPv1nSE7rC1W2CnlBoOJ/dYyrHiU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bl8LktpO; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bl8LktpO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1780317119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+D4PHK+G0v+lkjMJEe4hiF/O0fl6XamxHZ2AeM2qWhQ=; b=bl8LktpO45CjWeqwB7QlTaxsueMun5FF0s9pqpgLzCxdWtEWyKAOUrMv1CDWvV15KtyGKB 6eoX5o5VG26vjl85OwkMho2PkZrEybKHQi8iz6eXgvdxt9tGqbIt6yQF78iMjAHeIO5f9F ShEWwzOqZA1Jah+Ppz4uorkUFZVgmgU= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-135-mRYfuuFhM2i8ajN0B6e56Q-1; Mon, 01 Jun 2026 08:31:55 -0400 X-MC-Unique: mRYfuuFhM2i8ajN0B6e56Q-1 X-Mimecast-MFC-AGG-ID: mRYfuuFhM2i8ajN0B6e56Q_1780317114 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CC7D51956060; Mon, 1 Jun 2026 12:31:53 +0000 (UTC) Received: from fedora (unknown [10.44.48.10]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id A342B1800577; Mon, 1 Jun 2026 12:31:50 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Mon, 1 Jun 2026 14:31:53 +0200 (CEST) Date: Mon, 1 Jun 2026 14:31:49 +0200 From: Oleg Nesterov To: "David Hildenbrand (Arm)" Cc: Andrew Morton , Christian Brauner , Jann Horn , Kees Cook , Lorenzo Stoakes , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2] mm_access: simplify the security checks Message-ID: References: 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: X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On 06/01, David Hildenbrand (Arm) wrote: > > On 5/30/26 16:12, Oleg Nesterov wrote: > > I am not sure I spot the "simplification" here? Ah, then lets forget this patch ;) Cleanups are always subjective, if maintainer doesn't agree - forget it. > Looks more like an optimization that makes the code slightly more complicated. I don't think that !task->mm or current->mm == task->mm is the common case. Just the code looks more clear to me if it takes exec_update_lock only when necessary. But see above, please forget. Oleg.