linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * [RFC 0/5] PoC: convert AppArmor parser to SandBox Mode
           [not found] <fb4a40c7-af9a-406a-95ab-406595f3ffe5@intel.com>
           [not found] ` <20240216152435.1575-1-petrtesarik@huaweicloud.com>
    @ 2024-02-22 13:12 ` Petr Tesarik
      2024-02-22 13:12   ` [RFC 1/5] sbm: x86: fix SBM error entry path Petr Tesarik
                         ` (4 more replies)
      1 sibling, 5 replies; 10+ messages in thread
    From: Petr Tesarik @ 2024-02-22 13:12 UTC (permalink / raw)
      To: Dave Hansen
      Cc: Petr Tesařík, Petr Tesarik, Jonathan Corbet,
    	Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
    	maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT), H. Peter Anvin,
    	Andy Lutomirski, Oleg Nesterov, Peter Zijlstra, Xin Li,
    	Arnd Bergmann, Andrew Morton, Rick Edgecombe, Kees Cook,
    	Masami Hiramatsu (Google), Pengfei Xu, Josh Poimboeuf, Ze Gao,
    	Kirill A. Shutemov, Kai Huang, David Woodhouse, Brian Gerst,
    	Jason Gunthorpe, Joerg Roedel, Mike Rapoport (IBM), Tina Zhang,
    	Jacob Pan, open list:DOCUMENTATION, open list, Roberto Sassu,
    	John Johansen, Paul Moore, James Morris, Serge E. Hallyn,
    	apparmor, linux-security-module, Petr Tesarik
    
    From: Petr Tesarik <petr.tesarik1@huawei-partners.com>
    
    [ For people newly added to Cc, this RFC is a reply to subsystem
      maintainers who asked for a real-world demonstration of how
      SandBox Mode could be used in practice. SandBox Mode itself
      was proposed in these two series (generic and x86):
    
    * https://lore.kernel.org/lkml/20240214113516.2307-1-petrtesarik@huaweicloud.com/T/
    * https://lore.kernel.org/lkml/20240214113035.2117-1-petrtesarik@huaweicloud.com/T/
    ]
    
    This patch series provides an example of running existing kernel code in
    a sandbox. It also adds some fixes and infrastructure to the base series.
    If you only want to see how the conversion itself might look like, skip
    straight to patch 5/5.
    
    Patches 1 and 2 amend the base patch series. Patches 3 and 4 are ported
    from my earlier proof of concept and adapted to work without adding too
    much other code. I am sending a complete WIP patch series so you can
    actually build and run the code.
    
    Disclaimer: This code is not ready for submission. It is incomplete and
    may contain bugs. It is provided here for the sole purpose of demonstrating
    how existing kernel code would be modified to run in a sandbox.
    
    PATCH 1/5 is a bug fix discovered after sending patch series v1.
    PATCH 2/5 allows to map a buffer into the sandbox at its kernel address.
    PATCH 3/5 is required to intercept calls to pre-selected kernel functions.
    PATCH 4/5 implements dynamic allocation in sandbox mode.
    PATCH 5/5 demonstrates how to convert existing kernel code to use SBM.
    
    Petr Tesarik (5):
      sbm: x86: fix SBM error entry path
      sbm: enhance buffer mapping API
      sbm: x86: infrastructure to fix up sandbox faults
      sbm: fix up calls to dynamic memory allocators
      apparmor: parse profiles in sandbox mode
    
     arch/x86/entry/entry_64.S     |  10 ++-
     arch/x86/kernel/sbm/call_64.S |  20 +++++
     arch/x86/kernel/sbm/core.c    | 161 +++++++++++++++++++++++++++++++++-
     arch/x86/kernel/vmlinux.lds.S |   9 ++
     include/linux/sbm.h           |  77 ++++++++++++++++
     kernel/sbm.c                  |  34 +++++++
     mm/slab_common.c              |   3 +-
     mm/slub.c                     |  17 ++--
     mm/vmalloc.c                  |  11 +--
     security/apparmor/crypto.c    |   7 +-
     security/apparmor/policy.c    |  29 ++++--
     security/apparmor/secid.c     |   3 +-
     12 files changed, 352 insertions(+), 29 deletions(-)
    
    -- 
    2.34.1
    
    
    ^ permalink raw reply	[flat|nested] 10+ messages in thread

  • end of thread, other threads:[~2024-02-22 18:03 UTC | newest]
    
    Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <fb4a40c7-af9a-406a-95ab-406595f3ffe5@intel.com>
         [not found] ` <20240216152435.1575-1-petrtesarik@huaweicloud.com>
         [not found]   ` <c65eb8f1-2903-4043-a3ab-945d880043b5@intel.com>
         [not found]     ` <20240216170805.0d0decd5@meshulam.tesarici.cz>
         [not found]       ` <87y1bktjdk.fsf@meer.lwn.net>
    2024-02-16 18:24         ` [RFC 0/8] PGP key parser using SandBox Mode Roberto Sassu
    2024-02-22 13:12 ` [RFC 0/5] PoC: convert AppArmor parser to " Petr Tesarik
    2024-02-22 13:12   ` [RFC 1/5] sbm: x86: fix SBM error entry path Petr Tesarik
    2024-02-22 13:12   ` [RFC 2/5] sbm: enhance buffer mapping API Petr Tesarik
    2024-02-22 13:12   ` [RFC 3/5] sbm: x86: infrastructure to fix up sandbox faults Petr Tesarik
    2024-02-22 13:12   ` [RFC 4/5] sbm: fix up calls to dynamic memory allocators Petr Tesarik
    2024-02-22 15:51     ` Dave Hansen
    2024-02-22 17:57       ` Petr Tesařík
    2024-02-22 18:03         ` Dave Hansen
    2024-02-22 13:12   ` [RFC 5/5] apparmor: parse profiles in sandbox mode Petr Tesarik
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).