From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#75322: SAFE_ALLOCA assumed to root Lisp_Objects/SSDATA(string) Date: Fri, 03 Jan 2025 20:48:08 +0000 Message-ID: <87msg7iq0o.fsf@protonmail.com> References: <87jzbbke6u.fsf@protonmail.com> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34756"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75322@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 03 21:49:27 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tTobn-0008sy-Lt for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Jan 2025 21:49:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTobR-0004S7-H3; Fri, 03 Jan 2025 15:49:05 -0500 Original-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 1tTobQ-0004Rm-1g for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:49:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tTobP-00084A-OA for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:49:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:From:Date:To:Subject; bh=bJCKhJ4D/rCfgmTzQCMyeOV2oe8+V9h8uE/3fLT2vCQ=; b=Np0sgJhK0zfK7TjDhcCeT1v6ODntRh5ymu6RHLSLCpvUd+gGZqhQSZix9kE11nodgOayBcAQGaR0MiGYmJJD15gTxi6RKdq1BuyaRCcNjwgghJl/oNhCpdYWLMCbgQgFB3qeMZ27so8QLSyWsXV7cHW1JrNy27uXwyBGZ3tgRNBrKApx4gmjsLbeuny9VUgJBvVei4aMHTgiz4tv9PfXX+JDwTNVsihsWxVsgYNQHEXWhBnYbnjpQSJ3UddZEzolcKYn8PjwdF9I9B8l8jaI8G4q7s9qvKKbMwOq9QQtYlN6TtrChaDr/s2gxm3ZoREBOr4+4wCs9VPFmEJ6Stj64w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTobO-0000bl-EQ for bug-gnu-emacs@gnu.org; Fri, 03 Jan 2025 15:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Jan 2025 20:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75322 X-GNU-PR-Package: emacs Original-Received: via spool by 75322-submit@debbugs.gnu.org id=B75322.17359373042211 (code B ref 75322); Fri, 03 Jan 2025 20:49:02 +0000 Original-Received: (at 75322) by debbugs.gnu.org; 3 Jan 2025 20:48:24 +0000 Original-Received: from localhost ([127.0.0.1]:52385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tToam-0000Za-BT for submit@debbugs.gnu.org; Fri, 03 Jan 2025 15:48:24 -0500 Original-Received: from mail-10629.protonmail.ch ([79.135.106.29]:26843) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tToaj-0000Z9-A9 for 75322@debbugs.gnu.org; Fri, 03 Jan 2025 15:48:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735937292; x=1736196492; bh=bJCKhJ4D/rCfgmTzQCMyeOV2oe8+V9h8uE/3fLT2vCQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=LyjNfH7WI+VWKiA8w4ClZ4kbK0+xaOF8FuC4m4Qoht66OpHrGvh+xtvNVJR7MmOfa JtPeqGq6x4QmQ2lME/UgW6ODR0rfSIVdXYD8iNYeNuNe+3geWf+SP1UZvICzO/p9bI 7eWT8qChGcpM8kxyJMpmXX+pmhPspOWG7b8tKzh4TM1dlRm27fSsneZKWp8QZ49BkL wxUquUwlzy5j1XnXcVMc50ycEg3oktZy7IyStU3pgo6skafjA3HBSQOSvo3lbrLNED rO7jsoBXJPN/ZI/GUSPELXhzwEdUw1f7Nr7rjgZLquzpB/cppxTMJB86TbPWqoWrIm 5WDsMULhTJIZg== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 7e6e606440186197d698c8573d3300ebb0cd2064 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298314 Archived-At: Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> >> The pointers to string data case probably requires adding yet another >> macro SAFE_ALLOCA_FIND_A_GOOD_NAME, which, for MPS, allocates a root, >> possibly and exact one which would be good. Note that might still EFAULT if there's a memory barrier. I think. Do we really need to move all arguments to syscalls and libc functions which might use a syscall into non-MPS memory? That would be bad. And which libc functions might use a syscall? I think we can agree fprintf might, and memcpy() doesn't (note to self: destroy all evidence I ever considered making memcpy() use MMU tricks for very large buffers), but what about all the others? Maybe I'm panicking too much and fixing read/write/exec* is good enough? > Or one does it as you did in b0a209e9204, that's of course also safe. > For both old and new GC. (Don't remember if you mentioned it Pip, but > old GC moves string data as well, during string compaction, should GC > run). Ouch. Yes, I remember now. Pip