Linux / Security
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 212 files with 70,677 lines of code.
    • 14 very long files (30,879 lines of code)
    • 23 long files (16,183 lines of code)
    • 41 medium size files (13,518 lines of codeclsfd_ftr_w_mp_ins)
    • 45 small files (6,406 lines of code)
    • 89 very small files (3,691 lines of code)
43% | 22% | 19% | 9% | 5%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
c48% | 23% | 17% | 7% | 3%
h0% | 13% | 35% | 24% | 25%
in0% | 0% | 0% | 100% | 0%
asn10% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
selinux64% | 9% | 13% | 7% | 4%
smack86% | 0% | 12% | 0% | 1%
apparmor36% | 29% | 10% | 14% | 9%
keys26% | 39% | 23% | 6% | 4%
tomoyo25% | 45% | 18% | 9% | 1%
ROOT50% | 34% | 9% | 4% | <1%
integrity20% | 22% | 37% | 11% | 8%
landlock0% | 0% | 75% | 0% | 24%
yama0% | 0% | 100% | 0% | 0%
safesetid0% | 0% | 57% | 34% | 8%
loadpin0% | 0% | 0% | 100% | 0%
lockdown0% | 0% | 0% | 100% | 0%
bpf0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
hooks.c
in selinux
5671 272
policydb.c
in selinux/ss
3025 94
services.c
in selinux/ss
2992 87
smack_lsm.c
in smack
2920 139
common.c
in tomoyo
2080 60
security.c
in root
2000 274
apparmorfs.c
in apparmor
1847 75
smackfs.c
in smack
1829 74
selinuxfs.c
in selinux
1797 63
ima_policy.c
in integrity/ima
1685 36
lsm.c
in apparmor
1339 99
keyctl.c
in keys
1306 31
label.c
in apparmor
1293 51
keyring.c
in keys
1095 53
domain.c
in apparmor
930 13
common.h
in tomoyo
907 10
policy_unpack.c
in apparmor
902 31
condition.c
in tomoyo
894 11
trusted_tpm1.c
in keys/trusted-keys
882 22
avc.c
in selinux
874 35
801 43
encrypted.c
in keys/encrypted-keys
777 20
key.c
in keys
746 20
util.c
in tomoyo
712 28
policy.c
in apparmor
710 20
653 16
file.c
in tomoyo
639 35
ima_main.c
in integrity/ima
637 24
domain.c
in tomoyo
628 12
ima_crypto.c
in integrity/ima
620 22
conditional.c
in selinux/ss
586 31
evm_main.c
in integrity/evm
578 27
avtab.c
in selinux/ss
568 14
547 25
mount.c
in apparmor
542 17
533 10
match.c
in apparmor
517 15
network.c
in tomoyo
497 25
ima_appraise.c
in integrity/ima
490 20
ima_template_lib.c
in integrity/ima
477 31
sidtab.c
in selinux/ss
470 18
file.c
in apparmor
454 21
gc.c
in tomoyo
426 20
mls.c
in selinux/ss
426 15
fs.c
in landlock
421 24
ebitmap.c
in selinux/ss
421 13
ima_template.c
in integrity/ima
403 9
376 6
ima_fs.c
in integrity/ima
371 16
trusted_tpm2.c
in keys/trusted-keys
368 11
Files With Most Units (Top 50)
File# lines# units
security.c
in root
2000 274
hooks.c
in selinux
5671 272
smack_lsm.c
in smack
2920 139
lsm.c
in apparmor
1339 99
policydb.c
in selinux/ss
3025 94
services.c
in selinux/ss
2992 87
apparmorfs.c
in apparmor
1847 75
smackfs.c
in smack
1829 74
selinuxfs.c
in selinux
1797 63
common.c
in tomoyo
2080 60
keyring.c
in keys
1095 53
label.c
in apparmor
1293 51
801 43
ima_policy.c
in integrity/ima
1685 36
file.c
in tomoyo
639 35
avc.c
in selinux
874 35
policy_unpack.c
in apparmor
902 31
ima_template_lib.c
in integrity/ima
477 31
keyctl.c
in keys
1306 31
conditional.c
in selinux/ss
586 31
tomoyo.c
in tomoyo
273 29
util.c
in tomoyo
712 28
evm_main.c
in integrity/evm
578 27
network.c
in tomoyo
497 25
547 25
fs.c
in landlock
421 24
ima_main.c
in integrity/ima
637 24
ima_crypto.c
in integrity/ima
620 22
trusted_tpm1.c
in keys/trusted-keys
882 22
file.c
in apparmor
454 21
xfrm.c
in selinux
289 21
policy.c
in apparmor
710 20
gc.c
in tomoyo
426 20
ima_appraise.c
in integrity/ima
490 20
ima.h
in integrity/ima
357 20
encrypted.c
in keys/encrypted-keys
777 20
key.c
in keys
746 20
security.h
in selinux/include
341 20
sidtab.c
in selinux/ss
470 18
netlabel.c
in selinux
316 18
mount.c
in apparmor
542 17
lib.c
in apparmor
345 16
ima_fs.c
in integrity/ima
371 16
653 16
ruleset.c
in landlock
344 15
yama_lsm.c
in yama
334 15
match.c
in apparmor
517 15
netlabel.h
in selinux/include
126 15
mls.c
in selinux/ss
426 15
avtab.c
in selinux/ss
568 14
Files With Long Lines (Top 7)

There are 7 files with lines longer than 120 characters. In total, there are 12 long lines.

File# lines# units# long lines
ima_main.c
in integrity/ima
637 24 3
lsm.c
in safesetid
158 7 2
securityfs.c
in safesetid
263 12 2
hooks.c
in selinux
5671 272 2
audit.c
in tomoyo
346 5 1
ima_policy.c
in integrity/ima
1685 36 1
selinuxfs.c
in selinux
1797 63 1