asciilifeform: still a bit of a puzzler, who ~voluntarily~ uses the thing. 'why do you have an incense burner in your house?' 'they're required at church' 'yes but...'
asciilifeform: in other lulz, https://archive.is/pbE6V >> 'The user can choose a device number that corresponds to a terminal currently in use by another user. This allows an attacker to run any command allowed by sudo with read and write access to an arbitrary terminal device. ... As before, the bug is specific to Linux systems that have SELinux enabled ...'
asciilifeform: trinque: looked like a generic 'ohnoez ru hackingz' item
asciilifeform: they hire on a very late-sovok 'too dim to know what to steal and where to take it' principle
asciilifeform: this'd be an accurate description of most of the folx in the business, yes
asciilifeform: ( which costs, depending on whom one asks, 5-25k usd )
asciilifeform: this 'sponsor' is expected to cover cost of paperwork
asciilifeform: mircea_popescu: most 'intelligence komyooniti' folx slave for a nominally 'private' org, rather than for usg in the proper sense
asciilifeform: the various hazing rituals, and onerous bureaucracy associated with said cult, are well-documented elsewhere, i will not bother to recount.
asciilifeform: at one time ~million completed (yes) application forms for this, leaked, any enthusiastic entomologist can go, read.
asciilifeform: http://btcbase.org/log/2017-06-06#1666594 << ~anyone, supposing he has a u.s. passport, and 0 official record of judgements against him, can get 'top secret clearance' with corporate sponsorship. the filtration (i.e. who is permitted into any interesting 'compartment') comes ~after~☝︎
asciilifeform: i won't even bother to link to it. who wants -- can find.
asciilifeform: oh, phun phakt, adacore distributes its own mmaptron -- but it is monstrous (easily 25x larger than mine) and largely on account of supporting winblowz
asciilifeform: 'Existing implementations of mmap() return the value -1 when unsuccessful. Since the casting of this value to type void * cannot be guaranteed by the ISO C standard to be distinct from a successful value, this volume of POSIX.1-2008 defines the symbol MAP_FAILED, which a conforming implementation does not return as the result of a successful call.'
asciilifeform: mircea_popescu: if it ever were to change, ~100% of the contents of your box would barf
asciilifeform: ( now that i think about it, we could also obtain the eggog code by invoking a mmap that will be certain to fail, and recording the result. but ugghh... )
asciilifeform: so instead we have this explicit constant.
asciilifeform: note, again, we cannot compare to -1, because we are using a sane language, where '-1' is not a valid address of anything, nor even a valid modular-type
asciilifeform: but it ain't a -1 to us, because we are using a sane language and it is treated ONLY as the addr of the beginning of the allocated mmap. but first gotta check for the failure. so this requires a comparison to FFFFF....[buswidthsize]
asciilifeform: this on all known boxes equals buswidth(0)-1
asciilifeform: ( because unix was dropped as a child, it uses in-band idiocy and magic failure values that are not type-distinguishable from successes )
asciilifeform: mmap is a unixism and returns a null ptr on failure☟︎
asciilifeform: i probably oughta explain why we even have this MAP_FAILED : constant Address := System'To_Address(16#FFFFFFFFFFFFFFFF#);
asciilifeform: ( they are, per standard, equivalent forms, but possibly stock gcc is broken in this particular spot )
asciilifeform: try To_Address instead of System'To_Address
asciilifeform: if a compiler won't eat it -- it's retarded and must die.
asciilifeform: what can i say, the statement is 100% legal per the standard
asciilifeform: mod6 recently ran into exact same issue, but for some reason i can't turn it up in the log
asciilifeform: diana_coman: the example was written on a box with adacore's gnat; the stock gnu one is stricter, doesn't permit Foo'Image -- instead you gotta FooTypeName'Image(Foo)☟︎
asciilifeform: ( though it is not why i made an mmaptron )
asciilifeform: diana_coman: mmaps offer yet another method of glue -- theoretically 2+ processes can simply share it
asciilifeform: diana_coman: gluing in whichever direction, is pretty easy, when you have it all in 1 compiler
asciilifeform: incidentally diana_coman et al might find the paste interesting -- it demonstrates, also, ada/c glue.
asciilifeform: ( makes a 1G mmap, and twiddles a byte therein )
asciilifeform: comes with a small test routine, see horsecocks.adb.