From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Getting ready to land native-compilation on master Date: Wed, 14 Apr 2021 20:41:00 +0300 Message-ID: <83a6q0zrv7.fsf@gnu.org> References: <83v98v7dzs.fsf@gnu.org> <87v98ox3pe.fsf@tammy.lan.sha-bang.de> <83czuwzto3.fsf@gnu.org> <87lf9klqmn.fsf@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13632"; mail-complaints-to="usenet@ciao.gmane.io" Cc: wilde@sha-bang.de, emacs-devel@gnu.org, akrl@sdf.org To: Alex =?utf-8?Q?Benn=C3=A9e?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 14 19:46:27 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lWjas-0003P7-99 for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Apr 2021 19:46:26 +0200 Original-Received: from localhost ([::1]:52470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWjar-0005IC-5L for ged-emacs-devel@m.gmane-mx.org; Wed, 14 Apr 2021 13:46:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWjVn-0002dy-HU for emacs-devel@gnu.org; Wed, 14 Apr 2021 13:41:13 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47952) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWjVl-0000kx-SB; Wed, 14 Apr 2021 13:41:10 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1641 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lWjVk-0003YV-M6; Wed, 14 Apr 2021 13:41:09 -0400 In-Reply-To: <87lf9klqmn.fsf@linaro.org> (message from Alex =?utf-8?Q?Benn?= =?utf-8?Q?=C3=A9e?= on Wed, 14 Apr 2021 18:28:49 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268061 Archived-At: > From: Alex Bennée > Cc: wilde@sha-bang.de, akrl@sdf.org, emacs-devel@gnu.org > Date: Wed, 14 Apr 2021 18:28:49 +0100 > > >> sysctl -w security.pax.mprotect.global=0 > >> sysctl -w security.pax.mprotect.enabled=0 > >> This is not a Emacs specific problem but a problem with libgccjit > >> itself. (The basic gcc jit "Hello World" example also fails with > >> memory protection in place). > > > > I'm not sure I understand why this happens, but I think this issue > > should be reported to the GCC Bugzilla. > > I suspect this is a change similar to the recent MacOS one where > eXecutable pages cannot be mapped as Writable. The QEMU project recently > had to implement split mappings for it's JIT to workaround this although > I dare say there is probably a JIT interface that should be used to give > suitable access to pages but that is something for the BSD experts to > chime in on. Are you sure this is relevant? libgccjit, contrary to its name, is not JIT code production, at least in Emacs. It produces a file, a shared library which is later loaded. Why does this have to need executable memory pages?