From patchwork Tue Jul 23 08:59:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 813942 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp2221249wro; Tue, 23 Jul 2024 01:59:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWG7G6XKN6d5L/tdh2F6J6rvj+zXbXXiUG31Jc+BYT/zMT4VsJFLd5Y3I9rUg4axx6dTnDO+lVVVUEHvIHwGPYB X-Google-Smtp-Source: AGHT+IEpBdrBgWxxuJiWgltGhl/w2CsHhEeqKDIWqO7ZqmTq8P0WMfaiLNHqnDlOQ/dv+rKpWthN X-Received: by 2002:a05:620a:2447:b0:79d:7d6e:e02b with SMTP id af79cd13be357-7a1a13c65b5mr906103285a.70.1721725171393; Tue, 23 Jul 2024 01:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721725171; cv=none; d=google.com; s=arc-20160816; b=Gq5D1LYhlYvUed2JDx2t+h8ZBKMs8ym5/lH9VJ5JWwrmsJtX88/rPIAP7cJTkNMMM9 2h7BrcdUeP6jVTClzupIYtFu2EArYvIaN2BDQnB3JC7xqfo/0al/lmym+mk3NhG61rok 9YLu2JN/flZMxQQItvUgaGJf6l2JMQvTifA4o6CLEYe8PHGFJkLMm7fWXW+RlF6P6m9v f7Gexu/nZZPpPg5dSu2dkzrWjGSpC6yF1KiqBBA9OM9RU6BtdLRhZK8CUEQJWSiV7Gnw +OlJ/N/BqwOTBauB0w6Awqex/JeB/bBNL2dUzBkzqAWBI8vkN0Tyk3a4urbMLMGUqZVG P9ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=DKprz6Otg/hA/vCqqYOw7BbZN7ncWT8hNx6EMDpSDTk=; fh=5bjxi5pyxZmnVwnh9ecMvkNkXFiW4zj1InyiTlIH1OQ=; b=pis5TGkcivMXfn1g1gGXRUAufFzPKsjcmyB71HtlcZHEuGyRzbdIv6Dqr73XuJFza/ ZEbQuffDc1N/k5Pod3n/HOPhBeBeSa56qx8F5fSRNd8Z6oZcT4Pw7ixw/UjwtLAX8cwH QhFLSBNOAoQEO4fKrlIzkO8n5I4H3Q9aOvDQ0kTjvI4y48Rw9h//nbJrbAvU3DYeuDR3 VyxWyRPImcso4FqF50LYbmKS9Ovr2bvrR/dkQU99ocFuxSAOnFTjkagb223VayFyYV/L sEle5c6CzU7gB3E8v/EMJgW7McXmHj3QiWozLJxDMXQfryHm6+qNIcKvn8Gsy72v3div i2Rw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FuyO6kqy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a19904c891si1015554885a.350.2024.07.23.01.59.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jul 2024 01:59:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FuyO6kqy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWBMX-0006AJ-SL; Tue, 23 Jul 2024 04:59:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWBMV-00069c-Hb for qemu-devel@nongnu.org; Tue, 23 Jul 2024 04:59:12 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWBMR-0007to-Tx for qemu-devel@nongnu.org; Tue, 23 Jul 2024 04:59:10 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4279c924ca7so38215835e9.2 for ; Tue, 23 Jul 2024 01:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721725145; x=1722329945; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DKprz6Otg/hA/vCqqYOw7BbZN7ncWT8hNx6EMDpSDTk=; b=FuyO6kqyOLu/fznHqxpzXOqnyLZKjZde267miHEuOyNqx6WYsxLcrJJCjxqqnsAHo8 CYRzyDIfg3cmhZLLV1AGVEg4cOIKBhrjj0117JSjsmxayMp5sb93dcT7z9TUp38gCmqn IUGCtASvkruESpbm5sdHJqvK8bBMMZkkNm5FRyoL2jVC41VrMxev/Mofgm/PZLHEpq0d cIbRBybgZ6HNYuK7pD7kS8ldnxdIg2G5EMYXJXYvSPxm2tBypmwOhvGuTRUiQhX6aVMd /PpN1FbFgq2sz4qhXqj75zbgHG2CGg3fdOcn/dISba240rcBaPhPeWts9T6/h9cqjV3L Nhdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721725145; x=1722329945; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DKprz6Otg/hA/vCqqYOw7BbZN7ncWT8hNx6EMDpSDTk=; b=fvyYVNuWWKnUid1vPWV6XIUlM/3WHUHuBwbvqexX84+GCXB06BF6ZxLY7YioS4pe95 vOvrU7q/T4ST88O5pQAsGa7KmJF9K3nlQCm6Cv2MUsH/znbwdC+W7Un+ZewF+6QOgS/v vH/RTA7ydRwGyfnwcoTJRVVVO4g6PEe78nD+Ofsz1kFZf30sh+rqzK7SIvWnZXIVLAv7 r7hW+L5KHM4l4QJ75lAApHIL35KBBHlDpGox08MsP/42Zyeu3adJumKLSE1a6QLlboiE poLHo21tDFpBBV3dNYf64W7gz2n07OgjNinuw95R+Kw6Ybx7WTQFXfQYU0iU3SVtBC6z DovA== X-Gm-Message-State: AOJu0YzcSLC4WSrx3/7kop4MNIMJbCN2amecalrjp37GQaXpCGFCJt6i zVeumzUxJRB1ieRsoXV1JvfwTuYGSc5G5TH2UCxQPcGGtay1zlfoXGMyFaS1ahUFZJzQixv8TwS yJa4= X-Received: by 2002:a5d:58d6:0:b0:368:6336:6051 with SMTP id ffacd0b85a97d-369bae4e0b1mr5296850f8f.22.1721725144628; Tue, 23 Jul 2024 01:59:04 -0700 (PDT) Received: from localhost.localdomain ([178.239.250.121]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36878684230sm10846581f8f.17.2024.07.23.01.59.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 23 Jul 2024 01:59:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Cameron Esfahani , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , Richard Henderson , Alexander Graf , Akihiko Odaki , Peter Maydell , Phil Dennis-Jordan , Roman Bolshakov , Francesco Cagnin Subject: [RFC PATCH] macos: Allow coredump generation Date: Tue, 23 Jul 2024 10:59:02 +0200 Message-ID: <20240723085902.98572-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org QEMU is allowed to generate coredump on other POSIX OSes, bring that functionality to macOS. Admin users still need to enable the kern.coredump sysctl manually running: % sudo sysctl kern.coredump=1 the normal users have to enable their shell running: % ulimit -c unlimited Reference used: https://nasa.github.io/trick/howto_guides/How-to-dump-core-file-on-MacOS.html Signed-off-by: Philippe Mathieu-Daudé --- Cc: Alexander Graf Cc: Akihiko Odaki Cc: Peter Maydell Cc: Phil Dennis-Jordan Cc: Roman Bolshakov Cc: Paolo Bonzini Cc: Francesco Cagnin --- MAINTAINERS | 2 ++ meson.build | 6 ++++-- accel/hvf/entitlements.plist | 2 ++ accel/tcg/entitlements.plist | 8 ++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 accel/tcg/entitlements.plist diff --git a/MAINTAINERS b/MAINTAINERS index d5ff6c2498e..c6f57d77b19 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -611,6 +611,8 @@ M: Philippe Mathieu-Daudé S: Odd Fixes F: .gitlab-ci.d/cirrus/macos-* F: */*.m +F: accel/tcg/entitlements.plist +F: accel/hvf/entitlements.plist F: scripts/entitlement.sh Alpha Machines diff --git a/meson.build b/meson.build index a1e51277b09..aae35e93420 100644 --- a/meson.build +++ b/meson.build @@ -3983,9 +3983,11 @@ foreach target : target_dirs ] if 'CONFIG_HVF' in config_target entitlements = 'accel/hvf/entitlements.plist' - build_input += files(entitlements) - install_input += meson.current_source_dir() / entitlements + else + entitlements = 'accel/tcg/entitlements.plist' endif + build_input += files(entitlements) + install_input += meson.current_source_dir() / entitlements emulators += {exe['name'] : custom_target(exe['name'], input: build_input, diff --git a/accel/hvf/entitlements.plist b/accel/hvf/entitlements.plist index 154f3308ef2..af4bb45dbea 100644 --- a/accel/hvf/entitlements.plist +++ b/accel/hvf/entitlements.plist @@ -4,5 +4,7 @@ com.apple.security.hypervisor + com.apple.security.get-task-allow + diff --git a/accel/tcg/entitlements.plist b/accel/tcg/entitlements.plist new file mode 100644 index 00000000000..9acd12816c9 --- /dev/null +++ b/accel/tcg/entitlements.plist @@ -0,0 +1,8 @@ + + + + + com.apple.security.get-task-allow + + +