From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) (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 370D735E1DD for ; Fri, 15 May 2026 19:58:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.51.188.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778875092; cv=none; b=WC2y7ywbPY2AW9ik1yNxwrQACop1KtgVN02Gdou7Y4ODA2nuzb3MqhEtw2ApcFF2J/fQqtrsovUDFX/EZw82KfZRQ5v1WGMyI7Yz8FFODZJwpmp7yBdEayz3Ok7xrlRm4GaBGvZE5wpBEdtzkkZZMRz/9GwJ5phJrGq0vf2Y14Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778875092; c=relaxed/simple; bh=WIPFWVb6xPCUmepon/S3m6xyNx0Q1m2Lu0khniA/dyY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=LNBDTzjbKGpSKPBwFx81/L7P2cziXu4tCzj6pGKBm4BpGhJKsPu73m2eQx7oliST4Buehp/nwgMq3npgZBgi+CE806Qs6UJJtDMFCrddDTw9lIupNBxJYtnOa3+eNkWRbzMrq2XzU5myQ0lgoy+d3E6ORMWSEM/nk1bzREMoRoo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gnu.org; spf=pass smtp.mailfrom=gnu.org; dkim=pass (2048-bit key) header.d=gnu.org header.i=@gnu.org header.b=rv41dHjZ; arc=none smtp.client-ip=209.51.188.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gnu.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gnu.org header.i=@gnu.org header.b="rv41dHjZ" Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wNyff-0003T5-50; Fri, 15 May 2026 15:58:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=/aU20b7HmiTcHxu8uxGXgGfoRsTKcHgoJtV6rdezzGw=; b=rv41dHjZRinUw6 m3BveAcfReD43nmX7b+qq4pe59CaZR/DFPfOppn88PKaNBGglfrgOgG96kNF5nz5D6nQIVfQrIsPA hvSj8GqF+FYxhh6wLcwe3tdJoNsAyhFDloOEMsl2UfZtIw/vtiyXte1Kv9xEqgDMUttyaaqg8YxnK nRQI4afasvjG6RHaJMT0njfNNyPn40fdV6wH/oVDUPYVzF/wA1RoMoHW02cJYW8ueDNgMxwL4Vw4l 9sFmqTZ14Gq3P/NuXGObICvSQvCqluQLMBCFS1RPwQ52tC3/Ls5J/34BdERqSldlWBAH01LhRWEZ4 PqPQTgPKKfLc++A3ZREw==; From: Janneke Nieuwenhuizen To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Hugh Dickins , Baolin Wang Cc: =?utf-8?Q?Ludovic_Court=C3=A8s?= , Rutger van Beusekom Subject: [PATCH] shmem: support xattr gnu.* namespace for the Hurd Organization: AvatarAcademy.nl X-Url: http://AvatarAcademy.nl Date: Fri, 15 May 2026 21:58:05 +0200 Message-ID: <87se7stpgy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain >From d8291d06b67db045033664fb440f59001d7755a1 Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Fri, 15 May 2026 10:12:30 +0200 Subject: [PATCH] shmem: support xattr gnu.* namespace for the Hurd The Hurd gained[0] support for moving the translator and author fields out of the inode and into the "gnu.*" xattr namespace. In anticipation of that, an xattr INDEX was reserved[1]. The Hurd has now been brought into compliance[2] with that, and so has ext4[3]. This patch adds support for reading and writing such attributes from a Linux tmpfs; you can now do something like mkdir -p hurd-root mount -t tmpfs -o size=2M tmpfs hurd-root mkdir -p hurd-root/servers/socket touch hurd-root/servers/socket/1 setfattr --name=gnu.translator --value='"/hurd/pflocal\0"' \ hurd-root/servers/socket/1 getfattr --name=gnu.translator hurd-root/servers/socket/1 # file: 1 gnu.translator="/hurd/pflocal" to setup a pipe translator, which is being used to create an initial file-system image for the Hurd from GNU Guix[4]. [0] https://summerofcode.withgoogle.com/projects/#5869799859027968 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3980bd3b406addb327d858aebd19e229ea340b9a [2] https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=a04c7bf83172faa7cb080fbe3b6c04a8415ca645 [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=88ee9d571b6d8ed345f877e05f685814412e359b [4] https://codeberg.org/guix/guix/pulls/8632 --- mm/shmem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mm/shmem.c b/mm/shmem.c index 3b5dc21b323c..5d60aa4dba92 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -15,6 +15,7 @@ * Extended attribute support for tmpfs: * Copyright (c) 2004, Luke Kenneth Casson Leighton * Copyright (c) 2004 Red Hat, Inc., James Morris + * Copyright (C) 2026 Janneke Nieuwenhuizen * * tiny-shmem: * Copyright (c) 2004, 2008 Matt Mackall @@ -4371,10 +4372,17 @@ static const struct xattr_handler shmem_user_xattr_handler = { .set = shmem_xattr_handler_set, }; +static const struct xattr_handler shmem_hurd_xattr_handler = { + .prefix = XATTR_HURD_PREFIX, + .get = shmem_xattr_handler_get, + .set = shmem_xattr_handler_set, +}; + static const struct xattr_handler * const shmem_xattr_handlers[] = { &shmem_security_xattr_handler, &shmem_trusted_xattr_handler, &shmem_user_xattr_handler, + &shmem_hurd_xattr_handler, NULL }; -- 2.54.0 -- Reasonable | Free Software for Correctness | GNU Dezyne -- https://dezyne.org +Sourcery+ | Correctness for Free Software | https://reasonable-sourcery.coop