From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: arthur miller Newsgroups: gmane.emacs.devel Subject: Sv: as for Calc and the math library Date: Thu, 15 Aug 2024 05:00:06 +0000 Message-ID: References: <864j7qhup6.fsf@gnu.org> <87a5hi0yts.fsf@valhala.localdomain> <86y152ge0b.fsf@gnu.org> <86jzgjfwqp.fsf@gnu.org> <87sev78arx.fsf@gmail.com> <86le0z89u1.fsf@gnu.org> <87o75v87n1.fsf@gmail.com> <86frr786k7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_DU2PR02MB10109A727479A59356BA7BCB196802DU2PR02MB10109eu_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13738"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "gerd.moellmann@gmail.com" , "nicolas@n16f.net" , "emacs-devel@gnu.org" To: Eli Zaretskii , Suhail Singh Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 15 08:06:13 2024 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 1seTch-0003Nn-Um for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Aug 2024 08:06:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seTbr-0007Sw-BW; Thu, 15 Aug 2024 02:05:19 -0400 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 1seSb1-00085c-Ks for emacs-devel@gnu.org; Thu, 15 Aug 2024 01:00:23 -0400 Original-Received: from mail-db8eur05olkn2067.outbound.protection.outlook.com ([40.92.89.67] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seSaz-0007Mj-3l; Thu, 15 Aug 2024 01:00:23 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cnv46lMjBPv9vVoCAV5NWdhMzWuc9p40B1h7eGVV6v4WgA7BmumT+QJKQh8xkY0NxX0kAu819hxhAS51pL2AJJj6YrFcgLvqP/HBO1vT9VSfQu9s3g8QoAwZCuhSrC3SfgmT3aRnuimY8Jt5XsrePO9D4mtVMel1gSKoIluFHulk0RuZ33gXmiGOV4ye5tX8B00mTdr7S0fXiFOIv6DJ13V+RJxq2qdm2GoNOaGtjQ3juKyM15C34AoksYOx+bCOa/6KJ0c5TqA0St6O2WflM80csjsQFJHgJ+jzk0VN3j33y+ZsvKugqhs7W/LqOG8bCp4UgIJ0jzxHmP24n0g/Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iX8E3/PV9WR19+j43D9SAJor62A+f1wRQ3wO4ko8GTw=; b=SKRNAfDpuqWDA+JpU/d267hqMze65310QWLVUCPHx7o57eS207Vk4PxQUSSBREKrRiy8nGddJYKPXr62S5AECounUWQ5wDdeUdh4MFAx/KhOthQs9eY7D/U7RRoSNQxq/8VnEHze9WkA52xjv6xyuaG6IWctKsYSbaxSd9wPCNL3tTezZxcy6hOEXo+ViShq95wldpV3rW31xKlmE8itK6Cze056+puGeC6I8B4WO2omhllY9zHwT+qoyJFEIzoSXL2Qq5uS/xOZMW+O3Hfbv60YEPIY6jhZIr1v2IrQrmtqa5xNkbaedq1sIOaKJUhBPSoyYXLHQUOtUofjLH2VPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iX8E3/PV9WR19+j43D9SAJor62A+f1wRQ3wO4ko8GTw=; b=kX8NMZgu4ZyU3eQ/1oUdkRm5sbC0/CgoLbHPn5Xdwru+TQBPpB/Xi/P9z7MEnvp9egVJCtqfz15yONxtc33gZR7G3A7PsgOnLxZklwja55HmhZ/cUQqyt1hPLSghM3PqOJSyY0uidjXty2FRAEGMPKK8ju8AFx+nHMZWzgCH0wjgNzmrTjL6CFmIU+IrPKFRw/qa719QA9JlqPwPfXzoKt9jXcjRxZGLlp7514QaWTBMAvexoFGufkgkiinBo0sliRcPPgKH1zABwSiDZhA9tlyvzvzRlPtu2htdOFL9/WJQsxEttcYq3Rlat925Wvec7sq7k6H/0jO/KnJcc1TusA== Original-Received: from DU2PR02MB10109.eurprd02.prod.outlook.com (2603:10a6:10:497::14) by AS2PR02MB9549.eurprd02.prod.outlook.com (2603:10a6:20b:59a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.22; Thu, 15 Aug 2024 05:00:07 +0000 Original-Received: from DU2PR02MB10109.eurprd02.prod.outlook.com ([fe80::f3c9:d4cb:290:d487]) by DU2PR02MB10109.eurprd02.prod.outlook.com ([fe80::f3c9:d4cb:290:d487%4]) with mapi id 15.20.7875.016; Thu, 15 Aug 2024 05:00:07 +0000 Thread-Topic: as for Calc and the math library Thread-Index: AQHa7HhyCr4HNzb0tkSg9b4Ke04UmbIjdNFDgAAGX1aAAAZxKoABK62BgAF5touAACUuyYAAf3mkgAAFtHaAAA08XIAABoVEgADg0DA= In-Reply-To: <86frr786k7.fsf@gnu.org> Accept-Language: sv-SE, en-US Content-Language: sv-SE x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [1RGw3iBhO8ioQYL7cQQAx0xWGfE1CccL] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU2PR02MB10109:EE_|AS2PR02MB9549:EE_ x-ms-office365-filtering-correlation-id: 747aecdc-4313-4a01-8017-08dcbce721c9 x-microsoft-antispam: BCL:0; ARA:14566002|8060799006|19110799003|15030799003|15080799003|461199028|440099028|3412199025|102099032; x-microsoft-antispam-message-info: c3hoDyHAhaIgTkjEsb6o3JKLMM6OwTHpZPnoQMmvcC03fpMgc/IRjsKb4byI6jmS09PqwQT9Rj6FmhWqnzGzXSVT3JK3wlVl9I4kb1vWNuMN0loQcuzAM0bjAunT6n9YH2sOD8MWN4atuZ8BoEgm3qgm5dnEU7dJuIs1a21Idu01OT8guPUahx9qMnhJnnOhJ4eQVCtwstkS+AqyyA/9jE7GHDioQDBb5UsgOuaJl4bTE7RfTk2LHjq38qFAr94ZxbhVh/aTESJ9nhY5yxCoI5Fz60+Qr8taBUon0EUyYPd742RCj10uGNJQR+h1mwuIEdlC682ffZtKOIR8o61BRt0f213sVS6WzcwY/F7cHnaMW94EsHIkayTxDifyW6QKi5qnkgIvRoqfYzCtNpKBZBPuL8W8vLQgI8wAGluJ0ykvEiaETittqgdrRYHVaxxeP9fJvGIpMnEg0ILMivTVY4zCF2cAlP1tq7kK4AZ3Skj1UirDJ+CdrnAWMMt4RZy8HksHE4QK1IKwDec4MLgsZxDFHpdQczyj5qnYAJeTSlxz4VdCGYl9M3uKEpveuZiQt9nQZdNadEIiBQBzObFLyX0Nuso2aTJRAnJkelGFvuhFpuHZo64NH1L7PWpfB4DZgT6Oj4eg2WANJvQbcVzSaNa5f+pcJwiERyguOWRPXmVO3oxhiBgl1vaCHdfXIcqk6leIpL3l3RxbQT8ZoQFXsQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?5PM2GFnOuGxiAalRtFIvEx5KIEZ88D4QqiJNlOmayEP4fDj+yTXkERWgtv?= =?iso-8859-1?Q?cnU0iJEJcDhmKp36ypkelaA/hSZLAadNLVc8IYj22lV75siitWfX5agNar?= =?iso-8859-1?Q?li+grwAPv8UsXQ9Xv4h3W1t/BFebzdhJoV/NG6MPO9VT9Z487Ci4SQnKa3?= =?iso-8859-1?Q?Ok1N8VdMjitxWvNP2riDTvV/1ciNkh3agqsM7iNqd8GmB7TaTwce/ucZid?= =?iso-8859-1?Q?02/PBUZqQ+8fy5wzo49pRNuva4ZAxaHGXg/j4DusB8VI9G0ik+9vJ94T/M?= =?iso-8859-1?Q?shKL8oV4pRYxvCMWw8gLk5dz6Hpt1nil1Q8s6DBdOUeW0YXbuuNiAqi+px?= =?iso-8859-1?Q?0G8MKPYQNlIA9ldGHNpYOjRb2Z+2hSJ5owfhnMJPaJVs+aEGRgT6e6kp9c?= =?iso-8859-1?Q?40A5XDo4F4Y7h8HmD8YNkQNDfNxRZLHUXi03YE5vXtoHiT/9nez6M2DmIa?= =?iso-8859-1?Q?lRpeIed3H0WzMZfEjpOPS3boz37GmBiWJQdgNpaWRmKcODLn4x9hMNtJPv?= =?iso-8859-1?Q?from9bdUrbP5N+mFrjkDhDyxYzP9F/+oGar1l5th+XCPWrLQdnrG4Wuith?= =?iso-8859-1?Q?FMsrOb/KkO+BZniD1qGdWsP3wfdDXzInmbKpw+1Q5GbOV4CvBFTTS58D2Y?= =?iso-8859-1?Q? X-OriginatorOrg: sct-15-20-7828-19-msonline-outlook-12d23.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU2PR02MB10109.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 747aecdc-4313-4a01-8017-08dcbce721c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Aug 2024 05:00:06.9807 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR02MB9549 Received-SPF: pass client-ip=40.92.89.67; envelope-from=arthur.miller@live.com; helo=EUR05-DB8-obe.outbound.protection.outlook.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 15 Aug 2024 02:05:14 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322762 Archived-At: --_000_DU2PR02MB10109A727479A59356BA7BCB196802DU2PR02MB10109eu_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > > Eli Zaretskii writes: > > > > >> On the topic of what would be acceptable for an FFI, wouldn't someth= ing > > >> akin to what's done for modules be sufficient ? I.e., have the user= s of > > >> the interface explicitly state that they are compliant. > > >> > > >> It would scale better than an allow-list. IIUC, Arthur mentioned th= is > > >> in another thread. If this wouldn't be sufficient for an FFI, could= you > > >> please elaborate on why that's the case ? > > > > > > What exactly are you suggesting? IOW, please describe what you have > > > in mind in more detail, because I don't think I understand it. > > > > Specifically, modify the `define-ffi-library' macro that emacs-ffi > > provides. > > > > Presently, it takes two arguments: a SYMBOL and a NAME. I am proposing > > that it be updated to take three arguments: a SYMBOL, a NAME and a > > GPL-COMPATIBLE-P token. A value of `t' would be necessary for creating > > a reference to the library. > > And if the value is not t, then the load will fail? If so, then this > additional argument makes very little sense: you could instead say It makes as much sense as it makes in C library. The token is basically an agreement between Emacs developers and the user not to load (link) closed source libraries into Emacs. > that just by loading the library, the Lisp program which uses > emacs-ffi "declares" the loaded library to be GPL-compatible. And we > are back where we began. Yes, you could. It would just completely remove the barrier. However, the token is an explicit acknowledgment of Emacs policy and license terms, = by the person who loads the library into Emacs. > The way we do it when loading modules requires the _loaded_ library to > declare itself compatible, by exporting a symbol of a certain name. > That is an action by the library we load, not by the Lisp program > which loads it. True. But as you said yourself, a malicious user can easily cicrumvent it, = even in C and there is nothing we can do to prevent them other than possibly tak= ing legal actions against them. If some company or a state would use Emacs or any other GNU program, as a front-end to closed-source software, there is very little one can do technically. It is only the license and the agreement that actually protect= s it. ________________________________ Fr=E5n: Eli Zaretskii Skickat: den 14 augusti 2024 17:31 Till: Suhail Singh Kopia: gerd.moellmann@gmail.com ; nicolas@n16f.ne= t ; arthur.miller@live.com ; emac= s-devel@gnu.org =C4mne: Re: as for Calc and the math library > From: Suhail Singh > Cc: Suhail Singh , gerd.moellmann@gmail.com, > nicolas@n16f.net, arthur.miller@live.com, emacs-devel@gnu.org > Date: Wed, 14 Aug 2024 11:08:02 -0400 > > Eli Zaretskii writes: > > >> On the topic of what would be acceptable for an FFI, wouldn't somethin= g > >> akin to what's done for modules be sufficient ? I.e., have the users = of > >> the interface explicitly state that they are compliant. > >> > >> It would scale better than an allow-list. IIUC, Arthur mentioned this > >> in another thread. If this wouldn't be sufficient for an FFI, could y= ou > >> please elaborate on why that's the case ? > > > > What exactly are you suggesting? IOW, please describe what you have > > in mind in more detail, because I don't think I understand it. > > Specifically, modify the `define-ffi-library' macro that emacs-ffi > provides. > > Presently, it takes two arguments: a SYMBOL and a NAME. I am proposing > that it be updated to take three arguments: a SYMBOL, a NAME and a > GPL-COMPATIBLE-P token. A value of `t' would be necessary for creating > a reference to the library. And if the value is not t, then the load will fail? If so, then this additional argument makes very little sense: you could instead say that just by loading the library, the Lisp program which uses emacs-ffi "declares" the loaded library to be GPL-compatible. And we are back where we began. The way we do it when loading modules requires the _loaded_ library to declare itself compatible, by exporting a symbol of a certain name. That is an action by the library we load, not by the Lisp program which loads it. --_000_DU2PR02MB10109A727479A59356BA7BCB196802DU2PR02MB10109eu_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > >> On the topic of what would be acceptable for an FFI, wou= ldn't something
> > >> akin to what's done for modules be sufficient ?  I.= e., have the users of
> > >> the interface explicitly state that they are compliant.<= /div>
> > >>
> > >> It would scale better than an allow-list.  IIUC, Ar= thur mentioned this
> > >> in another thread.  If this wouldn't be sufficient = for an FFI, could you
> > >> please elaborate on why that's the case ?
> > >
> > > What exactly are you suggesting?  IOW, please describe = what you have
> > > in mind in more detail, because I don't think I understand i= t.
> >
> > Specifically, modify the `define-ffi-library' macro that emacs-ff= i
> > provides.
> >
> > Presently, it takes two arguments: a SYMBOL and a NAME.  I a= m proposing
> > that it be updated to take three arguments: a SYMBOL, a NAME and = a
> > GPL-COMPATIBLE-P token.  A value of `t' would be necessary f= or creating
> > a reference to the library.
>
> And if the value is not t, then the load will fail?  If so, then = this
> additional argument makes very little sense: you could instead say

It makes as much sense as it makes in C library. The token is basically an<= /div>
agreement between Emacs developers and the user not to load (link) closed
source libraries into Emacs.

> that just by loading the library, the Lisp program which uses
> emacs-ffi "declares" the loaded library to be GPL-compatible= .  And we
> are back where we began.

Yes, you could. It would just completely remove the barrier. However,
the token is an explicit acknowledgment of Emacs policy and license terms, = by
the person who loads the library into Emacs.

> The way we do it when loading modules requires the _loaded_ library to=
> declare itself compatible, by exporting a symbol of a certain name.
> That is an action by the library we load, not by the Lisp program
> which loads it.

True. But as you said yourself, a malicious user can easily cicrumvent it, = even
in C and there is nothing we can do to prevent them other than possibly tak= ing
legal actions against them.

If some company or a state would use Emacs or any other GNU program, as a
front-end to closed-source software, there is very little one can do
technically. It is only the license and the agreement that actually protect= s it.

Fr=E5n: Eli Zaretskii <e= liz@gnu.org>
Skickat: den 14 augusti 2024 17:31
Till: Suhail Singh <suhailsingh247@gmail.com>
Kopia: gerd.moellmann@gmail.com <gerd.moellmann@gmail.com>; ni= colas@n16f.net <nicolas@n16f.net>; arthur.miller@live.com <arthur.= miller@live.com>; emacs-devel@gnu.org <emacs-devel@gnu.org>
=C4mne: Re: as for Calc and the math library
 
> From: Suhail Singh <suhailsingh247@gmail.c= om>
> Cc: Suhail Singh <suhailsingh247@gmail.com>,  gerd.moellman= n@gmail.com,
>  nicolas@n16f.net,  arthur.miller@live.com,  emacs-deve= l@gnu.org
> Date: Wed, 14 Aug 2024 11:08:02 -0400
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> On the topic of what would be acceptable for an FFI, wouldn't= something
> >> akin to what's done for modules be sufficient ?  I.e., h= ave the users of
> >> the interface explicitly state that they are compliant.
> >>
> >> It would scale better than an allow-list.  IIUC, Arthur = mentioned this
> >> in another thread.  If this wouldn't be sufficient for a= n FFI, could you
> >> please elaborate on why that's the case ?
> >
> > What exactly are you suggesting?  IOW, please describe what = you have
> > in mind in more detail, because I don't think I understand it. >
> Specifically, modify the `define-ffi-library' macro that emacs-ffi
> provides.
>
> Presently, it takes two arguments: a SYMBOL and a NAME.  I am pro= posing
> that it be updated to take three arguments: a SYMBOL, a NAME and a
> GPL-COMPATIBLE-P token.  A value of `t' would be necessary for cr= eating
> a reference to the library.

And if the value is not t, then the load will fail?  If so, then this<= br> additional argument makes very little sense: you could instead say
that just by loading the library, the Lisp program which uses
emacs-ffi "declares" the loaded library to be GPL-compatible.&nbs= p; And we
are back where we began.

The way we do it when loading modules requires the _loaded_ library to
declare itself compatible, by exporting a symbol of a certain name.
That is an action by the library we load, not by the Lisp program
which loads it.
--_000_DU2PR02MB10109A727479A59356BA7BCB196802DU2PR02MB10109eu_--