From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 3950327FD7C; Wed, 13 Aug 2025 16:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755101182; cv=none; b=c7Qb1Mm2uwFCzG179IeFZGaah3S3lfuFrWAG5kGluNzAbwT9w34NCU8L8HAn108ZoknBxXsw1TxvSG+crDK+sYKjwOq+v7dH8A4rVxt50MOQsBpSTflafB+wHXtKoEihvhxttdWqjdKznD+xu+Z/vv3rrWjSRyAewWIuySvcebQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755101182; c=relaxed/simple; bh=XWmLOpE3MHZzeoFeGXclW85lVdc4LV+Vvanhn7HkMtc=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=iE6s7SkMTCRIegAsVFiuoRllUTQZjpsa4cOWxZP3BlleWvWY+Al8ptr21vgEm5A8AKD0xzBRgOdEmjoftmJTWlpHDsQqQK+u9MANlSyyUvwL4IoMIm70njlzNZeCpwcZrExb42IliR/efxOt/GL69PjQznfL8J0CyIqvKhB6HNc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XpJJyEk9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UylDjWI3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XpJJyEk9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UylDjWI3" Message-ID: <20250813151939.792908766@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755100630; 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: references:references; bh=aj6NiNAQEDq03gk/l0fePjjYEF3cxMDBbL8IKh5eMrs=; b=XpJJyEk90Xq/z+6kZeVXLlSkpX66sK5cGMVN7g3NC0Nh6jwg6PxlpVo/jtYQgVeB9Eu4zw 9OmOV5JPeJE3x6+eVbblbBKPY9JlIZaV/FSjZESPDA+3GoWNkid6rjr3wJsFIXPQ84ghmv o/MLGzVYk8Nk5049d7LphGELjiwS1ie5MwZrtVjarNbD5N+N+llPPtxwEkAmo/h2t3BKue 7IOmVkLaD6kd7IYorJlGlrN1ESReSnap9ZdDCJlOcrzwbxKufpK3EpmtEpw7oGcPJJum4b OH7KBG0U/tdrjUI1OJ8QyOkPchyyG5FKp0yxL2ALpwfawIb73U/wbM5hnhUv9w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755100630; 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: references:references; bh=aj6NiNAQEDq03gk/l0fePjjYEF3cxMDBbL8IKh5eMrs=; b=UylDjWI37f33I7FCCy3yiuijP1ZZ5hs1QPphJPxnG+SpxLfNfkUq7YKClph+cSJ+w56UEV CGZiTgtYG2nLkxDw== From: Thomas Gleixner To: LKML Cc: Linus Torvalds , Mathieu Desnoyers , Alexander Viro , Christian Brauner , Jan Kara , linux-fsdevel@vger.kernel.org, Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?UTF-8?q?Andr=C3=A9=20Almeida?= , x86@kernel.org Subject: [patch 4/4] select: Use user_read_masked_begin() References: <20250813150610.521355442@linutronix.de> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Wed, 13 Aug 2025 17:57:09 +0200 (CEST) Replace the can_do_masked_user_access() conditional with the generic macro. No functional change. Signed-off-by: Thomas Gleixner Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Cc: linux-fsdevel@vger.kernel.org --- fs/select.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/fs/select.c +++ b/fs/select.c @@ -776,9 +776,7 @@ static inline int get_sigset_argpack(str { // the path is hot enough for overhead of copy_from_user() to matter if (from) { - if (can_do_masked_user_access()) - from = masked_user_access_begin(from); - else if (!user_read_access_begin(from, sizeof(*from))) + if (!user_read_masked_begin(from)) return -EFAULT; unsafe_get_user(to->p, &from->p, Efault); unsafe_get_user(to->size, &from->size, Efault);