Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch > #31185 > unrolled thread
| Started by | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| First post | 2015-11-24 06:44 -0800 |
| Last post | 2015-11-24 16:39 -0800 |
| Articles | 13 on this page of 53 — 13 participants |
Back to article view | Back to comp.arch
Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-24 06:44 -0800
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-24 06:59 -0800
Re: Fractal Variable-Length Instructions? Ivan Godard <ivan@millcomputing.com> - 2015-11-24 16:42 -0800
Re: Fractal Variable-Length Instructions? mrs@kithrup.com (Mike Stump) - 2015-11-24 22:27 +0000
Re: Fractal Variable-Length Instructions? Terje Mathisen <terje.mathisen@tmsw.no> - 2015-11-25 07:48 +0100
Re: Fractal Variable-Length Instructions? mrs@kithrup.com (Mike Stump) - 2015-11-26 18:21 +0000
Re: Fractal Variable-Length Instructions? MitchAlsup <MitchAlsup@aol.com> - 2015-11-24 15:01 -0800
Re: Fractal Variable-Length Instructions? mrs@kithrup.com (Mike Stump) - 2015-11-24 23:33 +0000
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-24 16:44 -0800
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-27 18:07 -0800
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-27 18:11 -0800
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-12-04 22:56 -0800
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-28 08:30 -0800
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-24 17:35 -0800
Re: Fractal Variable-Length Instructions? Terje Mathisen <terje.mathisen@tmsw.no> - 2015-11-25 08:21 +0100
Re: Fractal Variable-Length Instructions? Ivan Godard <ivan@millcomputing.com> - 2015-11-24 23:31 -0800
Re: Fractal Variable-Length Instructions? Terje Mathisen <terje.mathisen@tmsw.no> - 2015-11-25 08:38 +0100
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-11-25 03:23 -0800
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-25 06:20 -0800
Re: Fractal Variable-Length Instructions? Walter Banks <walter@bytecraft.com> - 2015-11-25 11:50 -0500
Re: Fractal Variable-Length Instructions? Megol <golem960@gmail.com> - 2015-11-25 12:30 -0800
Re: Fractal Variable-Length Instructions? MitchAlsup <MitchAlsup@aol.com> - 2015-11-25 17:53 -0800
Re: Fractal Variable-Length Instructions? George Neuner <gneuner2@comcast.net> - 2015-11-25 20:35 -0500
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-11-26 00:34 -0800
Re: Fractal Variable-Length Instructions? George Neuner <gneuner2@comcast.net> - 2015-11-26 12:53 -0500
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-11-26 10:32 -0800
Re: Fractal Variable-Length Instructions? Stefan Monnier <monnier@iro.umontreal.ca> - 2015-12-01 14:45 -0500
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-01 12:12 -0800
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-05 14:19 +0000
Re: Fractal Variable-Length Instructions? nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-05 14:56 +0000
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-05 16:48 +0000
Re: Fractal Variable-Length Instructions? nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-05 17:38 +0000
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-06 15:21 +0000
Re: Fractal Variable-Length Instructions? nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-06 16:43 +0000
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-08 13:55 +0000
Re: Fractal Variable-Length Instructions? Chris Gray <cg@GraySage.COM> - 2015-12-05 11:05 -0700
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-06 14:04 +0000
Re: Fractal Variable-Length Instructions? Chris Gray <cg@GraySage.COM> - 2015-12-06 11:09 -0700
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-06 09:15 -0800
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-08 13:43 +0000
Re: Fractal Variable-Length Instructions? nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-08 14:01 +0000
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-08 16:57 +0000
Re: Fractal Variable-Length Instructions? nmm@wheeler.UUCP (Nick Maclaren) - 2015-12-08 18:02 +0000
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-08 06:11 -0800
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-08 16:08 +0000
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-12-08 10:43 -0800
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-12 17:06 +0000
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-08 11:29 -0800
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-12 18:10 +0000
Re: Fractal Variable-Length Instructions? Bruce Hoult <bruce.hoult@gmail.com> - 2015-12-12 15:00 -0800
Re: Fractal Variable-Length Instructions? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-12-13 16:12 +0000
Re: Fractal Variable-Length Instructions? George Neuner <gneuner2@comcast.net> - 2015-12-01 21:27 -0500
Re: Fractal Variable-Length Instructions? Quadibloc <jsavard@ecn.ab.ca> - 2015-11-24 16:39 -0800
Page 3 of 3 — ← Prev page 1 2 [3]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2015-12-08 14:01 +0000 |
| Message-ID | <n46ns6$3n2$1@dont-email.me> |
| In reply to | #31594 |
In article <2015Dec8.144301@mips.complang.tuwien.ac.at>, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote: >Bruce Hoult <bruce.hoult@gmail.com> writes: >> >>I'd say that on most OSes now your application's code is not writable, and = >>your stack and malloc()'d memory is not executable. >> >>Of course usually the application can call mprotect() explicitly to change = >>this, > >Or the application can allocate the memory with the desired >permissions to begin with. In either case, the OS allows having pages >writable and executable at the same time. > >>but an attacker can't call mprotect() to do this because they can't i= >>nject code to do it in the first place. > >Injecting code is unnecessary, the code is already there. Sigh. As I have said already, I have tried searching executables for such code, and had a very low success rate. Not merely do you need something that will perform the relevant action, you need it to then transfer control to some code that you can use, and not corrupt the registers etc. too badly to allow further execution. Causing chaos, denial of service etc. is easy, but getting any direct benefit out of a security breach is much harder. And forbidding the write+executable combination blocks one of the most useful tools that hackers use to do the latter. Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-12-08 16:57 +0000 |
| Message-ID | <2015Dec8.175741@mips.complang.tuwien.ac.at> |
| In reply to | #31598 |
nmm@wheeler.UUCP (Nick Maclaren) writes: >Sigh. As I have said already, I have tried searching executables for >such code, and had a very low success rate. And others have tried it and found Touring-complete sets of gadgets in libc alone <http://cseweb.ucsd.edu/~hovav/dist/blackhat08.pdf>. But let's enforce iOS-like W^X so that Nick Maclaren has a more difficult time breaking into programs. Or maybe we should also be worried about other attackers. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | nmm@wheeler.UUCP (Nick Maclaren) |
|---|---|
| Date | 2015-12-08 18:02 +0000 |
| Message-ID | <n475vv$sk6$1@dont-email.me> |
| In reply to | #31617 |
In article <2015Dec8.175741@mips.complang.tuwien.ac.at>, Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote: >nmm@wheeler.UUCP (Nick Maclaren) writes: >>Sigh. As I have said already, I have tried searching executables for >>such code, and had a very low success rate. > >And others have tried it and found Touring-complete sets of gadgets in >libc alone <http://cseweb.ucsd.edu/~hovav/dist/blackhat08.pdf>. But >let's enforce iOS-like W^X so that Nick Maclaren has a more difficult >time breaking into programs. Or maybe we should also be worried about >other attackers. Yeah. And Brainfuck is a practical programming language because it is Turing-complete. The more complicated an attack becomes, the fewer people who can mount it successfully, the more precisely you need to know the detailed configuration of the target, the more likely it is to fail because of unforeseen circumstances, the easier it is to detect, and the easier it is to get a conviction. Remember that every failed attack warns the opponent that he is under threat, and provides the risk of detection, and the mere possession of such a compiler makes prosecution easy in many jurisdictions. That is all standard knowledge in the security community, both IT and military. And that paper is misleading, too, because reasonable defences against such attacks have been known since the 1970s to those of us With Clue. They aren't used much today, but that wouldn't stop them being used again, if enough attackers started using the techniques. Regards, Nick Maclaren.
[toc] | [prev] | [next] | [standalone]
| From | Bruce Hoult <bruce.hoult@gmail.com> |
|---|---|
| Date | 2015-12-08 06:11 -0800 |
| Message-ID | <47675b7d-fb17-4412-84ec-b0e48cc3ab73@googlegroups.com> |
| In reply to | #31594 |
On Tuesday, December 8, 2015 at 4:48:32 PM UTC+3, Anton Ertl wrote: > >iOS is an extremely widespread OS that simply won't allow normal applicatio= > >ns to have pages both writable and executable, and in fact it won't even le= > >t you use mprotect() to change memory to executable. > > One OS is not "a lot", as you claimed. And the reason for iOS is > probably due to the business model, but it's always good if you can > feed people other explanations, and they swallow it. I have never claimed that one OS is a lot. One OS completely prevents you from making memory both writable and executable, or converting between the two. MANY other OSes now give programs memory that is either writable (stack, heap) or executable (program code) but not both. Programs that deliberately set out to can still allocate memory that is both writable and executable, or convert between them. This is probably a very small minority of programs, limited mostly to JIT programming language implementations, possibly including compiling regexps or the like too. I'm baffled why you choose to twist my words into the worst possible interpretation, tell me things that I already know, and do it all in a very antagonistic way. This is an informal discussion group, not a peer reviewed journal.
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-12-08 16:08 +0000 |
| Message-ID | <2015Dec8.170828@mips.complang.tuwien.ac.at> |
| In reply to | #31599 |
Bruce Hoult <bruce.hoult@gmail.com> writes: >On Tuesday, December 8, 2015 at 4:48:32 PM UTC+3, Anton Ertl wrote: >> >iOS is an extremely widespread OS that simply won't allow normal applica= >tio=3D >> >ns to have pages both writable and executable, and in fact it won't even= > le=3D >> >t you use mprotect() to change memory to executable. >>=20 >> One OS is not "a lot", as you claimed. And the reason for iOS is >> probably due to the business model, but it's always good if you can >> feed people other explanations, and they swallow it. > >I have never claimed that one OS is a lot. Your claim was: |a lot of OSes now don't want the same memory to be both writable and |executable at the same time. >One OS completely prevents you from making memory both writable and executa= >ble, or converting between the two. > >MANY other OSes now give programs memory that is either writable (stack, he= >ap) or executable (program code) but not both. > >Programs that deliberately set out to can still allocate memory that is bot= >h writable and executable Right, and I have not noticed any sign of the OS not "want"ing to do that. >I'm baffled why you choose to twist my words into the worst possible interp= >retation, I interpreted your words in the way that was obvious to me, and I expect that many others interpret them the same way. If an OS does not want me to write to a file or something, I get something like "Permission denied" or "Operation not permitted", and the operation is not performed. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| Date | 2015-12-08 10:43 -0800 |
| Message-ID | <b478a6df-afd9-4ead-b5a0-e45b109ceda9@googlegroups.com> |
| In reply to | #31615 |
On Tuesday, December 8, 2015 at 9:26:46 AM UTC-7, Anton Ertl wrote: > Right, and I have not noticed any sign of the OS not "want"ing to do > that. Oh, you're complaining about anthropomorphisms now. Rather than admitting he is right, and if you have to call mprotect() because storage is, by default, not writeable and executable at the same time, it means that *the guys who wrote the OS* considered self-modifying code either bad practice or a security hole or both - you're basically saying that if the OS has an mprotect() call, it's obviously easy. This is not the kind of argumentative tactic that wins respect. John Savard
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-12-12 17:06 +0000 |
| Message-ID | <2015Dec12.180623@mips.complang.tuwien.ac.at> |
| In reply to | #31630 |
Quadibloc <jsavard@ecn.ab.ca> writes: >On Tuesday, December 8, 2015 at 9:26:46 AM UTC-7, Anton Ertl wrote: > >> Right, and I have not noticed any sign of the OS not "want"ing to do >> that. > >Oh, you're complaining about anthropomorphisms now. Not particularly. But if he is using imprecise and suggestive language, he should not complain about my taking his language in the way it suggests itself. > Rather than admitting he is >right, and if you have to call mprotect() because storage is, by default, not >writeable and executable at the same time, it means that *the guys who wrote >the OS* considered self-modifying code either bad practice or a security hole >or both - you're basically saying that if the OS has an mprotect() call, it's >obviously easy. So you are interpreting his language in the way he suggested. The primary memory allocation mechanism of a modern Unix is the mmap() system call, and it has no default for the protections/permissions; you have to specify explicitly what protections/permissions you want. Specifying PROT_READ|PROT_WRITE|PROT_EXEC is not any more difficult than specifying just PROT_READ|PROT_WRITE (well, it's a little more to type). I don't have to call mprotect() to make anything executable, and Gforth does not do so (it only uses mprotect() to remove permissions). There is a C library function called malloc(), and modern implementations of malloc() call mmap() with PROT_READ|PROT_WRITE, without PROT_EXEC? Why? Because in C you normally don't execute code from malloc()ed memory, and not making it executable breaks some attacks, and those programmers who need executable memory can still use mmap() directly (and of course, the C library programmers might also maintain the beliefs that you ascribe to "*the guys who wrote the OS*"; there's little in their position that would correct such beliefs). But the malloc() is just a C library function, designed for C programmers; it's not the "OS default". And while it's likely that malloc()ed memory was allocated with mmap() and can therefore be mprotect()ed, I don't think that this is guaranteed. I am cautious and only mprotect() memory that I have mmap()ed, not malloc()ed memory. And if I mmap() anyway, I use the permissions I need from the start. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | Bruce Hoult <bruce.hoult@gmail.com> |
|---|---|
| Date | 2015-12-08 11:29 -0800 |
| Message-ID | <ac3f1ba2-095d-40c8-a70e-1176df2e230f@googlegroups.com> |
| In reply to | #31615 |
On Tuesday, December 8, 2015 at 7:26:46 PM UTC+3, Anton Ertl wrote: > I interpreted your words in the way that was obvious to me, and I > expect that many others interpret them the same way. If an OS does > not want me to write to a file or something, I get something like > "Permission denied" or "Operation not permitted", and the operation is > not performed. Indeed so. But if the OS has a chmod(2) or similar then, by your own argument, it is in fact doing nothing to stop you performing that operation.
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-12-12 18:10 +0000 |
| Message-ID | <2015Dec12.191007@mips.complang.tuwien.ac.at> |
| In reply to | #31636 |
Bruce Hoult <bruce.hoult@gmail.com> writes: >On Tuesday, December 8, 2015 at 7:26:46 PM UTC+3, Anton Ertl wrote: >> I interpreted your words in the way that was obvious to me, and I >> expect that many others interpret them the same way. If an OS does >> not want me to write to a file or something, I get something like >> "Permission denied" or "Operation not permitted", and the operation is >> not performed. > >Indeed so. But if the OS has a chmod(2) or similar then, by your own argument, it is in fact doing nothing to stop you performing that operation. Let's see: [~:84617] echo >/etc/shadow bash: /etc/shadow: Permission denied [~:84618] chmod +w /etc/shadow chmod: changing permissions of `/etc/shadow': Operation not permitted [~:84619] echo >/etc/shadow bash: /etc/shadow: Permission denied Actually, there is something that stops me from performing the operation. I guess the OS really does not want ordinary users to change /etc/shadow. - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | Bruce Hoult <bruce.hoult@gmail.com> |
|---|---|
| Date | 2015-12-12 15:00 -0800 |
| Message-ID | <7870f720-05fc-4444-b371-22dca76df7f5@googlegroups.com> |
| In reply to | #31769 |
On Saturday, December 12, 2015 at 9:12:21 PM UTC+3, Anton Ertl wrote: > Bruce Hoult <bruce.hoult@gmail.com> writes: > >On Tuesday, December 8, 2015 at 7:26:46 PM UTC+3, Anton Ertl wrote: > >> I interpreted your words in the way that was obvious to me, and I > >> expect that many others interpret them the same way. If an OS does > >> not want me to write to a file or something, I get something like > >> "Permission denied" or "Operation not permitted", and the operation is > >> not performed. > > > >Indeed so. But if the OS has a chmod(2) or similar then, by your own argument, it is in fact doing nothing to stop you performing that operation. > > Let's see: > > [~:84617] echo >/etc/shadow > bash: /etc/shadow: Permission denied > [~:84618] chmod +w /etc/shadow > chmod: changing permissions of `/etc/shadow': Operation not permitted > [~:84619] echo >/etc/shadow > bash: /etc/shadow: Permission denied > > Actually, there is something that stops me from performing the > operation. I guess the OS really does not want ordinary users to > change /etc/shadow. > > - anton > -- > M. Anton Ertl Some things have to be seen to be believed > anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen > http://www.complang.tuwien.ac.at/anton/home.html With mprotect() you are arguing that you can do what you want with memory you have mmap()'d yourself, while I am saying that the system can give you memory that you can't mprotect() on. With chmod() you are arguing that the system can give you a file that you can't chmod(). Thank you for arguing my side for me.
[toc] | [prev] | [next] | [standalone]
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Date | 2015-12-13 16:12 +0000 |
| Message-ID | <2015Dec13.171253@mips.complang.tuwien.ac.at> |
| In reply to | #31777 |
Bruce Hoult <bruce.hoult@gmail.com> writes: >On Saturday, December 12, 2015 at 9:12:21 PM UTC+3, Anton Ertl wrote: >> Bruce Hoult <bruce.hoult@gmail.com> writes: >> >On Tuesday, December 8, 2015 at 7:26:46 PM UTC+3, Anton Ertl wrote: >> >> I interpreted your words in the way that was obvious to me, and I >> >> expect that many others interpret them the same way. If an OS does >> >> not want me to write to a file or something, I get something like >> >> "Permission denied" or "Operation not permitted", and the operation is >> >> not performed. >> > >> >Indeed so. But if the OS has a chmod(2) or similar then, by your own argument, it is in fact doing nothing to stop you performing that operation. >> >> Let's see: >> >> [~:84617] echo >/etc/shadow >> bash: /etc/shadow: Permission denied >> [~:84618] chmod +w /etc/shadow >> chmod: changing permissions of `/etc/shadow': Operation not permitted >> [~:84619] echo >/etc/shadow >> bash: /etc/shadow: Permission denied >> >> Actually, there is something that stops me from performing the >> operation. I guess the OS really does not want ordinary users to >> change /etc/shadow. >> >> - anton >> -- >> M. Anton Ertl Some things have to be seen to be believed >> anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen >> http://www.complang.tuwien.ac.at/anton/home.html > >With mprotect() you are arguing that you can do what you want with memory you have mmap()'d yourself, while I am saying that the system can give you memory that you can't mprotect() on. > >With chmod() you are arguing that the system can give you a file that you can't chmod(). > >Thank you for arguing my side for me. Your claim was: |a lot of OSes now don't want the same memory to be both writable and |executable at the same time. It may or may not be true that one can allocate memory in a way that one cannot use mprotect() on, but that does not support your claim in the least. As mentioned, it is not necessary to call mprotect() to get writable and executable memory, calling mmap with PROT_WRITE|PROT_EXEC is sufficient. Looking at it in another way, would you consider the example of not being able to write to /etc/shadow as example that "a lot of OSs now don't want files to be writable"? - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html
[toc] | [prev] | [next] | [standalone]
| From | George Neuner <gneuner2@comcast.net> |
|---|---|
| Date | 2015-12-01 21:27 -0500 |
| Message-ID | <43ls5blgem2dsmc5k1si577siun6nbfjck@4ax.com> |
| In reply to | #31344 |
On Tue, 01 Dec 2015 14:45:24 -0500, Stefan Monnier <monnier@iro.umontreal.ca> wrote: >> If you're embedding some object reference into JIT code then you by >> definition already have a pointer to that object elsewhere. It's trivial to >> ensure a copy of that pointer hangs around -- usually it's going to >> happen anyway. > >Keeping an extra reference somewhere else can be a good solution, but it >may be inconvenient to do it right if you want to handle the case where >the code gets GC'd. >And of course, it's no solution to the problem where the GC wants to >*move* the object. Exactly. And if the object is a closure preallocated by the compiler as the code is generated, the compiler's copy of the pointer goes away when it's done. Then the pointer is in one of 3 places: - immediate data in the compiled function - immediate data in code which calls the compiled function or - data in a "wide" pointer referencing the closure function In any of these cases, that pointer may be the only remaining reference to the heap closure object. George
[toc] | [prev] | [next] | [standalone]
| From | Quadibloc <jsavard@ecn.ab.ca> |
|---|---|
| Date | 2015-11-24 16:39 -0800 |
| Message-ID | <cc717a6a-cac7-4399-b36f-e06cdd13cfff@googlegroups.com> |
| In reply to | #31185 |
On Tuesday, November 24, 2015 at 7:44:46 AM UTC-7, Quadibloc wrote: > Such a special block of 64-bit instructions, including instructions with > immediate operands, could not contain any branch targets, nor could the block > of 32-bit instructions following it. That is not correct, as a block of normal instructions, with warning bits normally indicating 64-bit instructions, can only have 32-bit instructions after the last 64-bit instructions as branch targets. So when branching is done, the previous block is not read, the warning bits are assumed to be zero. So wrong warning bits in the block of 64-bit instructions will not interfere with the assumption, which in this case would be fully correct. So any 32-bit instruction in that block may be a branch target. John Savard
[toc] | [prev] | [standalone]
Page 3 of 3 — ← Prev page 1 2 [3]
Back to top | Article view | comp.arch
csiph-web