[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

390.0. "Filter Ast's ?" by IOSG::BAILEY (Don't dream it, Be it) Mon Jan 26 1987 12:00

Just a thought...

In these days with lots of people understanding how to deliver a
'home made ' ast telling your process to do anything it wants
(and if under V5 there is a supported method of doing same)
life can get very strange, your prompt could change , your
default directory can change, people can see all your stored
commands etc etc etc it would be nice to 'filter' out
unwanted ast's , setting the ast enable bits KESU may be to coarse

So...  Allocate some nonpaged pool ,format it as code + ACB block	
and enter it in your ast queue, NOT QAST it but just INSQUE it at queue
head

now when an ast is queued to your process  it will execute YOUR ast
first so the ACB code may scan the ast's queued to you and REMQUE unwanted
ones, it may be as simple as   
"if  ACB$L_FPC (ast code address) is in nonpaged space REMQUE it "
or you may wish to have a more exciting method of getting rid of ast's

in this way you can still get 'system' ast's but filter a 'hack' ast

At code end you may be able to just INSQUE your ACB at queue head as the 
ASTDEL code will now point to the next or you may have to reformat the ACB
as a TQE to go off in 0.1 secs to reenter it in your ast queue
------------------------------------------------------------------

Any comments, would this work ?

Peb
T.RTitleUserPersonal
Name
DateLines
390.1Finess the problem -- see your supervisorERIS::CALLASSo many ratholes, so little timeMon Jan 26 1987 13:5321
    As stated, no, it wouldn't work, and would be rather dangerous. It
    sounds to me like taking mercury to avoid the flu. I think you're
    worrying about things you shouldn't. 
    
    The reason it won't work is that you're going to have to differentiate
    between the ASTs you want (like I/O completion) versus the ones you
    don't want. Needless to say, this is non-trivial, and in general not
    feasible. Also, if you really want to do this properly, you have to
    queue yourself as a special kernel AST. Don't forget that you'll be at
    IPL 2, and if you goof, the system goes down. On a time-sharing system
    (you *must* be on a time-sharing system -- people on workstations don't
    have this problem!), this might be interpreted as anti-social. 
    
    Anyone who can queue ASTs to your process is in kernel mode. Code in
    kernel mode can do whatever it wants, given a clever enough author. If
    you are being harassed by people with CMKRNL privilege, there are ways
    to deal with them. The best ways involve complaining to your superiors.
    Getting paranoid is a waste of time and energy. There are many niftier
    hacks that are far more useful than trying to filter ASTs.
    
    	Jon
390.2Another use for an Ast ?IOSG::BAILEYBeen down so long;looks like up to meWed May 06 1987 21:1224
This a spin off from note 525 in VMSNOTES, in 525
someone wanted to find out what terminals are getting
operator messages even tho the operator who REPLY/ENABLed
has logged out and a 'normal' user now has that device.
The programs I've seen in Vmsnotes and Hackers use the fact
that the OPR bit is set in the terminal UCB (Devclass ?) when
a reply/enable is done, but when the operator logs out
the OPR bit is clear so a scan for terminals with Opr
set will miss the terminals the author of 525 wanted.
Now the only 'person' who knows whats an operator device
is OPCOM, since it holds this data in its P1 space the only
way (I can think of) to get a true list of operator
terminals would be to send OPCOM a 'home grown' ast
requesting this info, ok thats all weel and good, fairly
staight forward but

would it be possible to send OPCOM just one ast , that causes
opcom to build a global section that maps the relevent address
of its P1 space ? so now to get a list you can use much
simpler methods than using an Ast?

Would this work ?

Ta peb