Poster | Thread |
Trev
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 15-Apr-2009 23:15:12
| | [ #181 ] |
|
|
|
Cult Member |
Joined: 24-Jul-2005 Posts: 778
From: Sacramento, CA, USA | | |
|
| @itix
Which means every application developer must dictacte a unique naming standard, e.g. MyMessengerPlugin_Email.library and MyBrowserPlugin_Email.library. :-/ It's a pain, as you pointed out. _________________ Sam440ep-flex 733 MHz/1 GB RAM/Radeon 9250/AmigaOS4.1 Update 2 borked A1200/Blizzard1260+SCSI-IV/Z4+MediatorZIV/Deneb/Voodoo3/CatweaselMk3 more borked A1200/MBX1200z/Indivision A500/clockport/RRNet A600/A603 |
|
Status: Offline |
|
|
COBRA
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 15-Apr-2009 23:23:32
| | [ #182 ] |
|
|
|
Super Member |
Joined: 26-Apr-2004 Posts: 1809
From: Auckland, New Zealand | | |
|
| @bernd_afa
Quote:
nothing is easier than that on 68k system too.use mmu.library, protect the adress space of the jump tables with MMU. |
First of all you could only protect the whole jump table that way, not individual library functions, secondly, if third party libraries can use mmu.library to protect their jumptables, then a virus could use mmu.library to unprotect them...
Quote:
sure you can say this feature is in RKM only for freevec in.but what should OS4 be. a strip down AOS that support only features that are in the rkm written 1990 ? |
I don't understand what you're talking about, if the description of the function in the autodoc says you are allowed to pass a null pointer to a function and it will quietly return in that case, then you can rely on this functionality, if it doesn't say that, then you can't rely on it, if you do, then the program you have written is buggy, and you should fix your program, as simple as that.
But just for fun I tried a simple test program here on OS4. I tried calling FreeVec(), FreeMem() as well as the clib function free(), passing a null pointer as the memory address, and I got no GrimReaper in any case, so what are you talking about? |
|
Status: Offline |
|
|
COBRA
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 15-Apr-2009 23:31:20
| | [ #183 ] |
|
|
|
Super Member |
Joined: 26-Apr-2004 Posts: 1809
From: Auckland, New Zealand | | |
|
| @itix
Quote:
Of course library names must be unique. You can not have two plugins with the same name but different interfaces. |
Actually it could happen very easily. Plugins are usually stored in a directory, and programs using plugins will probably scan through the directory, opening each plugin, and trying to call some initialization function of the plugin, or some function which queries information about the plugin. If the user copies a plugin from another program there by accident, or even just a library, it would be opened and the program would try to call a function of the library which may not exist, or require totally different parameters, so all hell will break loose. The interface system prevents that because the program can use a unique interface name (e.g. "foobar_plugin"). You could also use a unique file name (e.g. whatever.foobarplugin) and filter the loaded plugins according to file names, but it's not as simple and elegant. |
|
Status: Offline |
|
|
itix
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 6:58:59
| | [ #184 ] |
|
|
|
Elite Member |
Joined: 22-Dec-2004 Posts: 3398
From: Freedom world | | |
|
| @COBRA
Quote:
If the user copies a plugin from another program there by accident, or even just a library, it would be opened and the program would try to call a function of the library which may not exist, or require totally different parameters, so all hell will break loose.
|
Sure. But there have been AmiAMP plugins, ANR plugins, MUI custom class modules, device drivers, BOOPSI classes and many more where user could mess up his installation and yet I havent seen it happening. But t does not hurt if extra protection can be added without cost, of course.Last edited by itix on 16-Apr-2009 at 07:06 AM.
_________________ Amiga Developer Amiga 500, Efika, Mac Mini and PowerBook |
|
Status: Offline |
|
|
COBRA
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 8:04:00
| | [ #185 ] |
|
|
|
Super Member |
Joined: 26-Apr-2004 Posts: 1809
From: Auckland, New Zealand | | |
|
| @itix
Well, for an example I have seen people copy avcodec.library into libs:avcodecs/ which is a directory specifically for plugins. Never underestimate the creativity of the user |
|
Status: Offline |
|
|
bernd_afa
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 9:16:34
| | [ #186 ] |
|
|
|
Cult Member |
Joined: 14-Apr-2006 Posts: 829
From: Unknown | | |
|
| @COBRA
wy my posts ontopic about API i explain now.
To write a memprotect OS, there is need knowledge about Security technic.This need much brain knowledge.I dont believe that Hyperion this knowledge have.This can see if take a look about OS4 internals if its core is secure.for example not every program can access MMU tables with OS funcs or with PPC registers.
I think all programmers know it is much more easy to port a system to another CPU as write a API that is secure and do memory protect.
I like know if this feature can use NOW without the need of OS4 update from Hyperion.
Is there a protect OS4 library here ? I read ssl library can protect.this i understand it is possible but i dont read that it is done.
also i get no answer if there are two libraries on OS4 with same name but diffrent versions and all work well.what are this libraries ?
>First of all you could only protect the whole jump table that way, not individual >library functions, secondly, if third party libraries can use mmu.library to protect >their jumptables, then a virus could use mmu.library to unprotect them...
How can this work on OS4 ?.OS4 use ppc cpu and PPC CPu support as all other CPU 4 kb MMU page.
when you say mmulib can use to unprotect that on 68k, you are right and thats the reason wy it make no sense to spend work on it.there is more important need.
But i think in OS4 are too functions that the MMU tables can set and unprotect lib.if there are no functions, it is also possible to access in asm the MMU registers of the PPC in OS4 or not ?.here can do all.
that what you get as iexec pointer is a table with adresses to functions.in asm it is
iexec func1 dc.l func1_code func2 dc.l func2_code
when a program call with IExec->func2, then address of func 2 is read and it jump to it.
in old lib system its near same, there is a functiontable and the Library open return the pointer to it.If the openlibrary create for every diffrent libnum a own functable and code, is also possdible.
func1 jmp func1_code func2 jmp func2_code
You see there is code in jumptable and this is on a system as OS4 not usefull(because 68k and PPC) .
But there are the lpt Compiler macros.this allow same fast call as OS4 interface system but need no unhandy libname->........
So i dont see a reason wy need write IExec->Allocmem
both is same both use tables with pointers to functions.
>Well, for an example I have seen people copy avcodec.library into libs:avcodecs/ >which is a directory specifically for plugins. Never underestimate the creativity of >the user
i think more the creativity of coders to code unclean.I think a avcodec.library should be written to be available for all users or if it is not, then change the name that it is clear that this lib is not a real avcodec.library.
when a user copy your avcodec.linbrary over the OS4 system avcodec library, then he wonder wy other programs not work. Last edited by bernd_afa on 16-Apr-2009 at 09:20 AM. Last edited by bernd_afa on 16-Apr-2009 at 09:16 AM.
|
|
Status: Offline |
|
|
abalaban
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 10:27:01
| | [ #187 ] |
|
|
|
Super Member |
Joined: 1-Oct-2004 Posts: 1114
From: France | | |
|
| @bernd_afa
Quote:
>Well, for an example I have seen people copy avcodec.library into libs:avcodecs/ >which is a directory specifically for plugins. Never underestimate the creativity of >the user
i think more the creativity of coders to code unclean.I think a avcodec.library should be written to be available for all users or if it is not, then change the name that it is clear that this lib is not a real avcodec.library.
when a user copy your avcodec.linbrary over the OS4 system avcodec library, then he wonder wy other programs not work. |
Again you are showing us that you don't have -- even a tiny -- clue about what you are writing ! Please stay on topics you have knowledge and don't speak about AOS 4 that you have never used (and perhaps never even saw running) !
avcodec.library is a standard shared library, but it supports addition of codecs, those codecs should be put in the drawer LIBS:avcodecs/ and are nammed xxx.codec to avoid confusion with standard libraries. I don't see unclean code there, do you ?
And you are right when a user pastes a picture in Word, saves it (as mypic.doc for example), replaces the extension .doc by a .jpg (mypic.doc->mypic.jpg) and then complains about not being able to open his picture in his favourite paint program it is "coders' creativty to code unclean" !! _________________ AOS 4.1 : I dream it, Hyperion did it ! Now dreaming AOS 4.2... Thank you to all devs involved for this great job ! |
|
Status: Offline |
|
|
NutsAboutAmiga
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 11:02:28
| | [ #188 ] |
|
|
|
Elite Member |
Joined: 9-Jun-2004 Posts: 12835
From: Norway | | |
|
| @bernd_afa
Quote:
that what you get as iexec pointer is a table with adresses to functions.in asm it is
iexec func1 dc.l func1_code func2 dc.l func2_code
when a program call with IExec->func2, then address of func 2 is read and it jump to it.
in old lib system its near same, there is a functiontable and the Library open return the pointer to it.If the openlibrary create for every diffrent libnum a own functable and code, is also possdible.
func1 jmp func1_code func2 jmp func2_code
You see there is code in jumptable and this is on a system as OS4 not usefull(because 68k and PPC) . But there are the lpt Compiler macros.this allow same fast call as OS4 interface system but need no unhandy libname->........
|
Well you are forgetting one thing under OS4 you have func1_code_68k and func1_code_ppc, its not possible to put this tow in the same table. One more thing I repeat over and over that you don’t get is that iexec is just one version of exec function table; os4 can have more then one, for future changes.
Declaration Iexce interface name “main” version 1 Declaration Iexce interface name “main” version 2 Declaration immu interface name “mmu” version 1
_________________ http://lifeofliveforit.blogspot.no/ Facebook::LiveForIt Software for AmigaOS |
|
Status: Offline |
|
|
COBRA
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 13:00:34
| | [ #189 ] |
|
|
|
Super Member |
Joined: 26-Apr-2004 Posts: 1809
From: Auckland, New Zealand | | |
|
| @bernd_afa
Quote:
To write a memprotect OS, there is need knowledge about Security technic.This need much brain knowledge.I dont believe that Hyperion this knowledge have.This can see if take a look about OS4 internals |
No offense meant, but I think it's quite clear by now that you don't have the slightest clue about OS4 internals.
I'll try to explain a bit differently because you seem to be completely lost when it comes to how library interfaces work on OS4. There is no common jumptable like for 3.x. Each application/task gets the interface via a GetInterface() call. This gives the particular task a local copy of the interface, through which it can call the functions. So if a virus used GetInterface() to get access to the interface, it will only receive a copy, and if it tries to modify the vectors in it, it will not have any effect on other applications, which will be working with their own copy of the interface vectors. This way individual interface functions can be protected at an API level. The OS can protect the global interface vectors by mapping it as read-only (and only the kernel has write access), and if a program tries to patch a function which is protected against it, the OS will simply not allow it. |
|
Status: Offline |
|
|
HKvalhe
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 14:05:25
| | [ #190 ] |
|
|
|
Regular Member |
Joined: 2-Apr-2009 Posts: 483
From: Norway | | |
|
| @ChrisH
The new API could either be a completely new look and feel of the Workbench in AmigaOS 4.1, giving it a more modern, improving look and feel. It's possible..
Other things we might be aware of are OpenGL and Java-support. I think we are going through the biggest makeover-changes of the AmigaOS this year, and it keeps getting better and better! _________________ Probably Pegasos 2 G4 1Ghz 1GB DDR-system, ATI Radeon 9250, ESI@Juli PCi-soundcard, all running AmigaOS 4.1 with latest updates, or a new powerful Amiga! Fingers crossed! |
|
Status: Offline |
|
|
bernd_afa
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 15:34:27
| | [ #191 ] |
|
|
|
Cult Member |
Joined: 14-Apr-2006 Posts: 829
From: Unknown | | |
|
| @Cobra
>But just for fun I tried a simple test program here on OS4. I tried calling FreeVec(), >FreeMem() as well as the clib function free(), passing a null pointer as the memory >address, and I got no GrimReaper in any case, so what are you talking about?
Have you test DeletePool too ?
ok, then it seem change, i get in past amiblitz working for OS4 , and i find places with that code.I also get on amiblitz the graphical source level debugger working on OS4, so here come my knowledge about OS4.its more praxis relatet, get a grim reaper from user and see what problem is.in past there are many OS4 bugs see(for example do a rectfill with 1 pxiel size do not work if there is no rastport.But i cant tell if that is all valid in OS4.1
amiblitz run since 2005 on OS4, so later i have no praxis knowledge about OS4, thats reason i write as far i know.
but wy some OS4 user write much text and want explain that it is not usefull, i dont understand, a short sentence it work in 4.1 was enough and i know more.
>gives the particular task a local copy of the interface, through which it can call the >functions.
ah ok, this is same done in bsdsocket.library on 68k, so no reason to write Ixec->
this is also no big problem in old library calling convention to copy the jump table on a create task.
maybe you need look in the asm code that gcc produce for a AOS4 program or 68k code with a asm debugger
If you call AllocMem on 68k or IExec->AllocMem on PPC give same code.
in Short.
A functionaddress is read from a table, and the program jump to a function that is in this table.
So what come out at the end is near same. and thats the reason i think because no other OS use this IExec-> syntax offical and Hyperion mess is not add offical in GCC.Only 68k amigaos is offical in GCC and new compilers can build easy For OS4 must always add old code in newer compilers again and hope it work
http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00329.html Last edited by bernd_afa on 16-Apr-2009 at 03:41 PM. Last edited by bernd_afa on 16-Apr-2009 at 03:39 PM. Last edited by bernd_afa on 16-Apr-2009 at 03:35 PM.
|
|
Status: Offline |
|
|
ShadowSun
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 16:00:38
| | [ #192 ] |
|
|
|
Member |
Joined: 26-Feb-2009 Posts: 77
From: Unknown | | |
|
| : The most ambitious project : integrate usb 2.0 support in AmigaOS4 (we have SAM computers to use it)
Last edited by ShadowSun on 16-Apr-2009 at 04:01 PM.
|
|
Status: Offline |
|
|
itix
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 16:54:20
| | [ #193 ] |
|
|
|
Elite Member |
Joined: 22-Dec-2004 Posts: 3398
From: Freedom world | | |
|
| @COBRA
Quote:
The OS can protect the global interface vectors by mapping it as read-only (and only the kernel has write access), and if a program tries to patch a function which is protected against it, the OS will simply not allow it.
|
You mean __library interface? I would just clone it and replace ILibrary pointer with my own copy. You can even replace all original copies of interfaces.
_________________ Amiga Developer Amiga 500, Efika, Mac Mini and PowerBook |
|
Status: Offline |
|
|
xeron
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 18:41:09
| | [ #194 ] |
|
|
|
Elite Member |
Joined: 22-Jun-2003 Posts: 2440
From: Weston-Super-Mare, Somerset, England, UK, Europe, Earth, The Milky Way, The Universe | | |
|
| @bernd_afa
Quote:
ah ok, this is same done in bsdsocket.library on 68k, so no reason to write Ixec->
|
Yes, bsdsocket.library creates a library base instance unique to the opening task. This places the decision on the library writer. With OS4 libraries, I can decide if I need per-thread instances of libraries or not. The library writer can still have global data if needed.
Sure, similar things can be done without having the OS4 library interface scheme, but that doesn't change the fact that the OS4 library interface scheme does provide some advantages conveniently and usefully, and I as an OS4 developer am quite glad to have them.
Quote:
and thats the reason i think because no other OS use this IExec-> syntax offical and Hyperion mess
|
There is no need to use derogatory terms like 'mess'. Its quite rude.
_________________ Playstation Network ID: xeron6 |
|
Status: Offline |
|
|
bernd_afa
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 19:21:24
| | [ #195 ] |
|
|
|
Cult Member |
Joined: 14-Apr-2006 Posts: 829
From: Unknown | | |
|
| @xeron
>This places the decision on the library writer.
of course currently.but it is also possible that the code is add in the openlibrary function that automatic create a copy of a function table.
maybe somebody write a patch for openlibrary, it can work on MOS AROS and 68k so behavios is simular to OS4, if that is so a important feature.
>There is no need to use derogatory terms like 'mess'. Its quite rude.
for a compiler it is a mess.peephole optimizer work as this, they search for a code sequence and if find them they optimize it.
and i think nobody from gcc team optimize the peephole optimizer that way, that calls of -> are recognize and dont break the peephole sequence Last edited by bernd_afa on 16-Apr-2009 at 07:26 PM. Last edited by bernd_afa on 16-Apr-2009 at 07:25 PM.
|
|
Status: Offline |
|
|
Trev
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 19:25:22
| | [ #196 ] |
|
|
|
Cult Member |
Joined: 24-Jul-2005 Posts: 778
From: Sacramento, CA, USA | | |
|
| @xeron
I think you guys are too hard on Bernd. English obviously isn't his first language, so you have no idea what he actually intended to say when he chose the word "mess." It's difficult enough to convey inflection when English is your first language.
Barring language differences, everyone seems to be ignoring the fact that Bernd is a developer, discussing his difficulties with OS4's APIs. Though sometimes confusing to read, his views are still valid, as are everyone else's. _________________ Sam440ep-flex 733 MHz/1 GB RAM/Radeon 9250/AmigaOS4.1 Update 2 borked A1200/Blizzard1260+SCSI-IV/Z4+MediatorZIV/Deneb/Voodoo3/CatweaselMk3 more borked A1200/MBX1200z/Indivision A500/clockport/RRNet A600/A603 |
|
Status: Offline |
|
|
bernd_afa
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 19:29:29
| | [ #197 ] |
|
|
|
Cult Member |
Joined: 14-Apr-2006 Posts: 829
From: Unknown | | |
|
| |
Status: Offline |
|
|
xeron
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 20:32:04
| | [ #198 ] |
|
|
|
Elite Member |
Joined: 22-Jun-2003 Posts: 2440
From: Weston-Super-Mare, Somerset, England, UK, Europe, Earth, The Milky Way, The Universe | | |
|
| @bernd_afa
OK, well, then I strongly disagree with your opinion that it is a mess.
I also don't see what MOS or 68k has to do with the OS4 teams design decisions. I also don't understand what point you're trying to make when you say that some of OS4's features could be sort-of copied with some kind of bodge patched onto OS3.x. So what? _________________ Playstation Network ID: xeron6 |
|
Status: Offline |
|
|
Trev
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 21:47:01
| | [ #199 ] |
|
|
|
Cult Member |
Joined: 24-Jul-2005 Posts: 778
From: Sacramento, CA, USA | | |
|
| @bernd_afa
Quote:
and i think nobody from gcc team optimize the peephole optimizer that way, that calls of -> are recognize and dont break the peephole sequence
|
Is that really true? If x is a function pointer, and y->z is a function pointer, the optimizer is going to know that. Are you referring to overhead of dereferencing the first pointer, e.g. y->, causing the optimizer to misinterpret the code sequence as something other than a function call?
I don't have any experience in this area, so I'm not sure what the impact would be, but it should be possible to have different APIs at the C level that still translate into the same ABI at the assembly level for the purposes of optimization. If there are changes in the ABI that Hyperion hasn't accounted for in the optimizer, then I see your point._________________ Sam440ep-flex 733 MHz/1 GB RAM/Radeon 9250/AmigaOS4.1 Update 2 borked A1200/Blizzard1260+SCSI-IV/Z4+MediatorZIV/Deneb/Voodoo3/CatweaselMk3 more borked A1200/MBX1200z/Indivision A500/clockport/RRNet A600/A603 |
|
Status: Offline |
|
|
Hans
| |
Re: Hyperion Entertainment ... embarks on its most ambitious project to date Posted on 16-Apr-2009 22:16:03
| | [ #200 ] |
|
|
|
Elite Member |
Joined: 27-Dec-2003 Posts: 5067
From: New Zealand | | |
|
| @Trev
Quote:
Trev wrote: @xeron
I think you guys are too hard on Bernd. English obviously isn't his first language, so you have no idea what he actually intended to say when he chose the word "mess." It's difficult enough to convey inflection when English is your first language.
Barring language differences, everyone seems to be ignoring the fact that Bernd is a developer, discussing his difficulties with OS4's APIs. Though sometimes confusing to read, his views are still valid, as are everyone else's. |
Developer or not, he doesn't have Amiga OS 4.x, doesn't develop for OS 4, has no interests in OS 4, yet pretends to know everything about it; more specifically, he thinks that he knows everything that's wrong with it. Bernd_afa's personal interest is Amiga OS 3.x (AROS for Amiga OS), which I'm fine with, but he goes out of his way to search for reasons why Amiga OS 4.x is bad, fundamentally flawed, OS4 users/developers are mean/stupid/whatever-bad-thing-you-wish-to-insert etc. That's annoying.
Hans
Last edited by Hans on 16-Apr-2009 at 10:16 PM.
_________________ http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project. https://keasigmadelta.com/ - More of my work. |
|
Status: Offline |
|
|