The invention discloses a safety protection method and
system, and relates to the field of the communication network technology, and can solve the problem of a high resource
occupancy rate caused by an existing safety protection method. By use of the embodiment of the invention, an anti-malicious-
software driver is used for receiving a file access request, a file event is generated according to the file access request, the file event is sent to an antivirus engine through a safe API (Application Program Interface)
library interface, the antivirus engine calls the safe API
library interface to read the contents of a file to be accessed from a
shared memory, the contents of the file to be accessed are scanned, and a scanning result is sent to the anti-malicious-
software driver; and when the anti-malicious-
software driver determines that a scanning result is that malicious software is not contained, the file to be accessed permits to be accessed, and when the anti-malicious-software driver determines that the scanning result is that the malicious software is contained, the file to be accessed is subjected to antivirus
processing. The scheme provided by the embodiment of the invention is suitable to be adopted when a KVM (Kernel-based
Virtual Machine)
system is subjected to safety protection.