From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,af0c6ea85f3ed92d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.221.4 with SMTP id qa4mr12529667pbc.7.1329813411090; Tue, 21 Feb 2012 00:36:51 -0800 (PST) Path: wr5ni50615pbc.0!nntp.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!newsfeed.x-privat.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Arbitrary Sandbox Date: Tue, 21 Feb 2012 09:36:41 +0100 Organization: cbb software GmbH Message-ID: <1fkgdlidn0v80$.kjvkmk7y29vo$.dlg@40tude.net> References: <2aaee0a4-e820-4a75-bbaf-d9d09c366d2c@f5g2000yqm.googlegroups.com> <4da4bf75-e6c9-4c17-9072-ab6f533ed93f@vd8g2000pbc.googlegroups.com> <203d63cf-42a9-49ef-82cd-943d77b5e438@c21g2000yqi.googlegroups.com> <193cr8xol0ysi.14p4cp2yxnb0r$.dlg@40tude.net> <1jleu301thnd3$.s23priwn3ajb$.dlg@40tude.net> <18o3vqsl9uy2$.a3m68cg8ysro.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-02-21T09:36:41+01:00 List-Id: On Mon, 20 Feb 2012 18:27:10 -0500, Robert A Duff wrote: > "Dmitry A. Kazakov" writes: > >> On Sat, 18 Feb 2012 13:55:48 -0500, Robert A Duff wrote: >> >>> "Dmitry A. Kazakov" writes: >>> >>>> I wonder what kind of architecture could require a safe implementation of >>>> Ada, e.g. when private parts of packages and protected objects would be >>>> mapped onto the memory physically inaccessible from public contexts. >>> >>> The kind of architecture that is overly complicated >>> and grossly inefficient. Imagine a private type with >>> discriminants. The discriminant of each object is visible >>> to clients; other components are not. Or imagine a private >>> extension of a (visible) record extension. What about the >>> fact that some portion (not all) of a child package has >>> visibility on the private part (but not the body) of the >>> parent package? >>> >>> Why do work at run time that can be done at compile time? >> >> Because it cannot (in presence of Unchecked_Conversion and similar stuff). > > If U_C etc. causes trouble, use Java. Or use a subset of Ada that > doesn't allow such features. I really can't imagine a sensible way to > use such features and check them at run time. Of course there is. Do you remember the last time U_C crashed Windows or Linux? >>> Implementing things in hardware doesn't magically make >>> them free. >> >> It makes them incomputable. In a secure environment you wanted certain >> things to become incomputable for non-trusted clients, e.g. reading user >> passwords. > > Sure, but Ada's visibility features (private types and the like) > are not designed for security. Yes, but they could be a good start. (If there were any interest. No need to tell that there is none) > Use other means for that (like protection based on paging). That is low-level and inherently based on pointers. >>> Putting high-level support for higher-level languages in hardware >>> has been tried a number of times, and it's always been a bad idea. >> >> Maybe so. But this is a different case, because memory protection and >> segmentation support is already there. Why no high-level language uses it? > > You mean "already there" in 386/pentium? Languages don't use it because > it's inefficient, and because whatever segmentation can do can be done > better by some combination of software and paging. That was my point. There is a disconnect in the designs of the hardware and higher level languages. You said it must be so. I disagree. There is no other reason for that than the dark ages we are living at. Nobody invests anything in serious language, OS, hardware design. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de