From nobody Thu Apr 2 17:40:19 2026 Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADF3378F26 for ; Thu, 12 Feb 2026 02:08:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770862092; cv=none; b=ZjExsnDZ5sConsTAse64zaZUZquIXwd2jZYsWPyq01HNyCd8P2sgOqS9Epkcb6cqP4FliSPjx3LXBpuD8mGoUdqp4V8FoBxwTjGIOkbxw1xWSuRynvs63qWEYqL3A7UoR7dP9x2NyVaeohATr+QcWY9iPAq91FLQ88ETwLxm/7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770862092; c=relaxed/simple; bh=pDWLVOXCLRHG590aPaGlaKwSV9lsuLuZkI1GdIMDYF0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Sni04GLPwy5+2dBh6WRO203/or4z6GhDR0ebgK4PdcAqnafVlg+YKNFmnLggAaeXC+jljoaVtiHskRn2tUz8Uci0bcsFnFUuTJE3WkeXmc79qFeg4dOtigqCezgShXy/V28I2cYi0ZNXBNlvdrhnOSthvtsWSmSDRi/aGwU6yYI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu; spf=pass smtp.mailfrom=u.northwestern.edu; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b=KExVY4qn; arc=none smtp.client-ip=209.85.219.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b="KExVY4qn" Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-8954ae375efso14944176d6.1 for ; Wed, 11 Feb 2026 18:08:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u-northwestern-edu.20230601.gappssmtp.com; s=20230601; t=1770862089; x=1771466889; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+MD34Rj7hv4ZcYuGwzFs3OFZEhc7qucijWDfGmY2Bls=; b=KExVY4qnv7+8JFHEXswy3LKdYw2ia8IQoyXnubQTy1oXV0cXIBQrHXbl1XAuGcnId9 Trmrq6449MBDfv5yyK7TuD5GAcryEHmAWKIGEl9bJX3ONM0pKe/B9mXLpI6e3yqFR2g5 sWpVjGbABpuFVL2ElhGJVzvYNKHavvoN0YH3egXi7WWwB37XALA1W9XOYj6M4bhfAbra cuO9iHzY2A3ZJQ8fqN8sqNXP/K2kXECjl9fTEJpzaS1q7h816kuUzCcYeT5crCjNoN9s bsRV5g7hCALBnJl9J38jVrO51OIvhuOXTozyYE1jiAMnTk4PoDjK6KBCutyZEX4DS0J3 crpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770862089; x=1771466889; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+MD34Rj7hv4ZcYuGwzFs3OFZEhc7qucijWDfGmY2Bls=; b=ZqBoiJ7YWvtVNcy0/6cx1iKH6kq96Ch2cUmO9XEgzhw67JK1CHL7RbzUqdWhYyaVUx Q42D2pOOE6jp3Y3SyTGzkPXeAkMychkoVY8ZdbAEWi8Eq6GXXkolkog4jQ3LSTOUGxlc vnxA/2sPN0DepbVC+aX+uBFg123Xp6/CWTKWOra3K7z74UMx9o5L2wAP+SXy07KmmBlz 4uHhwMEiXNj+TFhFuo7FwDRxCH5bXiSVGQjFcmacfh5IIH8LZhfesyB2nr65CLHmxcXa 1ZOlG6o1QL4amIQcArNUAaN4S5tAQSuzb60gub9aeG3Bwqjp+kQ1+pCH1z2eWYLWl6ZV SjUQ== X-Forwarded-Encrypted: i=1; AJvYcCWiAWMVxC52DxMl5lP72/lGG8+6+JtmOpW00Rq1R3m1A9LYKNVMwm2txpO/P0jjaazxE4uv3+kydyIrlco=@vger.kernel.org X-Gm-Message-State: AOJu0Yw0t/ixTPgHAbgLGLmV1FcjNbJwTjsn7b6d6su/JJNbo9dlLief 9JSjilATAguAmvUazeFUHWncsSHB5MQAzinNA9kqNEf/SbCHXV9QpNbmF98qJFwzXb449lM67G3 xEypH X-Gm-Gg: AZuq6aIQY1hRRocysHhXcOmEY1sMNF6t8Ddci7OtEKuMhdS7WngTcTpMtr6PnB5o7+4 wR0ZcvuI/3c7DCGLBOJv1O3y+kYuss5ESLeImSEZL+aj1il/lGL39FRZspMgxiY5Hg6mTeunbKh G51jOsyT6tq586x4zRFkS8to76JrE4wLK97kZ45uBqCfS0FRr5SiWR9oGurJSoENBdtm0oq3vLL ythQWy37PXRHShp0cfowP5htSYGNxIk4fLbQ9MSpr9GmAs30SGPG7G4EP2CALuRlEJR1vZl9Gx+ d8mNQslOeJMV+wGCeBt5KWjwpOueXPBHZwKZDtnjNaoMX8adgL3sdJHetRoTnEBCr5lg+HE8Ra9 yxPA8yKE+JSnj0JcS/x96+S/BaOqpXlcZvHxi9qRsqWsub6rn/+eJ4Z+RefN23Ot5qAJRwL/C8J b+n+MVL/QsOJnetjXwp702hkOs5Pb33C8IRKhoOgQ8U/sK03KKf+lPB74li/KaZ9OgHroF7H+ps I4chkE4TSkulq0Q+g2+qJT7oULJsrPH5ZinIaMNy+8= X-Received: by 2002:a05:6214:27ea:b0:896:fc1e:235f with SMTP id 6a1803df08f44-89728f16b1dmr16624906d6.32.1770862089624; Wed, 11 Feb 2026 18:08:09 -0800 (PST) Received: from security.cs.northwestern.edu (security.cs.northwestern.edu. [165.124.184.136]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8971cddc120sm33422426d6.52.2026.02.11.18.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 18:08:09 -0800 (PST) From: Ziyi Guo To: Mike Marshall Cc: Martin Brandenburg , devel@lists.orangefs.org, linux-kernel@vger.kernel.org, Ziyi Guo Subject: [PATCH] orangefs: add usercopy whitelist to orangefs_op_cache Date: Thu, 12 Feb 2026 02:08:06 +0000 Message-Id: <20260212020806.2522161-1-n7l8m4@u.northwestern.edu> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" orangefs_op_cache is created with kmem_cache_create(), which provides no usercopy whitelist. orangefs_devreq_read() copies the tag and upcall fields directly from slab objects to userspace via copy_to_user(). With CONFIG_HARDENED_USERCOPY enabled, this triggers usercopy_abort(). Switch to kmem_cache_create_usercopy() with a whitelist covering the tag and upcall fields, matching the pattern already used by orangefs_inode_cache in super.c. Signed-off-by: Ziyi Guo --- fs/orangefs/orangefs-cache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/orangefs/orangefs-cache.c b/fs/orangefs/orangefs-cache.c index e75e173a9186..0bdb99e89744 100644 --- a/fs/orangefs/orangefs-cache.c +++ b/fs/orangefs/orangefs-cache.c @@ -19,10 +19,14 @@ static struct kmem_cache *op_cache; =20 int op_cache_initialize(void) { - op_cache =3D kmem_cache_create("orangefs_op_cache", + op_cache =3D kmem_cache_create_usercopy("orangefs_op_cache", sizeof(struct orangefs_kernel_op_s), 0, 0, + offsetof(struct orangefs_kernel_op_s, tag), + offsetof(struct orangefs_kernel_op_s, upcall) + + sizeof(struct orangefs_upcall_s) - + offsetof(struct orangefs_kernel_op_s, tag), NULL); =20 if (!op_cache) { --=20 2.34.1