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 5AF2E226863 for ; Sat, 30 May 2026 15:01:00 +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=1780153261; cv=none; b=BPcxWq1QpRQ1MU4f+uXGozcev7YkAJgKM4wRAwg1WDRh+so3lF259Z1Uc3KnF91J08A0euPu62QndKcSCYiPeGQkhdAgX38d/FeJI2bgT41wHft0g56PW640Bfed8/CA1jcSyfyuWvtm/sf+h/yIQ/BlJwDDEWvl1Yf6DvExqGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780153261; c=relaxed/simple; bh=Avx4dvoF25t7de6K+hdQZzJ5nh0P/B3+9dYKtQ6uA4o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N7uQ+L7KJPoGghs9BIEjgXkB8Rz+QTDWiueu4ia/XZkZVaU6+IdcUWh/Lmapff8yOVASs3yHUhPLTSj3xYQtL4nHfc81E63MfcEoMvrXGGy4FMY/AUdprQO4rmmgzJhaohzizoDu/2RsoMLA7aQWdBUzSq/jwZrmslphYZXTszc= 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=RXnVj0ou; 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="RXnVj0ou" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1780153259; 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=H8fnQtF47HERJ9HigsIpSUsCGTuehk1+/Ujtx+Jlp4s=; b=RXnVj0outh/gRFQVGgUhOlYLaJa0XNfOS+ttJIE3vZCpeah5RRYnmcSIATml2fsSjs0+nG +u4DAjZmpyXMIjGvhx+OEnqVfMSjamA1jiUEscA+o9iB5yPIJIQD3A5eMYkr/cmqEMR3xz ajCGrleXnRaWi8o57ucLpkJydgEAXfw= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-467-90j1EZ1XOvyJUAa90dWm5g-1; Sat, 30 May 2026 11:00:53 -0400 X-MC-Unique: 90j1EZ1XOvyJUAa90dWm5g-1 X-Mimecast-MFC-AGG-ID: 90j1EZ1XOvyJUAa90dWm5g_1780153251 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4D39218005B9; Sat, 30 May 2026 15:00:51 +0000 (UTC) Received: from fedora (unknown [10.44.48.10]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 49E9F30001BB; Sat, 30 May 2026 15:00:48 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sat, 30 May 2026 17:00:50 +0200 (CEST) Date: Sat, 30 May 2026 17:00:46 +0200 From: Oleg Nesterov To: Andrew Morton Cc: Christian Brauner , David Hildenbrand , Jann Horn , Kees Cook , Lorenzo Stoakes , Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] 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.4 On 05/30, Oleg Nesterov wrote: > > 1. Shift the fast-path "mm == current->mm" check from may_access_mm() > to mm_access(), and do it locklessly. Heh ;) sashiko has some concerns, see https://sashiko.dev/#/patchset/ahrsfJE3NkKjShEX%40redhat.com I still think this is fine, but I'll recheck tomorrow. Oleg.