From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#41242: Port feature/native-comp to Windows Date: Sat, 23 May 2020 15:11:02 +0000 Message-ID: References: <83k11e4a0s.fsf@gnu.org> <83blmp4tob.fsf@gnu.org> <83o8qp1hfr.fsf@gnu.org> <837dxcv1po.fsf@gnu.org> <83imgvdf94.fsf@gnu.org> <83eerjde6k.fsf@gnu.org> <83a7227hkb.fsf@gnu.org> <83blmf13d1.fsf@gnu.org> <83367r0zvb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="2273"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 41242@debbugs.gnu.org To: Nicolas =?UTF-8?Q?B=C3=A9rtolo?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 23 17:12:18 2020 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 1jcVow-0000U6-3B for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 May 2020 17:12:18 +0200 Original-Received: from localhost ([::1]:37808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcVov-0001B7-3A for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 23 May 2020 11:12:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcVog-0001Av-Ec for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 11:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51989) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcVog-0007tj-4K for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 11:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcVof-0007Ix-VH for bug-gnu-emacs@gnu.org; Sat, 23 May 2020 11:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 May 2020 15:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41242 X-GNU-PR-Package: emacs Original-Received: via spool by 41242-submit@debbugs.gnu.org id=B41242.159024666828012 (code B ref 41242); Sat, 23 May 2020 15:12:01 +0000 Original-Received: (at 41242) by debbugs.gnu.org; 23 May 2020 15:11:08 +0000 Original-Received: from localhost ([127.0.0.1]:35302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcVnn-0007Hk-Uw for submit@debbugs.gnu.org; Sat, 23 May 2020 11:11:08 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:64185) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcVnk-0007Ha-9w for 41242@debbugs.gnu.org; Sat, 23 May 2020 11:11:07 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04NFB25V001935 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 23 May 2020 15:11:03 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 04NFB29Q029262; Sat, 23 May 2020 15:11:02 GMT In-Reply-To: ("Nicolas =?UTF-8?Q?B=C3=A9rtolo?="'s message of "Sat, 23 May 2020 11:41:19 -0300") 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" Xref: news.gmane.io gmane.emacs.bugs:180808 Archived-At: Nicolas B=C3=A9rtolo writes: >> This is something we have to define.=C2=A0 Currently we only complain if > one >> of the defined functions that was dumped cannot be found in the new >> .eln.=C2=A0 My preference would be to sign each .eln used for dump to > make >> sure what we are loading is what we dumped and refuse to load > otherwise. > > What if we find out where the linker has put the shared library, copy > that region > of memory into the dump file and when loading Emacs we mmap that data > into > same address it was? > It is essentially saving the result of the linker for later use. This > would require > no ASLR and doing it ASAP to prevent the something from using that > address space. I don't think would fly: You are not garanteed to be able to obtain the same mmaped address anyway and we cannot go for a solution that does not support ASLR. In general to be portable it cannot rely on assumptions or low level tricks. I think these are (at least part of) the reasons why we moved away from unexec. > Another option: statically link the .eln files (we'd need libgccjit > to create static libraries) > into the final Emacs executable. This would take care of function > definitions and > loading the dump would take care of the rest. Is not that simple, loading eln is mutating the environment with side effects, function definition is just a part of that. Even more important we must support subsequent dumps. Andrea --=20 akrl@sdf.org