From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4B91C88E75 for ; Fri, 18 Sep 2026 04:26:30 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1x7QAi-0005nD-Su; Fri, 18 Sep 2026 00:26:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1x7QAg-0005lp-0b for qemu-devel@nongnu.org; Fri, 18 Sep 2026 00:25:58 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1x7QAd-0004Pp-Tj for qemu-devel@nongnu.org; Fri, 18 Sep 2026 00:25:57 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 46e09a7af769-80638c24bedso266285a34.0 for ; Thu, 17 Sep 2026 21:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20251104.gappssmtp.com; s=20251104; t=1789705555; x=1790310355; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BNP16yPun+E5+eIoIGqFoDrmD6nTs5/XLq7Sft9YkM8=; b=jj1KzAktkCp3FZ0VmQJEJrHXGncPxk/O4Dhn2m9hJS6o7hVkwMyYy58/7CjVCGXo1y f6Ycrf9ErX5pNmkMSbJOw8zIgntr87jFQLmKR5hcIGBryBCRtqxv/wkUjRgjVRkemWtr PY/kg5pUh3HMTi1MlobkwW6MEZL/dhl15J3EPX3D6Y30np08FTLtGWKHqZ38uBYRQKMt hXGrK119DT2ts3Kto9o2kARNlPLKJwQRHf6rGR/2f+pN+W/DT1gBnZQi10i42jB6CYwb AUUFaNe5N6hnan+76DbwJ5HBUXoWu8fCB1wG19VCU0kFKmuT4BnTHXPiJlAeVLfkADGK Nc7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789705555; x=1790310355; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=BNP16yPun+E5+eIoIGqFoDrmD6nTs5/XLq7Sft9YkM8=; b=wNUAxbIeapZAsKu9e5M7wOSB4UdY4JBLxSL/Wv6y/6Nz5LPypKd10D2bIbTgSXu9fI inoSVN6mHY6YkrraklZDEubqGwx7MmXhoN5xcW6v44RWzsykOkZLzUKyF3d6FgK0pAI8 LAPkSdzhdjmTVdqvWVzdV+n+9TtQiGRxwEBCMZs0kexN9+fsev1J45qdXNerDdwjR7bw zAvhWwvFBtycFBs918VL9mier2fkTLgUqYYNrMdlMa3z4+VcwFC3gkhEgIY7dEh0rV0r 6/Px5gWVuestHj24eCoYRJk8rUn8pjnWq4j5n1g2TZm3gECTot60GlVzumcI/RII+9je lS+w== X-Gm-Message-State: AFuF++mA4ayxsbZO3qwJjdD9dkaAAmAo795QzBbYa+NmSIm2Vm9dEBs6 lkdS0RqkQULKLMIe9ok7o1Diw/y4JxT3PJVxnWV30jLX2StDUvY6ckgYWtF8dmCSott4kY+FLPI vJdWXjxw= X-Gm-Gg: AYBFou2isk4qKh7pCY5LYP7WL1MetLQrpSJDk91kRH3Y2jL4CHPRJmpORCXZPDNuCzS unSyKQFH7133rw1fbg6UhVjgbufLzLsEGY3NFRAfQ5UCcnlBAmZztzqjZqWG3TnWMsoVe7Xqv03 lEHjpwPSqBdM/tG5i5tAN8e4xs4vUvdxY6SQiS6TGrHp2uAYFxsnhkgGSbFSpFgMKmoeuyoAPvn bmiW3PNS4FTjdJBBtd2FmDxB5SmSUq1HfFmz0A133kqED5Qhq+CC1vlWgm6ekuWOjB6LWrJK2ZA iEfM+DxKTkxTpGgi2NHWOMsFEmxhYRb/Pekdr3VufyRQy3NfEORLY5NKkc7vljXUoxcZarpNpqb cN6CR03usspXMYoeVHuEH1uwfzJ2Qi76kRn/+wW4XZ1LCLRIhFgMfhsqcr003P6Aw7BVm4RlqjE aqeU1R1B01D+kVJsT0tpjYMSl6U66tYeIhXhC63l5oyLQcwNC/ubKEYNYn08hTYgHC6N56 X-Received: by 2002:a05:6830:8288:b0:805:69e1:e4e3 with SMTP id 46e09a7af769-80c4e7f8660mr4874622a34.32.1789705554682; Thu, 17 Sep 2026 21:25:54 -0700 (PDT) Received: from rebo.bsdimp.com ([50.253.99.174]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-80e51d627b5sm489718a34.20.2026.09.17.21.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2026 21:25:53 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Cc: Kyle Evans , Warner Losh , Stacey Son , Richard Henderson Subject: [PULL 37/41] bsd-user: Add extended attribute and ACL system call dispatch Date: Thu, 17 Sep 2026 22:24:18 -0600 Message-ID: <20260918042422.38713-38-imp@bsdimp.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260918042422.38713-1-imp@bsdimp.com> References: <20260918042422.38713-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2607:f8b0:4864:20::32f; envelope-from=imp@bsdimp.com; helo=mail-ot1-x32f.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Wire up extended attribute and ACL system calls: extattrctl, extattr_set/get/delete for file, fd, and link variants, extattr_list for fd, file, and link, and all __acl_* operations (aclcheck, delete, get, set for fd, file, and link). Signed-off-by: Stacey Son Assisted-by: Claude Opus 4.6 (1M context) Acked-by: Richard Henderson Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 103 ++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index f385034a53..a14efd3fd4 100644 --- a/bsd-user/freebsd/os-syscall.c +++ b/bsd-user/freebsd/os-syscall.c @@ -1365,6 +1365,109 @@ static abi_long freebsd_syscall(CPUArchState *env, int num, abi_long arg1, ret = do_freebsd_sysarch(env, arg1, arg2); break; + /* + * extended attributes and ACL system calls + */ + case TARGET_FREEBSD_NR_extattrctl: /* extattrctl() */ + ret = do_freebsd_extattrctl(arg1, arg2, arg3, arg4, arg5); + break; + + case TARGET_FREEBSD_NR_extattr_set_file: /* extattr_set_file(2) */ + ret = do_freebsd_extattr_set_file(arg1, arg2, arg3, arg4, arg5); + break; + + case TARGET_FREEBSD_NR_extattr_get_file: /* extattr_get_file(2) */ + ret = do_freebsd_extattr_get_file(arg1, arg2, arg3, arg4, arg5); + break; + + case TARGET_FREEBSD_NR_extattr_delete_file: /* extattr_delete_file(2) */ + ret = do_freebsd_extattr_delete_file(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR_extattr_set_fd: /* extattr_set_fd(2) */ + ret = do_freebsd_extattr_set_fd(arg1, arg2, arg3, arg4, arg5); + break; + + case TARGET_FREEBSD_NR_extattr_get_fd: /* extattr_get_fd(2) */ + ret = do_freebsd_extattr_get_fd(arg1, arg2, arg3, arg4, arg5); + break; + + case TARGET_FREEBSD_NR_extattr_delete_fd: /* extattr_delete_fd(2) */ + ret = do_freebsd_extattr_delete_fd(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR_extattr_get_link: /* extattr_get_link(2) */ + ret = do_freebsd_extattr_get_link(arg1, arg2, arg3, arg4, arg5); + break; + + case TARGET_FREEBSD_NR_extattr_set_link: /* extattr_set_link(2) */ + ret = do_freebsd_extattr_set_link(arg1, arg2, arg3, arg4, arg5); + break; + + case TARGET_FREEBSD_NR_extattr_delete_link: /* extattr_delete_link(2) */ + ret = do_freebsd_extattr_delete_link(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR_extattr_list_fd: /* extattr_list_fd(2) */ + ret = do_freebsd_extattr_list_fd(arg1, arg2, arg3, arg4); + break; + + case TARGET_FREEBSD_NR_extattr_list_file: /* extattr_list_file(2) */ + ret = do_freebsd_extattr_list_file(arg1, arg2, arg3, arg4); + break; + + case TARGET_FREEBSD_NR_extattr_list_link: /* extattr_list_link(2) */ + ret = do_freebsd_extattr_list_link(arg1, arg2, arg3, arg4); + break; + + case TARGET_FREEBSD_NR___acl_aclcheck_fd: /* __acl_aclcheck_fd() */ + ret = do_freebsd__acl_aclcheck_fd(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_aclcheck_file: /* __acl_aclcheck_file() */ + ret = do_freebsd__acl_aclcheck_file(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_aclcheck_link: /* __acl_aclcheck_link() */ + ret = do_freebsd__acl_aclcheck_link(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_delete_fd: /* __acl_delete_fd() */ + ret = do_freebsd__acl_delete_fd(arg1, arg2); + break; + + case TARGET_FREEBSD_NR___acl_delete_file: /* __acl_delete_file() */ + ret = do_freebsd__acl_delete_file(arg1, arg2); + break; + + case TARGET_FREEBSD_NR___acl_delete_link: /* __acl_delete_link() */ + ret = do_freebsd__acl_delete_link(arg1, arg2); + break; + + case TARGET_FREEBSD_NR___acl_get_fd: /* __acl_get_fd() */ + ret = do_freebsd__acl_get_fd(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_get_file: /* __acl_get_file() */ + ret = do_freebsd__acl_get_file(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_get_link: /* __acl_get_link() */ + ret = do_freebsd__acl_get_link(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_set_fd: /* __acl_set_fd() */ + ret = do_freebsd__acl_set_fd(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_set_file: /* __acl_set_file() */ + ret = do_freebsd__acl_set_file(arg1, arg2, arg3); + break; + + case TARGET_FREEBSD_NR___acl_set_link: /* __acl_set_link() */ + ret = do_freebsd__acl_set_link(arg1, arg2, arg3); + break; + default: qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num); ret = -TARGET_ENOSYS; -- 2.55.0