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 D03763955F1 for ; Sun, 24 May 2026 16:57:31 +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=1779641853; cv=none; b=rcEyiB5ZqQDmniIyWvfmwFsdmxw3RuO/ZAQjPsZGYKJPu4xr8j9rkeLHvUEQzh8eVjHu7NKVmVjAP8uvRWaE9aD00JOGYEpdDS+bEiovtbmh5IXh75ZtmrqPHPi4xeFFqMik6S1ggPEEfubLuA+ZXA+6UmjlRhVG1usX2kPV/k0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779641853; c=relaxed/simple; bh=qlnZNmmNlDSDOzEVC/JXlr5fypXMAtESKL2+6Sj/9E8=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=j4zHgyB13GWNlHtQeGxmtSI5Hl5lflNsSiK66zLFoFSQBD2/TDWpSxxZhJVgH9lSBvuaMfUJ9a3F6QczWIiAxzmJvOsEiLNJP/XkYfdWR6DCXxPMtcZE+4foxkKy98uNvlhxeYhNY5+CN+Snv9k4jHNwuezk8wYssVG9lVsgqNY= 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=bH5vGzrq; 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="bH5vGzrq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779641850; 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; bh=qlnZNmmNlDSDOzEVC/JXlr5fypXMAtESKL2+6Sj/9E8=; b=bH5vGzrquVoHOiYf1aSGN9z1n7l1DtQg0vpMUJcsaPefdUEaKO3us69OI+Ns3wVuI4geUP lziUAj/HCp9F//2JE0MjLes8X+Z3Q88gcuoE8eYpfXcQSX4BO8lcTFm0Zm7WuFCsr2L3RO aXynMICXNMGe1CEsYF8q6L6eypiXgW8= 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-658-ZVnxxkzRNxidHtldGDtDUg-1; Sun, 24 May 2026 12:57:24 -0400 X-MC-Unique: ZVnxxkzRNxidHtldGDtDUg-1 X-Mimecast-MFC-AGG-ID: ZVnxxkzRNxidHtldGDtDUg_1779641842 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 DB506180044D; Sun, 24 May 2026 16:57:21 +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 B73B1300019F; Sun, 24 May 2026 16:57:16 +0000 (UTC) Received: by fedora (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Sun, 24 May 2026 18:57:21 +0200 (CEST) Date: Sun, 24 May 2026 18:57:15 +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: [PATCH 0/4] mm/mempolicy: kernel_migrate_pages: fix race between security checks and suid exec Message-ID: 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 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 Hello, Sorry, I have no idea how to test these changes. Please review. Hopefully sashiko.dev will take a look too ;) find_mm_struct() has the same problem, will send a patch tomorrow. Unless you tell me this race doesn't need a fix. Oleg. --- mm/mempolicy.c | 53 +++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 28 deletions(-)