Charge [stack] at its grown extent, as Linux does

Ouverte
#492 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
28/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
c, linux

Piste de recherche

Start by reading the stack mapping and RLIMIT accounting paths, especially the code behind #485, and compare how elfuse reports [stack] in /proc/self/maps and VmSize with the Linux behavior described here. The issue requires stack growth on faults with RLIMIT_STACK and RLIMIT_AS checks; it is done when a Linux-sized ulimit -v behaves consistently and the mapping reflects the grown extent.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement

elfuse maps [stack] at its full fixed extent up front, and #485 counts it that way toward RLIMIT_AS. Linux counts the stack VMA only as far as it has grown.

Measured with one static probe that prints the [stack] line of /proc/self/maps and VmSize from /proc/self/status, right after exec:

[stack] in maps VmSize
elfuse 8188 KiB 8880 kB
Linux 6.18.60 132 KiB 840 kB

So a guest whose ulimit -v was sized from a Linux run gets about 8 MiB less address space under elfuse. test-rlimit-mem cannot see the gap, because it takes its base from elfuse's own VmSize.

To match Linux, [stack] would be charged (and shown in maps) at the extent the stack has grown to, and grown on a fault below it the way Linux expands the stack VMA, with RLIMIT_STACK and RLIMIT_AS checked at that point as acct_stack_growth does.

Refs #485

Langage dominant
C
Étoiles
287
Forks
33
Merge moyen
2 j 17 h
PR mergées (30 j)
18

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de sysprog21/elfuse

Toutes les issues de sysprog21/elfuse

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.