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.133.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 01474316192 for ; Sun, 24 May 2026 19:30:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779651006; cv=none; b=qit7z69dbDzCrq5YaJ37l/lJb1sgU0JceNOmc1XLVgkt/bITkKUWi2FLjF043ZK+5uU6WSYSxYqVa4d4gQ2BZ1HlZWUI515a3fT7Zq985jqtSA9++boC0kycHhLTa/lQU+JKFLWEbQ4te6FAmaVs2ozTyrgW5O1D+zjm5wis254= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779651006; c=relaxed/simple; bh=vYz7Jdce6d43zBylNkGUyLz5KAV9/KXoBTQbmKx/bHA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hs2KSOzS73iGpVfiA/VTShuzwQbj96+KBba4hVQH69Avo/rH4WeJH8QjhfAZ4Wn1uQo4Q2zyZuOiprkCmtiCbVQDhRQ4dLkjUNEvhkfb/RFbjZwhqEsKh08Ip/utdMeTmyyPyuOXaQO2Rzlz9JSd1jjsKrPftohk02qHQczSJik= 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=dE4S/bho; arc=none smtp.client-ip=170.10.133.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="dE4S/bho" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779651003; 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=2O5KlEC2t9M0+jfHVWIzaoKqlzPNLTk1amblrHW2ig0=; b=dE4S/bhoLEPOgTnaNxdmwdkKNQwE21ZWrUQg7GYf4muqfLTsEwquoRT3aOasjS7ZjeYHea oTekGkSf0IqV89S09DZgVHqVY8x8DU9tzSuPeL1Jw3JT4z57qyBFH+lwvp5q2oYnDkNB4f ABjk8amwNNvcxM90NG9M1hzTfXBbWrk= Received: from mx-prod-mc-08.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-626-AmgiIsc3NVyhP51YaBpajA-1; Sun, 24 May 2026 15:30:00 -0400 X-MC-Unique: AmgiIsc3NVyhP51YaBpajA-1 X-Mimecast-MFC-AGG-ID: AmgiIsc3NVyhP51YaBpajA_1779650998 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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7F6A61800343; Sun, 24 May 2026 19:29:57 +0000 (UTC) Received: from fedora (unknown [10.44.48.14]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with SMTP id 42E77300019F; Sun, 24 May 2026 19:29:51 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 24 May 2026 21:29:57 +0200 (CEST) Date: Sun, 24 May 2026 21:29:50 +0200 From: Oleg Nesterov To: Alistair Popple , Andrew Morton , Byungchul Park , David Hildenbrand , Gregory Price , Joshua Hahn , Matthew Brost , Rakie Kim , Ying Huang , Zi Yan Cc: Jann Horn , Kees Cook , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] mm/mempolicy: kernel_migrate_pages: fix race between security checks and suid exec 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/24, Oleg Nesterov wrote: > > Hopefully sashiko.dev will take a look too ;) See https://sashiko.dev/#/patchset/ahMt6xyUNnacZU8-%40redhat.com Thanks Sashiko, let me reply. As for reply to 3/4: I honestly think this is not a problem... but a) I will think again, and b) I rely on review from mm experts anyway. The main motivation for this patch is that we can create a common helper for find_mm_struct() and kernel_migrate_pages(), but it is not strictly necessary. As for reply to 4/4: Yes! And I have already mentioned this in 0/4 and in the previous discussions. Plus (say) proc_coredump_filter_write() which relies on the open-time checks and don't use ptrace_may_access() at all. This looks wrong. But this need other changes/discussions, so I think we can ignore this comment. Oleg.