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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,71171f53c22d92b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-14 07:31:13 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!peer01.cox.net!cox.net!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 14 Nov 2003 09:31:11 -0600 Date: Fri, 14 Nov 2003 10:31:09 -0500 From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: C's trikery semantic opens up backdoor in new Linux kernel References: <3FB1A63C.9080200@nowhere.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.34.214.193 X-Trace: sv3-gVts0jLS11jYZXhawZykYF2a5ZyI7Ee1FKP07aySud2imI9nXkid17rbyJtlmE0ffoi1q+NAbq0l/0y!uYabX7G1D1o8DTJ3WCWmUOXq/PNCX0I2p58bcgR4zhLnmgOhCebO0gpLduSKSg== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:2497 Date: 2003-11-14T10:31:09-05:00 List-Id: Craig Carey wrote: > Ada 95 could be enhanced so that specified record fields could be > read-only. Some one could perhaps produce data showing that it is needed > or else it may not appear. No problem in this case, and I have used the particular trick. If a record type has discriminants and contains a limited component, then the only way to change the discriminant is with an aggregate assignment, and you can't do that for a limited type. Note that the type can be non-limited in the (private part and) body of the package that declares it, so you can change the discriminants if necessary. You can also use Unchecked_Conversion, or a call to a C routine with the object passed by reference. Both of these should set off warning flags if you are really worried about covert channels. Where I have used the "trick" however, the goal was to avoid unintentional changes to some values--the discriminants--while allowing changes to others. -- Robert I. Eachus 100% Ada, no bugs--the only way to create software.