CINXE.COM

Profiling_with_tools 路 Wiki 路 AppArmor / apparmor 路 GitLab

<!DOCTYPE html> <html class="gl-light ui-neutral with-top-bar with-header " lang="en"> <head prefix="og: http://ogp.me/ns#"> <meta charset="utf-8"> <meta content="IE=edge" http-equiv="X-UA-Compatible"> <meta content="width=device-width, initial-scale=1" name="viewport"> <title>Profiling_with_tools 路 Wiki 路 AppArmor / apparmor 路 GitLab</title> <script nonce="66USbx/BOSTc/Mm+EpdiyQ=="> //<![CDATA[ window.gon={};gon.math_rendering_limits_enabled=true;gon.features={"preserveMarkdown":false,"glqlIntegration":false,"continueIndentedText":false}; //]]> </script> <link rel="stylesheet" href="/assets/application-47ad6136e281eab235c6af040242ecf1c0a58ded0f4c3cd352781c780f6bd10c.css" /> <link rel="stylesheet" href="/assets/page_bundles/wiki-bbc8c2e50859066de1252458a1497ec3ff7e7e65edc58399d4786b0f52f930db.css" /><link rel="stylesheet" href="/assets/page_bundles/commit_description-1e2cba4dda3c7b30dd84924809020c569f1308dea51520fe1dd5d4ce31403195.css" /><link rel="stylesheet" href="/assets/page_bundles/work_items-22a76cdd1fe2ae5431b7ff603f86212acaf81b49c4a932f19e3b3222dc1881ee.css" /><link rel="stylesheet" href="/assets/page_bundles/notes_shared-30de79203a0836dddd3a4cf7364d63afb16a0f2deb0bbc654b00692872696739.css" /> <link rel="stylesheet" href="/assets/application_utilities-58bec0f2dc46133fc9e8548af9854688398e9d7263cc0fd95ec5739f2a069dec.css" /> <link rel="stylesheet" href="/assets/tailwind-79a1d592825c93045f94372fe49b80080d4952e6129676a307aa391980156496.css" /> <link rel="stylesheet" href="/assets/fonts-fae5d3f79948bd85f18b6513a025f863b19636e85b09a1492907eb4b1bb0557b.css" /> <link rel="stylesheet" href="/assets/highlight/themes/white-99cce4f4b362f6840d7134d4129668929fde49c4da11d6ebf17f99768adbd868.css" /> <script src="/assets/webpack/runtime.4728fef8.bundle.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/main.a1bcb1ba.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/tracker.d8ced242.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/analytics.20a07e5c.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script nonce="66USbx/BOSTc/Mm+EpdiyQ=="> //<![CDATA[ window.snowplowOptions = {"namespace":"gl","hostname":"snowplowprd.trx.gitlab.net","cookieDomain":".gitlab.com","appId":"gitlab","formTracking":true,"linkClickTracking":true} gl = window.gl || {}; gl.snowplowStandardContext = {"schema":"iglu:com.gitlab/gitlab_standard/jsonschema/1-1-1","data":{"environment":"production","source":"gitlab-rails","correlation_id":"01JM8NJRNXFSYPY57MFX7X9GM0","plan":"opensource","extra":{},"user_id":null,"global_user_id":null,"is_gitlab_team_member":null,"namespace_id":2118303,"project_id":4484878,"feature_enabled_by_namespace_ids":null,"realm":"saas","instance_id":"ea8bf810-1d6f-4a6a-b4fd-93e8cbd8b57f","host_name":"gitlab-webservice-web-84bd84966c-7w729","instance_version":"17.9.0","context_generated_at":"2025-02-17T00:40:25.830Z"}} gl.snowplowPseudonymizedPageUrl = "https://gitlab.com/namespace2118303/project4484878/-/wikis/Profiling_with_tools"; gl.maskedDefaultReferrerUrl = null; gl.ga4MeasurementId = 'G-ENFH3X7M5Y'; //]]> </script> <link rel="preload" href="/assets/application_utilities-58bec0f2dc46133fc9e8548af9854688398e9d7263cc0fd95ec5739f2a069dec.css" as="style" type="text/css" nonce="hKp8NmG84HssAGqRh7cd4g=="> <link rel="preload" href="/assets/application-47ad6136e281eab235c6af040242ecf1c0a58ded0f4c3cd352781c780f6bd10c.css" as="style" type="text/css" nonce="hKp8NmG84HssAGqRh7cd4g=="> <link rel="preload" href="/assets/highlight/themes/white-99cce4f4b362f6840d7134d4129668929fde49c4da11d6ebf17f99768adbd868.css" as="style" type="text/css" nonce="hKp8NmG84HssAGqRh7cd4g=="> <link crossorigin="" href="https://snowplowprd.trx.gitlab.net" rel="preconnect"> <link as="font" crossorigin="" href="/assets/gitlab-sans/GitLabSans-1e0a5107ea3bbd4be93e8ad2c503467e43166cd37e4293570b490e0812ede98b.woff2" rel="preload"> <link as="font" crossorigin="" href="/assets/gitlab-sans/GitLabSans-Italic-38eaf1a569a54ab28c58b92a4a8de3afb96b6ebc250cf372003a7b38151848cc.woff2" rel="preload"> <link as="font" crossorigin="" href="/assets/gitlab-mono/GitLabMono-08d2c5e8ff8fd3d2d6ec55bc7713380f8981c35f9d2df14e12b835464d6e8f23.woff2" rel="preload"> <link as="font" crossorigin="" href="/assets/gitlab-mono/GitLabMono-Italic-38e58d8df29485a20c550da1d0111e2c2169f6dcbcf894f2cd3afbdd97bcc588.woff2" rel="preload"> <link rel="preload" href="/assets/fonts-fae5d3f79948bd85f18b6513a025f863b19636e85b09a1492907eb4b1bb0557b.css" as="style" type="text/css" nonce="hKp8NmG84HssAGqRh7cd4g=="> <script src="/assets/webpack/sentry.50c23da3.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.groups.analytics.dashboards-pages.groups.harbor.repositories-pages.groups.iteration_ca-fae0f519.5b107e61.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.groups.new-pages.import.gitlab_projects.new-pages.import.manifest.new-pages.projects.n-44c6c18e.77d582f4.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.search.show-super_sidebar.3f577741.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/super_sidebar.87a3cc66.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.projects-pages.projects.activity-pages.projects.alert_management.details-pages.project-68d77824.79456cb0.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.c-ee481b6b.f3e17a81.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/5.57620128.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/6.dfe26d30.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.admin.abuse_reports.show-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.c-8e2404e8.46b9e261.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/15.5e0a0798.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.groups.roadmap.show-pages.groups.wikis-pages.groups.wikis.diff-pages.groups.wikis.git_-f86ba45d.f0208b6d.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.groups.wikis-pages.groups.wikis.diff-pages.groups.wikis.git_access-pages.groups.wikis.-53394378.5a5c8679.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.groups.wikis-pages.groups.wikis.diff-pages.groups.wikis.git_access-pages.groups.wikis.-bd8643e0.2c5982e9.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.groups.wikis-pages.groups.wikis.diff-pages.groups.wikis.git_access-pages.groups.wikis.-880ac750.0b85e166.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/commons-pages.groups.wikis-pages.groups.wikis.diff-pages.groups.wikis.git_access-pages.groups.wikis.-0c2b43e7.5acceb55.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <script src="/assets/webpack/pages.projects.wikis.show.975a8053.chunk.js" defer="defer" nonce="66USbx/BOSTc/Mm+EpdiyQ=="></script> <meta content="object" property="og:type"> <meta content="GitLab" property="og:site_name"> <meta content="Profiling_with_tools 路 Wiki 路 AppArmor / apparmor 路 GitLab" property="og:title"> <meta content="The AppArmor user space development project." property="og:description"> <meta content="https://gitlab.com/uploads/-/system/project/avatar/4484878/apparmor-red-diag_1w2h.png" property="og:image"> <meta content="64" property="og:image:width"> <meta content="64" property="og:image:height"> <meta content="https://gitlab.com/apparmor/apparmor/-/wikis/Profiling_with_tools" property="og:url"> <meta content="summary" property="twitter:card"> <meta content="Profiling_with_tools 路 Wiki 路 AppArmor / apparmor 路 GitLab" property="twitter:title"> <meta content="The AppArmor user space development project." property="twitter:description"> <meta content="https://gitlab.com/uploads/-/system/project/avatar/4484878/apparmor-red-diag_1w2h.png" property="twitter:image"> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="nj4c1FidUyByZG2Xy831bUugsYwZFKXhcEqY2n4n08HmkjvXXk9FsryDNozQR0_Z6USCIHDDGDfngvQYAFusaQ" /> <meta name="csp-nonce" content="66USbx/BOSTc/Mm+EpdiyQ==" /> <meta name="action-cable-url" content="/-/cable" /> <link href="/-/manifest.json" rel="manifest"> <link rel="icon" type="image/png" href="/assets/favicon-72a2cad5025aa931d6ea56c3201d1f18e68a8cd39788c7c80d5b2b82aa5143ef.png" id="favicon" data-original-href="/assets/favicon-72a2cad5025aa931d6ea56c3201d1f18e68a8cd39788c7c80d5b2b82aa5143ef.png" /> <link rel="apple-touch-icon" type="image/x-icon" href="/assets/apple-touch-icon-b049d4bc0dd9626f31db825d61880737befc7835982586d015bded10b4435460.png" /> <link href="/search/opensearch.xml" rel="search" title="Search GitLab" type="application/opensearchdescription+xml"> <meta content="The AppArmor user space development project." name="description"> <meta content="#ececef" name="theme-color"> </head> <body class="tab-width-8 gl-browser-ie gl-platform-windows" data-group="apparmor" data-group-full-path="apparmor" data-namespace-id="2118303" data-page="projects:wikis:show" data-page-type-id="Profiling_with_tools" data-project="apparmor" data-project-full-path="apparmor/apparmor" data-project-id="4484878"> <script nonce="66USbx/BOSTc/Mm+EpdiyQ=="> //<![CDATA[ gl = window.gl || {}; gl.GfmAutoComplete = gl.GfmAutoComplete || {}; gl.GfmAutoComplete.dataSources = {"epics":"/apparmor/apparmor/-/autocomplete_sources/epics","iterations":"/apparmor/apparmor/-/autocomplete_sources/iterations","vulnerabilities":"/apparmor/apparmor/-/autocomplete_sources/vulnerabilities","members":"/apparmor/apparmor/-/autocomplete_sources/members?type=Wiki\u0026type_id=Profiling_with_tools","issues":"/apparmor/apparmor/-/autocomplete_sources/issues","mergeRequests":"/apparmor/apparmor/-/autocomplete_sources/merge_requests","labels":"/apparmor/apparmor/-/autocomplete_sources/labels?type=Wiki\u0026type_id=Profiling_with_tools","milestones":"/apparmor/apparmor/-/autocomplete_sources/milestones","commands":"/apparmor/apparmor/-/autocomplete_sources/commands?type=Wiki\u0026type_id=Profiling_with_tools","snippets":"/apparmor/apparmor/-/autocomplete_sources/snippets","contacts":"/apparmor/apparmor/-/autocomplete_sources/contacts?type=Wiki\u0026type_id=Profiling_with_tools","wikis":"/apparmor/apparmor/-/autocomplete_sources/wikis"}; //]]> </script> <script nonce="66USbx/BOSTc/Mm+EpdiyQ=="> //<![CDATA[ gl = window.gl || {}; gl.client = {"isIe":true,"isWindows":true}; //]]> </script> <header class="header-logged-out" data-testid="navbar"> <a class="gl-sr-only gl-accessibility" href="#content-body">Skip to content</a> <div class="container-fluid"> <nav aria-label="Explore GitLab" class="header-logged-out-nav gl-flex gl-gap-3 gl-justify-between"> <div class="gl-flex gl-items-center gl-gap-1"> <span class="gl-sr-only">GitLab</span> <a title="Homepage" id="logo" class="header-logged-out-logo has-tooltip" aria-label="Homepage" data-track-label="main_navigation" data-track-action="click_gitlab_logo_link" data-track-property="navigation_top" href="/"><svg aria-hidden="true" role="img" class="tanuki-logo" width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path class="tanuki-shape tanuki" d="m24.507 9.5-.034-.09L21.082.562a.896.896 0 0 0-1.694.091l-2.29 7.01H7.825L5.535.653a.898.898 0 0 0-1.694-.09L.451 9.411.416 9.5a6.297 6.297 0 0 0 2.09 7.278l.012.01.03.022 5.16 3.867 2.56 1.935 1.554 1.176a1.051 1.051 0 0 0 1.268 0l1.555-1.176 2.56-1.935 5.197-3.89.014-.01A6.297 6.297 0 0 0 24.507 9.5Z" fill="#E24329"/> <path class="tanuki-shape right-cheek" d="m24.507 9.5-.034-.09a11.44 11.44 0 0 0-4.56 2.051l-7.447 5.632 4.742 3.584 5.197-3.89.014-.01A6.297 6.297 0 0 0 24.507 9.5Z" fill="#FC6D26"/> <path class="tanuki-shape chin" d="m7.707 20.677 2.56 1.935 1.555 1.176a1.051 1.051 0 0 0 1.268 0l1.555-1.176 2.56-1.935-4.743-3.584-4.755 3.584Z" fill="#FCA326"/> <path class="tanuki-shape left-cheek" d="M5.01 11.461a11.43 11.43 0 0 0-4.56-2.05L.416 9.5a6.297 6.297 0 0 0 2.09 7.278l.012.01.03.022 5.16 3.867 4.745-3.584-7.444-5.632Z" fill="#FC6D26"/> </svg> </a></div> <ul class="gl-list-none gl-p-0 gl-m-0 gl-flex gl-gap-3 gl-items-center gl-grow"> <li class="header-logged-out-nav-item header-logged-out-dropdown md:gl-hidden"> <button class="header-logged-out-toggle" data-toggle="dropdown" type="button"> <span class="gl-sr-only"> Menu </span> <svg class="s16" data-testid="hamburger-icon"><use href="/assets/icons-aa2c8ddf99d22b77153ca2bb092a23889c12c597fc8b8de94b0f730eb53513f6.svg#hamburger"></use></svg> </button> <div class="dropdown-menu"> <ul> <li> <a href="https://about.gitlab.com/why-gitlab">Why GitLab </a></li> <li> <a href="https://about.gitlab.com/pricing">Pricing </a></li> <li> <a href="https://about.gitlab.com/sales">Contact Sales </a></li> <li> <a href="/explore">Explore</a> </li> </ul> </div> </li> <li class="header-logged-out-nav-item gl-hidden md:gl-inline-block"> <a href="https://about.gitlab.com/why-gitlab">Why GitLab </a></li> <li class="header-logged-out-nav-item gl-hidden md:gl-inline-block"> <a href="https://about.gitlab.com/pricing">Pricing </a></li> <li class="header-logged-out-nav-item gl-hidden gl-inline-block"> <a href="https://about.gitlab.com/sales">Contact Sales </a></li> <li class="header-logged-out-nav-item gl-hidden md:gl-inline-block"> <a class="" href="/explore">Explore</a> </li> </ul> <ul class="gl-list-none gl-p-0 gl-m-0 gl-flex gl-gap-3 gl-items-center gl-justify-end"> <li class="header-logged-out-nav-item"> <a href="/users/sign_in?redirect_to_referer=yes">Sign in</a> </li> <li class="header-logged-out-nav-item"> <a class="gl-button btn btn-md btn-confirm !gl-inline-flex" href="/users/sign_up"><span class="gl-button-text"> Get free trial </span> </a></li> </ul> </nav> </div> </header> <div class="layout-page page-gutter wiki-sidebar right-sidebar-expanded page-with-super-sidebar"> <aside class="js-super-sidebar super-sidebar super-sidebar-loading" data-command-palette="{&quot;project_files_url&quot;:&quot;/apparmor/apparmor/-/files/master?format=json&quot;,&quot;project_blob_url&quot;:&quot;/apparmor/apparmor/-/blob/master&quot;}" data-force-desktop-expanded-sidebar="" data-is-saas="true" data-root-path="/" data-sidebar="{&quot;whats_new_most_recent_release_items_count&quot;:4,&quot;whats_new_version_digest&quot;:&quot;0dc755729105d759eb626954bd82029a9f94aed1c747983d4f27a0d7ade59e57&quot;,&quot;is_logged_in&quot;:false,&quot;context_switcher_links&quot;:[{&quot;title&quot;:&quot;Explore&quot;,&quot;link&quot;:&quot;/explore&quot;,&quot;icon&quot;:&quot;compass&quot;}],&quot;current_menu_items&quot;:[{&quot;id&quot;:&quot;project_overview&quot;,&quot;title&quot;:&quot;apparmor&quot;,&quot;avatar&quot;:&quot;/uploads/-/system/project/avatar/4484878/apparmor-red-diag_1w2h.png&quot;,&quot;entity_id&quot;:4484878,&quot;link&quot;:&quot;/apparmor/apparmor&quot;,&quot;link_classes&quot;:&quot;shortcuts-project&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;manage_menu&quot;,&quot;title&quot;:&quot;Manage&quot;,&quot;icon&quot;:&quot;users&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/activity&quot;,&quot;is_active&quot;:false,&quot;items&quot;:[{&quot;id&quot;:&quot;activity&quot;,&quot;title&quot;:&quot;Activity&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/activity&quot;,&quot;link_classes&quot;:&quot;shortcuts-project-activity&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;members&quot;,&quot;title&quot;:&quot;Members&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/project_members&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;labels&quot;,&quot;title&quot;:&quot;Labels&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/labels&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;plan_menu&quot;,&quot;title&quot;:&quot;Plan&quot;,&quot;icon&quot;:&quot;planning&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/issues&quot;,&quot;is_active&quot;:true,&quot;items&quot;:[{&quot;id&quot;:&quot;project_issue_list&quot;,&quot;title&quot;:&quot;Issues&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/issues&quot;,&quot;pill_count_field&quot;:&quot;openIssuesCount&quot;,&quot;link_classes&quot;:&quot;shortcuts-issues has-sub-items&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;boards&quot;,&quot;title&quot;:&quot;Issue boards&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/boards&quot;,&quot;link_classes&quot;:&quot;shortcuts-issue-boards&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;milestones&quot;,&quot;title&quot;:&quot;Milestones&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/milestones&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;iterations&quot;,&quot;title&quot;:&quot;Iterations&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/cadences&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;project_wiki&quot;,&quot;title&quot;:&quot;Wiki&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/wikis/home&quot;,&quot;link_classes&quot;:&quot;shortcuts-wiki&quot;,&quot;is_active&quot;:true},{&quot;id&quot;:&quot;requirements&quot;,&quot;title&quot;:&quot;Requirements&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/requirements_management/requirements&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;code_menu&quot;,&quot;title&quot;:&quot;Code&quot;,&quot;icon&quot;:&quot;code&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/merge_requests&quot;,&quot;is_active&quot;:false,&quot;items&quot;:[{&quot;id&quot;:&quot;project_merge_request_list&quot;,&quot;title&quot;:&quot;Merge requests&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/merge_requests&quot;,&quot;pill_count_field&quot;:&quot;openMergeRequestsCount&quot;,&quot;link_classes&quot;:&quot;shortcuts-merge_requests&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;files&quot;,&quot;title&quot;:&quot;Repository&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/tree/master&quot;,&quot;link_classes&quot;:&quot;shortcuts-tree&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;branches&quot;,&quot;title&quot;:&quot;Branches&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/branches&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;commits&quot;,&quot;title&quot;:&quot;Commits&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/commits/master?ref_type=heads&quot;,&quot;link_classes&quot;:&quot;shortcuts-commits&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;tags&quot;,&quot;title&quot;:&quot;Tags&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/tags&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;graphs&quot;,&quot;title&quot;:&quot;Repository graph&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/network/master?ref_type=heads&quot;,&quot;link_classes&quot;:&quot;shortcuts-network&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;compare&quot;,&quot;title&quot;:&quot;Compare revisions&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/compare?from=master\u0026to=master&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;project_snippets&quot;,&quot;title&quot;:&quot;Snippets&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/snippets&quot;,&quot;link_classes&quot;:&quot;shortcuts-snippets&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;file_locks&quot;,&quot;title&quot;:&quot;Locked files&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/path_locks&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;build_menu&quot;,&quot;title&quot;:&quot;Build&quot;,&quot;icon&quot;:&quot;rocket&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/pipelines&quot;,&quot;is_active&quot;:false,&quot;items&quot;:[{&quot;id&quot;:&quot;pipelines&quot;,&quot;title&quot;:&quot;Pipelines&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/pipelines&quot;,&quot;link_classes&quot;:&quot;shortcuts-pipelines&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;jobs&quot;,&quot;title&quot;:&quot;Jobs&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/jobs&quot;,&quot;link_classes&quot;:&quot;shortcuts-builds&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;pipeline_schedules&quot;,&quot;title&quot;:&quot;Pipeline schedules&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/pipeline_schedules&quot;,&quot;link_classes&quot;:&quot;shortcuts-builds&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;test_cases&quot;,&quot;title&quot;:&quot;Test cases&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/quality/test_cases&quot;,&quot;link_classes&quot;:&quot;shortcuts-test-cases&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;artifacts&quot;,&quot;title&quot;:&quot;Artifacts&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/artifacts&quot;,&quot;link_classes&quot;:&quot;shortcuts-builds&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;deploy_menu&quot;,&quot;title&quot;:&quot;Deploy&quot;,&quot;icon&quot;:&quot;deployments&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/releases&quot;,&quot;is_active&quot;:false,&quot;items&quot;:[{&quot;id&quot;:&quot;releases&quot;,&quot;title&quot;:&quot;Releases&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/releases&quot;,&quot;link_classes&quot;:&quot;shortcuts-deployments-releases&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;packages_registry&quot;,&quot;title&quot;:&quot;Package Registry&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/packages&quot;,&quot;link_classes&quot;:&quot;shortcuts-container-registry&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;container_registry&quot;,&quot;title&quot;:&quot;Container Registry&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/container_registry&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;model_registry&quot;,&quot;title&quot;:&quot;Model registry&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/ml/models&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;operations_menu&quot;,&quot;title&quot;:&quot;Operate&quot;,&quot;icon&quot;:&quot;cloud-pod&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/environments&quot;,&quot;is_active&quot;:false,&quot;items&quot;:[{&quot;id&quot;:&quot;environments&quot;,&quot;title&quot;:&quot;Environments&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/environments&quot;,&quot;link_classes&quot;:&quot;shortcuts-environments&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;infrastructure_registry&quot;,&quot;title&quot;:&quot;Terraform modules&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/terraform_module_registry&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;monitor_menu&quot;,&quot;title&quot;:&quot;Monitor&quot;,&quot;icon&quot;:&quot;monitor&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/incidents&quot;,&quot;is_active&quot;:false,&quot;items&quot;:[{&quot;id&quot;:&quot;incidents&quot;,&quot;title&quot;:&quot;Incidents&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/incidents&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;service_desk&quot;,&quot;title&quot;:&quot;Service Desk&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/issues/service_desk&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false},{&quot;id&quot;:&quot;analyze_menu&quot;,&quot;title&quot;:&quot;Analyze&quot;,&quot;icon&quot;:&quot;chart&quot;,&quot;avatar_shape&quot;:&quot;rect&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/value_stream_analytics&quot;,&quot;is_active&quot;:false,&quot;items&quot;:[{&quot;id&quot;:&quot;cycle_analytics&quot;,&quot;title&quot;:&quot;Value stream analytics&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/value_stream_analytics&quot;,&quot;link_classes&quot;:&quot;shortcuts-project-cycle-analytics&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;contributors&quot;,&quot;title&quot;:&quot;Contributor analytics&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/graphs/master?ref_type=heads&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;ci_cd_analytics&quot;,&quot;title&quot;:&quot;CI/CD analytics&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/pipelines/charts&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;repository_analytics&quot;,&quot;title&quot;:&quot;Repository analytics&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/graphs/master/charts&quot;,&quot;link_classes&quot;:&quot;shortcuts-repository-charts&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;code_review&quot;,&quot;title&quot;:&quot;Code review analytics&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/analytics/code_reviews&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;issues&quot;,&quot;title&quot;:&quot;Issue analytics&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/analytics/issues_analytics&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;insights&quot;,&quot;title&quot;:&quot;Insights&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/insights/&quot;,&quot;link_classes&quot;:&quot;shortcuts-project-insights&quot;,&quot;is_active&quot;:false},{&quot;id&quot;:&quot;model_experiments&quot;,&quot;title&quot;:&quot;Model experiments&quot;,&quot;link&quot;:&quot;/apparmor/apparmor/-/ml/experiments&quot;,&quot;is_active&quot;:false}],&quot;separated&quot;:false}],&quot;current_context_header&quot;:&quot;Project&quot;,&quot;support_path&quot;:&quot;https://about.gitlab.com/get-help/&quot;,&quot;docs_path&quot;:&quot;/help/docs&quot;,&quot;display_whats_new&quot;:true,&quot;show_version_check&quot;:null,&quot;search&quot;:{&quot;search_path&quot;:&quot;/search&quot;,&quot;issues_path&quot;:&quot;/dashboard/issues&quot;,&quot;mr_path&quot;:&quot;/dashboard/merge_requests&quot;,&quot;autocomplete_path&quot;:&quot;/search/autocomplete&quot;,&quot;settings_path&quot;:&quot;/search/settings&quot;,&quot;search_context&quot;:{&quot;group&quot;:{&quot;id&quot;:2118303,&quot;name&quot;:&quot;AppArmor&quot;,&quot;full_name&quot;:&quot;AppArmor&quot;},&quot;group_metadata&quot;:{&quot;issues_path&quot;:&quot;/groups/apparmor/-/issues&quot;,&quot;mr_path&quot;:&quot;/groups/apparmor/-/merge_requests&quot;},&quot;project&quot;:{&quot;id&quot;:4484878,&quot;name&quot;:&quot;apparmor&quot;},&quot;project_metadata&quot;:{&quot;mr_path&quot;:&quot;/apparmor/apparmor/-/merge_requests&quot;,&quot;issues_path&quot;:&quot;/apparmor/apparmor/-/issues&quot;},&quot;code_search&quot;:false,&quot;scope&quot;:&quot;wiki_blobs&quot;,&quot;for_snippets&quot;:null}},&quot;panel_type&quot;:&quot;project&quot;,&quot;shortcut_links&quot;:[{&quot;title&quot;:&quot;Snippets&quot;,&quot;href&quot;:&quot;/explore/snippets&quot;,&quot;css_class&quot;:&quot;dashboard-shortcuts-snippets&quot;},{&quot;title&quot;:&quot;Groups&quot;,&quot;href&quot;:&quot;/explore/groups&quot;,&quot;css_class&quot;:&quot;dashboard-shortcuts-groups&quot;},{&quot;title&quot;:&quot;Projects&quot;,&quot;href&quot;:&quot;/explore/projects/starred&quot;,&quot;css_class&quot;:&quot;dashboard-shortcuts-projects&quot;}],&quot;terms&quot;:&quot;/-/users/terms&quot;}"></aside> <div class="content-wrapper"> <div class="broadcast-wrapper"> </div> <div class="alert-wrapper alert-wrapper-top-space gl-flex gl-flex-col gl-gap-3 container-fluid container-limited"> <div class="gl-alert gl-alert-danger gl-alert-not-dismissible" role="alert"> <div class="gl-alert-icon-container"> <svg class="s16 gl-alert-icon gl-alert-icon-no-title" data-testid="error-icon"><use href="/assets/icons-aa2c8ddf99d22b77153ca2bb092a23889c12c597fc8b8de94b0f730eb53513f6.svg#error"></use></svg> </div> <div class="gl-alert-content" role="alert"> <div class="gl-alert-body"> GitLab may not work properly, because you are using an outdated web browser. <br> Please install a <a target="_blank" rel="noopener noreferrer" href="/help/install/requirements.md#supported-web-browsers">supported web browser</a> for a better experience. </div> </div> </div> </div> <div class="top-bar-fixed container-fluid" data-testid="top-bar"> <div class="top-bar-container gl-flex gl-items-center gl-gap-2"> <div class="gl-grow gl-basis-0 gl-flex gl-items-center gl-justify-start gl-gap-3"> <button class="gl-button btn btn-icon btn-md btn-default btn-default-tertiary js-super-sidebar-toggle-expand super-sidebar-toggle -gl-ml-3" aria-controls="super-sidebar" aria-expanded="false" aria-label="Primary navigation sidebar" type="button"><svg class="s16 gl-icon gl-button-icon " data-testid="sidebar-icon"><use href="/assets/icons-aa2c8ddf99d22b77153ca2bb092a23889c12c597fc8b8de94b0f730eb53513f6.svg#sidebar"></use></svg> </button> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"AppArmor","item":"https://gitlab.com/apparmor"},{"@type":"ListItem","position":2,"name":"apparmor","item":"https://gitlab.com/apparmor/apparmor"},{"@type":"ListItem","position":3,"name":"Wiki","item":"https://gitlab.com/apparmor/apparmor/-/wikis/home"},{"@type":"ListItem","position":4,"name":"Profiling_with_tools","item":"https://gitlab.com/apparmor/apparmor/-/wikis/Profiling_with_tools"}]} </script> <div data-testid="breadcrumb-links" id="js-vue-page-breadcrumbs-wrapper"> <div data-breadcrumbs-json="[{&quot;text&quot;:&quot;AppArmor&quot;,&quot;href&quot;:&quot;/apparmor&quot;,&quot;avatarPath&quot;:&quot;/uploads/-/system/group/avatar/2118303/apparmor-red-diag_1w2h.png&quot;},{&quot;text&quot;:&quot;apparmor&quot;,&quot;href&quot;:&quot;/apparmor/apparmor&quot;,&quot;avatarPath&quot;:&quot;/uploads/-/system/project/avatar/4484878/apparmor-red-diag_1w2h.png&quot;},{&quot;text&quot;:&quot;Wiki&quot;,&quot;href&quot;:&quot;/apparmor/apparmor/-/wikis/home&quot;,&quot;avatarPath&quot;:null},{&quot;text&quot;:&quot;Profiling_with_tools&quot;,&quot;href&quot;:&quot;/apparmor/apparmor/-/wikis/Profiling_with_tools&quot;,&quot;avatarPath&quot;:null}]" id="js-vue-page-breadcrumbs"></div> <div id="js-injected-page-breadcrumbs"></div> </div> </div> <div class="gl-flex-none gl-flex gl-items-center gl-justify-center"> <div id="js-advanced-search-modal"></div> </div> <div class="gl-grow gl-basis-0 gl-flex gl-items-center gl-justify-end"> <div id="js-work-item-feedback"></div> </div> </div> </div> <div class="container-fluid container-limited limit-container-width project-highlight-puc"> <main class="content" id="content-body" itemscope itemtype="http://schema.org/SoftwareSourceCode"> <div class="flash-container flash-container-page sticky" data-testid="flash-container"> <div id="js-global-alerts"></div> </div> <div data-author-url="https://gitlab.com/smb" data-clone-http-url="https://gitlab.com/apparmor/apparmor.wiki.git" data-clone-ssh-url="git@gitlab.com:apparmor/apparmor.wiki.git" data-content-api="/api/v4/projects/4484878/wikis/Profiling_with_tools?version=620d1792f692f63ae57ef5af82c043b08bcfb883" data-edit-button-url="/apparmor/apparmor/-/wikis/Profiling_with_tools/edit" data-format-options="{&quot;Markdown&quot;:&quot;markdown&quot;,&quot;RDoc&quot;:&quot;rdoc&quot;,&quot;AsciiDoc&quot;:&quot;asciidoc&quot;,&quot;Org&quot;:&quot;org&quot;}" data-history-url="/apparmor/apparmor/-/wikis/Profiling_with_tools/history" data-is-page-historical="false" data-is-page-template="false" data-last-version="#&lt;Commit:0x00007c188b37c588&gt;" data-new-url="/apparmor/apparmor/-/wikis/new" data-page-heading="Profiling_with_tools" data-page-info="{&quot;last_commit_sha&quot;:&quot;0903bc11807dda9f47b1949a6e4a81a0fe918025&quot;,&quot;persisted&quot;:true,&quot;title&quot;:&quot;Profiling_with_tools&quot;,&quot;content&quot;:&quot;Creating a new profile\n======================\n\nThe process and tools have been tested on Ubuntu 10.04 LTS with\nAppArmor 2.5.1.\n\nTest plan\n---------\n\nIn order to successfully profile a program so that it is usable for\nyou, you must exercise the program fully while using AppArmor in\ncomplain mode. For example, this will typically include:\n\n- Starting the application\n- Stopping the application\n- Restarting the application\n- Go through the man page or help and use all command-line options\n- Use different parts of the application. Eg, in the case of Evolution, you will want to test email, addressbook and calendars\n\nBasic process\n-------------\n\n1. If not using auditd, temporarily disable kernel rate limiting on logs:\n\n ```\n # sysctl -w kernel.printk_ratelimit=0\n ```\n\n2. Start aa-genprof in a terminal. E.G.:\n\n ```\n $ sudo aa-genprof \u003cpath to executable\u003e\n ```\n\n3. Execute your test plan (in another terminal if it is a terminal application)\n4. Go back to aa-genprof, and follow the instructions for updating policy\n5. Put the profile into complain mode and use aa-logprof to fine-tune the profile. The better the application was exercised to begin with, the less fine-tuning is required\n6. If the profile is in complain mode, put the profile into enforce mode with aa-enforce\n7. Monitor the logs (optionally using aa-notify) and adjust the profile manually as necessary\n\n### Caveats\n\nCurrently the tools do not properly utilize variables such as @{PROC},\nand @{HOME}, so you may want to adjust the profile after to use\nabstractions that the tools could not discover.\n\nIt is important to note that aa-logprof will only detect complaints\nwhen the application is exercised with the profile in complain mode. It\nwill not pick up denials from an enforcing profile (confirmed on\n2.5.1 - 2.7.0).\n\nExample: confining Evolution\n----------------------------\n\n1. Disable kernel rate limiting:\n\n ```\n $ sudo sysctl -w kernel.printk_ratelimit=0\n ```\n\n2. Start aa-genprof in a terminal. You will be prompted to access the profile repository. For now, disable it. Eg:\n\n ```\n $ sudo aa-genprof /usr/bin/evolution\n ```\n\n3. Execute the test plan (see above). In this case:\n - Start Evolution\n - Create an email account with the wizard\n - Get email\n - Send email\n - Print an email\n - Delete an email\n - Close evolution\n - Add a contact\n - Add a task\n - Add a memo\n - Add a calendar entry\n - Access a web calendar\n - use evolution --force-shutdown\n4. go back to aa-genprof, and follow the instructions for updating policy:\n 1. First, (S)can system logs\n 2. Then, (F)inish\n5. Put the profile into complain mode using &#39;aa-complain /etc/apparmor.d/usr.bin.evolution&#39; then exercise the application more to fine-tune the profile\n6. Use aa-logprof to fine-tune the profile. The better the application was exercised to begin with, the less fine-tuning is required\n7. When satisfied, put the profile into enforce mode with aa-enforce\n8. Monitor the logs and adjust the profile manually as necessary\n\nAfter a pass with aa-genprof/aa-logprof in complain mode and then more fine-tuning with aa-logprof, the resulting profile is (with several new rules added for globbing):\n\n```\n # Last Modified: Mon Dec 20 21:43:45 2010\n #include \u003ctunables/global\u003e\n\n /usr/bin/evolution {\n #include \u003cabstractions/audio\u003e\n #include \u003cabstractions/base\u003e\n #include \u003cabstractions/fonts\u003e\n #include \u003cabstractions/gnome\u003e\n #include \u003cabstractions/nameservice\u003e\n #include \u003cabstractions/python\u003e\n\n deny /boot/initrd.img-2.6.32-26-generic r,\n deny /boot/vmlinuz-2.6.32-26-generic r,\n deny /etc/python2.6/sitecustomize.py r,\n deny owner /home/jamie/.bash_history r,\n deny owner /home/jamie/.bash_logout r,\n deny owner /home/jamie/.bashrc r,\n deny owner /home/jamie/.profile r,\n deny owner /home/jamie/.sudo_as_admin_successful r,\n deny owner /home/jamie/.xsession-errors r,\n\n /**/ r,\n /etc/timezone r,\n owner /home/*/.ICEauthority r,\n owner /home/*/.camel_certs/ w,\n owner /home/*/.camel_certs/* rw,\n owner /home/*/.config/enchant/ rw,\n owner /home/*/.config/enchant/* rwk,\n owner /home/*/.config/user-dirs.dirs r,\n owner /home/*/.esd_auth r,\n owner /home/*/.evolution/** rwlk,\n owner /home/*/.gnome2/accels/evolution rw,\n owner /home/*/.goutputstream-* rw,\n owner /home/*/.gtk-bookmarks r,\n owner /home/*/.pulse-cookie r,\n owner /home/*/.recently-used.xbel* rw,\n owner /home/*/Public/* w,\n /proc/filesystems r,\n /usr/bin/evince Ux,\n /usr/lib/evolution/2.28/killev cx,\n /usr/share/enchant/* r,\n /usr/share/evolution-data-server-*/** r,\n /usr/share/evolution/** r,\n /usr/share/gtkhtml-*/** r,\n /usr/share/hunspell/* r,\n /usr/share/xml/iso-codes/* r,\n /var/lib/dbus/machine-id r,\n\n profile /usr/lib/evolution/2.28/killev {\n #include \u003cabstractions/base\u003e\n #include \u003cabstractions/gnome\u003e\n #include \u003cabstractions/nameservice\u003e\n\n capability sys_ptrace,\n\n /**/ r,\n /bin/dash rix,\n /proc/*/cmdline r,\n /proc/*/stat r,\n /proc/filesystems r,\n /usr/bin/killall rix,\n }\n }\n```\n\nThe tools did not pick up a few abstractions that use variables, such as:\n\n- base: @{PROC}/filesystem\n- X: @{HOME}/.ICEauthority r,\n- audio: owner @{HOME}/.pulse-cookie rwk,\n- gnome: @{HOME}/.gtk-bookmarks r,\n- freedesktop.org: @{HOME}/.recently-used.xbel\\* rw\n\nAlso, there are a few &#39;deny&#39; rules that aren&#39;t strictly required. These\ncould be hand edited, but the above demonstrates that while the tools\ndid not generate an optimized profile, they did generate a working\nprofile for Evolution. While the above works for the test cases given,\nit should not be considered a complete profile. Often you need to use\nthe application for several days or more to be sure there aren&#39;t any\nprofile bugs remaining.\n\nModifying an existing profile\n=============================\n\n- Monitor the system for AppArmor denials\n - dmesg, /var/log/kern.log, /var/log/messages, etc\n - aa-notify\n- Run aa-logprof in a terminal to update the policy, as necessary\n\n**NOTE:** the tools currently don&#39;t have a way to skip a rule at the\nmoment, so the may add in more &#39;deny&#39; rules than you might want. Also,\nthe tools don&#39;t currently examine the &#39;Last Modified:&#39; date in the\nprofile so anything in the current logs since the last rotation will\nkeep showing up in aa-logprof (which can be a problem if using an\nold logfile with a profile that uses abstractions with variable names\nthat aa-logprof won&#39;t recognize). The current workaround is to either\nhand edit or extract the logs from where you want aa-logprof to look,\nand then use `aa-logprof -f \u003clogfile\u003e`.\n&quot;,&quot;front_matter&quot;:{},&quot;format&quot;:&quot;markdown&quot;,&quot;uploads_path&quot;:&quot;https://gitlab.com/api/v4/projects/4484878/wikis/attachments&quot;,&quot;slug&quot;:&quot;Profiling_with_tools&quot;,&quot;path&quot;:&quot;/apparmor/apparmor/-/wikis/Profiling_with_tools&quot;,&quot;wiki_path&quot;:&quot;/apparmor/apparmor/-/wikis/home&quot;,&quot;help_path&quot;:&quot;/help/user/project/wiki/_index.md&quot;,&quot;markdown_help_path&quot;:&quot;/help/user/markdown.md&quot;,&quot;markdown_preview_path&quot;:&quot;/apparmor/apparmor/-/wikis/Profiling_with_tools/preview_markdown&quot;,&quot;create_path&quot;:&quot;/apparmor/apparmor/-/wikis&quot;}" data-page-persisted="false" data-page-version="{&quot;id&quot;:&quot;0903bc11807dda9f47b1949a6e4a81a0fe918025&quot;,&quot;message&quot;:&quot;Profiling_with_tools: initial markdown conversion\n&quot;,&quot;parent_ids&quot;:[&quot;2d58c6b17602ca30ca971616d99abaaadcd8b589&quot;],&quot;authored_date&quot;:&quot;2017-11-08T01:55:55.000-08:00&quot;,&quot;author_name&quot;:&quot;Steve Beattie&quot;,&quot;author_email&quot;:&quot;steve.beattie@canonical.com&quot;,&quot;committed_date&quot;:&quot;2017-11-08T01:55:55.000-08:00&quot;,&quot;committer_name&quot;:&quot;Steve Beattie&quot;,&quot;committer_email&quot;:&quot;steve.beattie@canonical.com&quot;,&quot;trailers&quot;:{},&quot;extended_trailers&quot;:{},&quot;referenced_by&quot;:[]}" data-show-edit-button="false" data-templates="[]" data-templates-url="/apparmor/apparmor/-/wikis/templates" data-testid="wiki-page-content-app" data-wiki-path="apparmor.wiki" data-wiki-url="/apparmor/apparmor/-/wikis/Profiling_with_tools" id="js-vue-wiki-content-app"></div> <div data-container-id="4484878" data-container-type="project" data-current-user-data="null" data-markdown-preview-path="/apparmor/apparmor/-/preview_markdown" data-noteable-type="Wiki" data-notes-filters="{&quot;Show all activity&quot;:0,&quot;Show comments only&quot;:1,&quot;Show history only&quot;:2}" data-page-info="{&quot;last_commit_sha&quot;:&quot;0903bc11807dda9f47b1949a6e4a81a0fe918025&quot;,&quot;persisted&quot;:true,&quot;title&quot;:&quot;Profiling_with_tools&quot;,&quot;content&quot;:&quot;Creating a new profile\n======================\n\nThe process and tools have been tested on Ubuntu 10.04 LTS with\nAppArmor 2.5.1.\n\nTest plan\n---------\n\nIn order to successfully profile a program so that it is usable for\nyou, you must exercise the program fully while using AppArmor in\ncomplain mode. For example, this will typically include:\n\n- Starting the application\n- Stopping the application\n- Restarting the application\n- Go through the man page or help and use all command-line options\n- Use different parts of the application. Eg, in the case of Evolution, you will want to test email, addressbook and calendars\n\nBasic process\n-------------\n\n1. If not using auditd, temporarily disable kernel rate limiting on logs:\n\n ```\n # sysctl -w kernel.printk_ratelimit=0\n ```\n\n2. Start aa-genprof in a terminal. E.G.:\n\n ```\n $ sudo aa-genprof \u003cpath to executable\u003e\n ```\n\n3. Execute your test plan (in another terminal if it is a terminal application)\n4. Go back to aa-genprof, and follow the instructions for updating policy\n5. Put the profile into complain mode and use aa-logprof to fine-tune the profile. The better the application was exercised to begin with, the less fine-tuning is required\n6. If the profile is in complain mode, put the profile into enforce mode with aa-enforce\n7. Monitor the logs (optionally using aa-notify) and adjust the profile manually as necessary\n\n### Caveats\n\nCurrently the tools do not properly utilize variables such as @{PROC},\nand @{HOME}, so you may want to adjust the profile after to use\nabstractions that the tools could not discover.\n\nIt is important to note that aa-logprof will only detect complaints\nwhen the application is exercised with the profile in complain mode. It\nwill not pick up denials from an enforcing profile (confirmed on\n2.5.1 - 2.7.0).\n\nExample: confining Evolution\n----------------------------\n\n1. Disable kernel rate limiting:\n\n ```\n $ sudo sysctl -w kernel.printk_ratelimit=0\n ```\n\n2. Start aa-genprof in a terminal. You will be prompted to access the profile repository. For now, disable it. Eg:\n\n ```\n $ sudo aa-genprof /usr/bin/evolution\n ```\n\n3. Execute the test plan (see above). In this case:\n - Start Evolution\n - Create an email account with the wizard\n - Get email\n - Send email\n - Print an email\n - Delete an email\n - Close evolution\n - Add a contact\n - Add a task\n - Add a memo\n - Add a calendar entry\n - Access a web calendar\n - use evolution --force-shutdown\n4. go back to aa-genprof, and follow the instructions for updating policy:\n 1. First, (S)can system logs\n 2. Then, (F)inish\n5. Put the profile into complain mode using &#39;aa-complain /etc/apparmor.d/usr.bin.evolution&#39; then exercise the application more to fine-tune the profile\n6. Use aa-logprof to fine-tune the profile. The better the application was exercised to begin with, the less fine-tuning is required\n7. When satisfied, put the profile into enforce mode with aa-enforce\n8. Monitor the logs and adjust the profile manually as necessary\n\nAfter a pass with aa-genprof/aa-logprof in complain mode and then more fine-tuning with aa-logprof, the resulting profile is (with several new rules added for globbing):\n\n```\n # Last Modified: Mon Dec 20 21:43:45 2010\n #include \u003ctunables/global\u003e\n\n /usr/bin/evolution {\n #include \u003cabstractions/audio\u003e\n #include \u003cabstractions/base\u003e\n #include \u003cabstractions/fonts\u003e\n #include \u003cabstractions/gnome\u003e\n #include \u003cabstractions/nameservice\u003e\n #include \u003cabstractions/python\u003e\n\n deny /boot/initrd.img-2.6.32-26-generic r,\n deny /boot/vmlinuz-2.6.32-26-generic r,\n deny /etc/python2.6/sitecustomize.py r,\n deny owner /home/jamie/.bash_history r,\n deny owner /home/jamie/.bash_logout r,\n deny owner /home/jamie/.bashrc r,\n deny owner /home/jamie/.profile r,\n deny owner /home/jamie/.sudo_as_admin_successful r,\n deny owner /home/jamie/.xsession-errors r,\n\n /**/ r,\n /etc/timezone r,\n owner /home/*/.ICEauthority r,\n owner /home/*/.camel_certs/ w,\n owner /home/*/.camel_certs/* rw,\n owner /home/*/.config/enchant/ rw,\n owner /home/*/.config/enchant/* rwk,\n owner /home/*/.config/user-dirs.dirs r,\n owner /home/*/.esd_auth r,\n owner /home/*/.evolution/** rwlk,\n owner /home/*/.gnome2/accels/evolution rw,\n owner /home/*/.goutputstream-* rw,\n owner /home/*/.gtk-bookmarks r,\n owner /home/*/.pulse-cookie r,\n owner /home/*/.recently-used.xbel* rw,\n owner /home/*/Public/* w,\n /proc/filesystems r,\n /usr/bin/evince Ux,\n /usr/lib/evolution/2.28/killev cx,\n /usr/share/enchant/* r,\n /usr/share/evolution-data-server-*/** r,\n /usr/share/evolution/** r,\n /usr/share/gtkhtml-*/** r,\n /usr/share/hunspell/* r,\n /usr/share/xml/iso-codes/* r,\n /var/lib/dbus/machine-id r,\n\n profile /usr/lib/evolution/2.28/killev {\n #include \u003cabstractions/base\u003e\n #include \u003cabstractions/gnome\u003e\n #include \u003cabstractions/nameservice\u003e\n\n capability sys_ptrace,\n\n /**/ r,\n /bin/dash rix,\n /proc/*/cmdline r,\n /proc/*/stat r,\n /proc/filesystems r,\n /usr/bin/killall rix,\n }\n }\n```\n\nThe tools did not pick up a few abstractions that use variables, such as:\n\n- base: @{PROC}/filesystem\n- X: @{HOME}/.ICEauthority r,\n- audio: owner @{HOME}/.pulse-cookie rwk,\n- gnome: @{HOME}/.gtk-bookmarks r,\n- freedesktop.org: @{HOME}/.recently-used.xbel\\* rw\n\nAlso, there are a few &#39;deny&#39; rules that aren&#39;t strictly required. These\ncould be hand edited, but the above demonstrates that while the tools\ndid not generate an optimized profile, they did generate a working\nprofile for Evolution. While the above works for the test cases given,\nit should not be considered a complete profile. Often you need to use\nthe application for several days or more to be sure there aren&#39;t any\nprofile bugs remaining.\n\nModifying an existing profile\n=============================\n\n- Monitor the system for AppArmor denials\n - dmesg, /var/log/kern.log, /var/log/messages, etc\n - aa-notify\n- Run aa-logprof in a terminal to update the policy, as necessary\n\n**NOTE:** the tools currently don&#39;t have a way to skip a rule at the\nmoment, so the may add in more &#39;deny&#39; rules than you might want. Also,\nthe tools don&#39;t currently examine the &#39;Last Modified:&#39; date in the\nprofile so anything in the current logs since the last rotation will\nkeep showing up in aa-logprof (which can be a problem if using an\nold logfile with a profile that uses abstractions with variable names\nthat aa-logprof won&#39;t recognize). The current workaround is to either\nhand edit or extract the logs from where you want aa-logprof to look,\nand then use `aa-logprof -f \u003clogfile\u003e`.\n&quot;,&quot;front_matter&quot;:{},&quot;format&quot;:&quot;markdown&quot;,&quot;uploads_path&quot;:&quot;https://gitlab.com/api/v4/projects/4484878/wikis/attachments&quot;,&quot;slug&quot;:&quot;Profiling_with_tools&quot;,&quot;path&quot;:&quot;/apparmor/apparmor/-/wikis/Profiling_with_tools&quot;,&quot;wiki_path&quot;:&quot;/apparmor/apparmor/-/wikis/home&quot;,&quot;help_path&quot;:&quot;/help/user/project/wiki/_index.md&quot;,&quot;markdown_help_path&quot;:&quot;/help/user/markdown.md&quot;,&quot;markdown_preview_path&quot;:&quot;/apparmor/apparmor/-/wikis/Profiling_with_tools/preview_markdown&quot;,&quot;create_path&quot;:&quot;/apparmor/apparmor/-/wikis&quot;}" data-register-path="/users/sign_up?redirect_to_referer=yes" data-report-abuse-path="/-/abuse_reports/add_category" data-sign-in-path="/users/sign_in?redirect_to_referer=yes" data-testid="wiki-notes-app" id="js-vue-wiki-notes-app"></div> <aside aria-label="Wiki" class="right-sidebar right-sidebar-expanded wiki-sidebar js-wiki-sidebar js-right-sidebar gl-hidden" data-offset-top="50" data-spy="affix"> <div class="js-wiki-sidebar-resizer"></div> <div class="sidebar-container"> <div class="block gl-mb-3 gl-mx-5 gl-mt-5 gl-block sm:gl-hidden !gl-pt-0"> <a class="gutter-toggle gl-float-right gl-block md:gl-hidden js-sidebar-wiki-toggle" href="#"> <svg class="s16 gl-icon" data-testid="chevron-double-lg-right-icon"><use href="/assets/icons-aa2c8ddf99d22b77153ca2bb092a23889c12c597fc8b8de94b0f730eb53513f6.svg#chevron-double-lg-right"></use></svg> </a> </div> <div class="js-wiki-toc"></div> <div class="blocks-container !gl-px-3 !gl-my-5"> <div class="gl-flex gl-place-content-between gl-items-center gl-pb-3 gl-pr-1 js-wiki-expand-pages-list wiki-list collapsed gl-pl-0"> <div class="gl-flex gl-items-center"> <button class="gl-button btn btn-icon btn-sm btn-default btn-default-tertiary js-wiki-list-expand-button wiki-list-expand-button gl-mr-2" data-testid="expand-pages-list" type="button"><svg class="s16 gl-icon gl-button-icon " data-testid="chevron-right-icon"><use href="/assets/icons-aa2c8ddf99d22b77153ca2bb092a23889c12c597fc8b8de94b0f730eb53513f6.svg#chevron-right"></use></svg> </button> <button class="gl-button btn btn-icon btn-sm btn-default btn-default-tertiary js-wiki-list-collapse-button wiki-list-collapse-button gl-mr-2" data-testid="expand-pages-list" type="button"><svg class="s16 gl-icon gl-button-icon " data-testid="chevron-down-icon"><use href="/assets/icons-aa2c8ddf99d22b77153ca2bb092a23889c12c597fc8b8de94b0f730eb53513f6.svg#chevron-down"></use></svg> </button> <h2 class="gl-text-lg gl-my-0 gl-mr-3">Pages</h2> <span class="gl-badge badge badge-pill badge-muted"><span class="gl-badge-content">428</span></span> </div> </div> <div data-can-create="false" data-has-custom-sidebar="true" data-view-all-pages-path="/apparmor/apparmor/-/wikis/pages" id="js-wiki-sidebar-entries"></div> <div class="gl-px-4 gl-pt-4 gl-pb-2"> <h4 data-sourcepos="1:1-1:66" dir="auto">&#x000A;<a href="#apparmor" aria-hidden="true" class="anchor" id="user-content-apparmor"></a><a data-sourcepos="1:6-1:66" href="https://gitlab.com/apparmor/apparmor/-/wikis/home">AppArmor</a>&#x000A;</h4>&#x000A;<ul data-sourcepos="3:1-19:0" dir="auto">&#x000A;<li data-sourcepos="3:1-3:61"><a data-sourcepos="3:3-3:61" href="https://gitlab.com/apparmor/apparmor/-/wikis/About">About</a></li>&#x000A;<li data-sourcepos="4:1-4:67"><a data-sourcepos="4:3-4:67" href="https://gitlab.com/apparmor/apparmor/-/wikis/Profiles">Profiles</a></li>&#x000A;<li data-sourcepos="5:1-12:104">&#x000A;<a data-sourcepos="5:3-5:77" href="https://gitlab.com/apparmor/apparmor/-/wikis/Documentation">Documentation</a>&#x000A;<ul data-sourcepos="6:3-12:104">&#x000A;<li data-sourcepos="6:3-6:37"><a data-sourcepos="6:5-6:37" href="/apparmor/apparmor/-/wikis/GettingStarted" data-canonical-src="GettingStarted">Getting started</a></li>&#x000A;<li data-sourcepos="7:3-7:68"><a data-sourcepos="7:5-7:68" href="/apparmor/apparmor/-/wikis/QuickProfileLanguage" data-canonical-src="QuickProfileLanguage">Quick guide to AppArmor profile language</a></li>&#x000A;<li data-sourcepos="8:3-8:45"><a data-sourcepos="8:5-8:45" href="/apparmor/apparmor/-/wikis/AppArmorMonitoring" data-canonical-src="AppArmorMonitoring">Monitoring AppArmor</a></li>&#x000A;<li data-sourcepos="9:3-9:71"><a data-sourcepos="9:5-9:71" href="/apparmor/apparmor/-/wikis/Policy_Layout" data-canonical-src="Policy_Layout">AppArmor configuration and policy directory layout</a></li>&#x000A;<li data-sourcepos="10:3-10:69"><a data-sourcepos="10:5-10:69" href="/apparmor/apparmor/-/wikis/AppArmor_Failures" data-canonical-src="AppArmor_Failures">Determining if AppArmor is causing a problem</a></li>&#x000A;<li data-sourcepos="11:3-11:37"><a data-sourcepos="11:5-11:37" href="/apparmor/apparmor/-/wikis/FAQ" data-canonical-src="FAQ">Frequently Asked Questions</a></li>&#x000A;<li data-sourcepos="12:3-12:104"><a data-sourcepos="12:5-12:104" href="https://gitlab.com/apparmor/apparmor/-/wikis/AppArmor_Core_Policy_Reference">Core Policy Reference</a></li>&#x000A;</ul>&#x000A;</li>&#x000A;<li data-sourcepos="13:1-16:79">How To Contribute&#x000A;<ul data-sourcepos="14:3-16:79">&#x000A;<li data-sourcepos="14:3-14:78"><a data-sourcepos="14:5-14:78" href="https://gitlab.com/apparmor/apparmor/-/wikis/CommitPolicy">Commit Policy</a></li>&#x000A;<li data-sourcepos="15:3-15:73"><a data-sourcepos="15:5-15:73" href="https://gitlab.com/apparmor/apparmor/-/wikis/Versioning">Versioning</a></li>&#x000A;<li data-sourcepos="16:3-16:79"><a data-sourcepos="16:5-16:79" href="https://gitlab.com/apparmor/apparmor/-/wikis/Coding%20Style">Coding Style</a></li>&#x000A;</ul>&#x000A;</li>&#x000A;<li data-sourcepos="17:1-17:84"><a data-sourcepos="17:3-17:84" href="https://gitlab.com/apparmor/apparmor/-/wikis/AppArmor_versions">Release Versions</a></li>&#x000A;<li data-sourcepos="18:1-19:0"><a data-sourcepos="18:3-18:77" href="https://gitlab.com/apparmor/apparmor/-/wikis/MeetingAgenda">Meeting Notes</a></li>&#x000A;</ul>&#x000A;<p data-sourcepos="20:1-20:77" dir="auto"><a data-sourcepos="20:1-20:77" href="https://gitlab.com/apparmor/apparmor/-/wikis/pages"><strong data-sourcepos="20:2-20:24">View All Wiki Pages</strong></a></p> </div> </div> </div> </aside> </main> </div> </div> </div> <script nonce="66USbx/BOSTc/Mm+EpdiyQ=="> //<![CDATA[ if ('loading' in HTMLImageElement.prototype) { document.querySelectorAll('img.lazy').forEach(img => { img.loading = 'lazy'; let imgUrl = img.dataset.src; // Only adding width + height for avatars for now if (imgUrl.indexOf('/avatar/') > -1 && imgUrl.indexOf('?') === -1) { const targetWidth = img.getAttribute('width') || img.width; imgUrl += `?width=${targetWidth}`; } img.src = imgUrl; img.removeAttribute('data-src'); img.classList.remove('lazy'); img.classList.add('js-lazy-loaded'); img.dataset.testid = 'js-lazy-loaded-content'; }); } //]]> </script> <script nonce="66USbx/BOSTc/Mm+EpdiyQ=="> //<![CDATA[ gl = window.gl || {}; gl.experiments = {}; //]]> </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10