<  Retour au portail Polytechnique Montréal

Déduction des cibles de sauts indirects pour les applications de traçage x86

Gabriel-Andrew Pollo-Guilbert

Mémoire de maîtrise (2021)

Document en libre accès dans PolyPublie
[img]
Affichage préliminaire
Libre accès au plein texte de ce document
Conditions d'utilisation: Tous droits réservés
Télécharger (1MB)
Afficher le résumé
Cacher le résumé

Résumé

Le traçage est un outil puissant utilisé dans le processus de développement d'une application. Ceci est particulièrement utile pour comprendre le comportement des applications qui interagissent en temps réel avec plusieurs composantes externes. En effet, ces applications ne peuvent généralement pas être arrêtées pour inspecter leur état interne à l'aide d'un débogueur interactif. A la place, alors que l'application roule à vitesse normale, une trace de son execution est générée, afin de suivre son chemin d'exécution et enregistrer les valeurs importantes dans la trace. Le programmeur doit premièrement insérer des sondes dans son logiciel. Lorsqu'une sonde est lancée, un évènement est créé et enregistré. Grâce au traçage, le développeur est en mesure d'extraire un grand volume d'information critique à l'optimisation ou au débogage de certains problèmes. Contrairement à la journalisation, le traçage se doit d'avoir le plus petit surcout d'exécution. Par conséquent, différentes optimisations sont effectuées. Dans les applications de haute disponibilité, le développeur doit pouvoir extraire de l'information concernant l'exécution. Idéalement, une sonde est déjà insérée statiquement dans le code source de l'application. Cependant, il peut être difficile de prédire quel problème pourrait survenir en production, l'insertion des sondes doit être plus flexible. Grâce à l'instrumentation dynamique, il sera possible d'insérer de telles sondes en parallèle à l'exécution d'un programme. L'insertion dynamique d'une sonde consiste à modifier certaines parties d'un programme, au niveau des instructions, afin de rediriger le flot d'exécution vers une routine d'instrumentation qui se charge d'enregistrer les données d'intérêts. Cette modification du programme amène beaucoup de problèmes et de défis. Un des problèmes qui limite le taux de succès de l'instrumentation est la difficulté d'extraire le graphe de flot de contrôle d'une fonction, pour déterminer si deux instructions ou plus peuvent être remplacées par une redirection. Dans ce mémoire, nous présentons une technique basée sur la correspondance de patrons afin d'extraire ce graphe. Ce problème a longtemps été étudié dans le domaine de la translation de code ou de la rétro-ingénierie, mais rarement dans le domaine du traçage. Notre technique est en mesure d'extraire avec une grande fiabilité les données nécessaires au graphe de flot de contrôle et d'ainsi augmenter le taux de succès de l'instrumentation dynamique.

Abstract

Tracing is a powerful tool used in the process of application development. It is especially useful to understand the behavior of applications that interact in real time with many different external components. Indeed, such applications often cannot be stopped, to inspect their state, using an interactive debugger. Instead, while the application is running at normal speed, a trace of its execution is generated, in order to follow its execution path and record important values in the trace. The developer must first insert tracepoints into the application. When a tracepoint is reached and executed, an event is created and saved in the trace. Thanks to tracing, the developer is able to extract a large amount of critical data that can be used for optimisation or debugging. Unlike logging, one of the requirements of tracing is that its execution must carry as low overhead as possible. To do so, multiple techniques are used by different tracers. In high reliability environments, a common task of a developer is to be able to extract information concerning the execution of a system. Ideally, a tracepoint would already be inserted statically into the application source code. However, it is very difficult to predict what kind of bug the system will face in production. Hence, the instrumentation of a program needs to be more flexible, since we may be missing tracepoints. Thanks to dynamic instrumentation, it will now be possible to insert such dynamic tracepoints while the system is running. The insertion of dynamic tracepoints usually relies on the modification of individual instructions in a program. It needs to do that in order to redirect the execution flow to specialised instrumentation that will save the data of interest. Modifying a program, especially when it is running, brings a great deal of problems and challenges. One of the problems that decreases the success rate of dynamic instrumentation is the difficult task of recovering the control flow graph of a function, to determine if two or more instructions can be replaced by a redirection. In this thesis, we present a technique, based on pattern matching, that can recover the required jump targets, to obtain a control flow graph. This problem has long been studied in the domain of binary translation or reverse engineering, but rarely in the domain of tracing. Our efficient technique is able to recover with high reliability the control flow graph, hence increasing the success rate of dynamic instrumentation.

Département: Département de génie informatique et génie logiciel
Programme: Génie informatique
Directeurs ou directrices: Michel Dagenais
URL de PolyPublie: https://publications.polymtl.ca/9990/
Université/École: Polytechnique Montréal
Date du dépôt: 27 avr. 2022 08:19
Dernière modification: 08 avr. 2024 10:24
Citer en APA 7: Pollo-Guilbert, G.-A. (2021). Déduction des cibles de sauts indirects pour les applications de traçage x86 [Mémoire de maîtrise, Polytechnique Montréal]. PolyPublie. https://publications.polymtl.ca/9990/

Statistiques

Total des téléchargements à partir de PolyPublie

Téléchargements par année

Provenance des téléchargements

Actions réservées au personnel

Afficher document Afficher document