From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qDDCI6myul4yFgAA0tVLHw (envelope-from ) for ; Tue, 12 May 2020 14:28:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MLrXOLeyul41IwAAbx9fmQ (envelope-from ) for ; Tue, 12 May 2020 14:29:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B9FDE940DB8 for ; Tue, 12 May 2020 14:29:09 +0000 (UTC) Received: from localhost ([::1]:60758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYVuA-0007Gb-Ih for larch@yhetil.org; Tue, 12 May 2020 10:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYVtS-0006Mu-Rr; Tue, 12 May 2020 10:28:26 -0400 Received: from hera.aquilenet.fr ([2a0c:e300::1]:33510) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYVtR-0006i1-OL; Tue, 12 May 2020 10:28:26 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 7486B28B3; Tue, 12 May 2020 16:28:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HQqSKtTX4X9C; Tue, 12 May 2020 16:28:21 +0200 (CEST) Received: from function (lfbn-bor-1-797-11.w86-234.abo.wanadoo.fr [86.234.239.11]) by hera.aquilenet.fr (Postfix) with ESMTPSA id E347428A4; Tue, 12 May 2020 16:28:20 +0200 (CEST) Received: from samy by function with local (Exim 4.93) (envelope-from ) id 1jYVtL-002HN8-Qd; Tue, 12 May 2020 16:28:19 +0200 Date: Tue, 12 May 2020 16:28:19 +0200 From: Samuel Thibault To: Jan Nieuwenhuizen Subject: Re: [PATCH] ext2fs: Update to upstream Hurd-reserved xattr index for "gnu.*". Message-ID: <20200512142819.fzpeco3kk4ufqnlw@function> Mail-Followup-To: Jan Nieuwenhuizen , bug-hurd@gnu.org, guix-devel@gnu.org References: <87sgg5z1gt.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sgg5z1gt.fsf@gnu.org> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) Received-SPF: softfail client-ip=2a0c:e300::1; envelope-from=samuel.thibault@gnu.org; helo=hera.aquilenet.fr X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org, bug-hurd@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 X-Spam-Score: -0.51 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Scan-Result: default: False [-0.51 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.53993337933402]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.06), country: US(-0.00), ip: 209.51.188.17(-0.54)]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; HAS_ORG_HEADER(0.00)[]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[larch=yhetil.org]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[samuel.thibault@gnu.org,guix-devel-bounces@gnu.org]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[gnu.org]; HAS_LIST_UNSUB(-0.01)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_SEVEN(0.00)[8]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: VMn8FxN85eiC Jan Nieuwenhuizen, le mar. 12 mai 2020 16:12:34 +0200, a ecrit: > setfattr --name=gnu.translator --value='/hurd/pflocal\0' /mnt/servers/socket/1 man setfattr says If the given string is enclosed in double quotes, the inner string is treated as text. In that case, backslashes and double quotes have special meanings and need to be escaped by a preceding backslash. so I guess it needs setfattr --name=gnu.translator --value='"/hurd/pflocal\0"' /mnt/servers/socket/1 to actually interpret \0 > --8<---------------cut here---------------start------------->8--- > fsck --yes --force / > fsysopts / --writable > mv /servers/socket/1 /servers/socket/1-linux > touch /servers/socket/1 > setfattr --name=gnu.translator --value='/hurd/pflocal\0' /servers/socket/1 Note that glibc's setxattr, i.e. _hurd_xattr_set, translates that into a __file_set_translator() RPC call. Did you pass the proper option to make ext2fs record the translator as xattr instead of passive record? > And I guess there must be an incompatibility between Linux and the Hurd > in how setfattr embeds the xattr attributes into the file system. > > How to best "diff" this aspect in the file system; how to proceed? debugfs can be used for that. > Inspired by Shengyu's GSoC code that simply seemed to use fprintf for > debbugging, I tried adding some debug printing in inode.c > > fprintf (stderr, "gnu.translator[%d,%d]=%s\n", datalen, strlen (*namep), *namep); Printf is the simplest way to make sure things are happening the way one wants, yes. Note however that in the case of translators even the output on stderr is buffered, so you need to flush it with fflush(stderr). Even safer is to use snprintf + mach_print(). > but that does not seem to work, More precisely? I'll assume "does not show up". If your print doesn't show up, try to put a print in other places which are definitely to be called such as in diskfs_user_read_node(). If those come up, then it means the code you put your prints is not even called, so put prints in code you thought was calling it etc. up to the RPC that you thought would be called, then jump to libc which was supposed to be making the RPC call, etc. Samuel