IP Library Granted Patent US 10,915,335
Granted Patent B1
US 10,915,335 · App. 16/654,947 · Granted Feb 9, 2021

System and method for intercepting data flow between computer process and system resource

Inventors: Pavel Emelianov (Moscow, RU); Cyrill Gorcunov (Moscow, RU)
Assignee: Virtuozzo International GmbH
G06F9/44526G06F9/50G06F9/544G06F13/24G06F2209/542
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,915,335
App. No.
16/654,947
Granted
Feb 9, 2021
Kind
B1
Abstract

System for redirecting input/output, which performs, on a CPU, interrupting an execution of a first process with a first object descriptor table associated with the first process, the first object descriptor table including a reference for the first process to a first system resource; loading parasite code into memory, wherein the parasite code provides access to a second system resource under control of a second process; the second process forcing a switch of execution from the first process to the parasite code, and replacing in the first object descriptor table the reference for the first process to the system resource by a reference to the second system resource, thereby causing the input/output to go through the second system resource instead of the first system resource; and restoring the execution of the first process after the execution of the parasite code is complete.

Claims (43)

1. A method for redirecting input/output, the method comprising:

on a CPU, interrupting an execution of a first process with a first object descriptor table associated with the first process, the first object descriptor table including a reference for the first process to a first system resource;

loading parasite code into memory, wherein the parasite code provides access to a second system resource under control of a second process;

the second process forcing a switch of execution from the first process to the parasite code, and replacing in the first object descriptor table the reference for the first process to the system resource by a reference to the second system resource, thereby causing the input/output to go through the second system resource instead of the first system resource; and

restoring the execution of the first process after the execution of the parasite code is complete.

2. The method according to claim 1 , wherein the second system resource is a communication channel.

3. The method according to claim 1 , wherein the second system resource is a socket.

4. The method according to claim 1 , wherein the second system resource is a file on a disk.

5. The method according to claim 1 , wherein the second system resource is a virtual file in the memory.

6. The method according to claim 1 , wherein the second system resource is a file system.

7. The method according to claim 1 , wherein the second system resource is a network card.

8. The method according to claim 1 , wherein the second system resource is a pipe.

9. The method according to claim 1 , wherein the second system resource is a timer.

10. The method according to claim 1 , wherein the second system resource is a disk or a partition.

11. The method according to claim 1 , wherein code of the first process is not modified by the loading of the parasite code into the memory.

12. The method according to claim 1 , wherein the first object descriptor table is a file descriptor table.

13. The method according to claim 1 , wherein the parasite code is inserted into an address space of the first process in the memory by the second process.

14. The method according to claim 1 , wherein the parasite code performs a logrotate on the fly.

15. The method according to claim 1 , wherein the parasite code performs checks on socket file descriptors to verify if a connection of the second process is frozen.

16. The method according to claim 1 , wherein the parasite code performs garbage collection.

17. The method according to claim 1 , wherein the parasite code intercepts SIGSEGV and acts upon an illegal memory access.

18. The method according to claim 1 , wherein the parasite code performs a remote swap for a task.

19. The method according to claim 1 , wherein the parasite code performs WSS (Working Set Size) detection.

20. The method according to claim 1 , wherein the parasite code performs death detection of a process that is unrelated to the first or second processes.

21. The method according to claim 1 , wherein the parasite code performs a binary update for live patching or libraries relink.

22. The method according to claim 1 , wherein the parasite code performs tunneling to replace an opened non-UNIX socket with a UNIX socket.

23. The method according to claim 1 , wherein the parasite code injects a socket spy.

24. The method according to claim 1 , wherein the parasite code performs a crypt and/or decrypt of an unsecured channel without restarting its original processes.

25. The method according to claim 1 , wherein the parasite code performs a traffic fanout (multiplex).

26. The method according to claim 1 , wherein the parasite code performs a filter and/or split log for a file on disks using a proxy via a pipe.

27. The method according to claim 1 , wherein the parasite code performs a nohup on the fly.

28. The method according to claim 1 , wherein the parasite code retrieves unread data for a frozen daemon.

29. The method according to claim 1 , wherein the parasite code performs a re-connect for sleeping sockets to other addresses.

30. The method according to claim 1 , wherein the parasite code performs “soft” restart of a service by calling execve( ) from a context of the service.

31. The method according to claim 1 , wherein the parasite code forces entry into a Container.

32. The method according to claim 1 , wherein the parasite code forces a reparent for a process.

33. The method according to claim 1 , further comprising updating a second object descriptor table for the second process so that the second object descriptor table includes a first reference to the first system resource and a second reference to the second system resource.

34. A system for redirecting input/output, the system comprising:

a CPU and a memory coupled to the CPU, the memory containing computer code implementing

a first process with a first object descriptor table associated with the first process, the first object descriptor table including a reference for the first process to a first system resource;

a second process that loads a parasite code into the memory, wherein the parasite code provides access to a second system resource under control of the second process;

the second process forcing a switch of execution from the first process to the parasite code, and replacing in the first object descriptor table the reference for the first process to the system resource by a reference to the second system resource, thereby causing the input/output to go through the second system resource instead of the first system resource; and

the second process restoring the execution of the first process after the execution of the parasite code is complete.

Assignments (2)
SECURITY INTEREST IN TRADEMARK, PATENT, AND COPYRIGHT RIGHTS Recorded Dec 22, 2022
From: VIRTUOZZO INTERNATIONAL GMBH; ONAPP LIMITED
To: WILMINGTON TRUST (LONDON) LIMITED
Reel/Frame 062206/0557 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 16, 2019
From: EMELIANOV, PAVEL; GORCUNOV, CYRILL
To: VIRTUOZZO INTERNATIONAL GMBH
Reel/Frame 050738/0514 →