LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 09-15-2020, 02:44 PM   #1
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware, OpenBSD
Posts: 1,442

Rep: Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810
Sarpi4 kernel config: apparmor


I have been building my own kernels for a few months now so I am a bit out of the "sarpi loop". Do the latest sarpi kernel configs enable apparmor now? With a 'make bcm2711_defconfig', on 5.4.65 from the Raspbian repo, apparmor is indeed available. The only requirement to activate it once booted is adding to cmdline.txt:

Code:
lsm=apparmor
References:
https://github.com/raspberrypi/linux/pull/1698
and defconfig changes:
https://github.com/raspberrypi/linux...fa6a2e713677b8

I ask because the only devices on my network that aren't using apparmor are the router, file server, and git server. All of those devices are on 24/7 running Slackware. It would be amazing to have apparmor support in SlackwareARM by way of sarpi. I use it on all my x86 and x86_64 machines already. It would just be a matter of making accurate apparmor profiles for each device. If you are interested in apparmor, it is available as a SlackBuild on slackbuilds.org

With that said, I understand that AppArmor is not popular outside of Ubuntu, Debian, and other Debian based systems. It wouldn't come as a surprise to me if sarpi disabled these kernel configs. One can only hope!
 
Old 09-15-2020, 07:56 PM   #2
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 832

Rep: Reputation: 187Reputation: 187
in my PRETTY_NAME="Slackware 14.2" /usr/src/linux/.config
Quote:
# CONFIG_SECURITY_APPARMOR is not set
in my raspi3 sarpi setup, PRETTY_NAME="Slackware 14.2 arm (post 14.2 -current)" /usr/src/linux/.config
Quote:
CONFIG_SECURITY_APPARMOR=y
maybe this what you're asking about?

EDIT oops didn't see you mention sarpi4, not sure about that

Last edited by glorsplitz; 09-15-2020 at 08:01 PM.
 
Old 09-15-2020, 08:58 PM   #3
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware [ARM]
Posts: 413

Rep: Reputation: 245Reputation: 245Reputation: 245
Quote:
Originally Posted by mralk3 View Post
Do the latest sarpi kernel configs enable apparmor now?
Code:
# Automatically generated file; DO NOT EDIT.
# Linux/arm 5.4.65 Kernel Configuration

#
# Security options
#
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
CONFIG_DEFAULT_SECURITY_APPARMOR=y
"Hell, yessir!" I believe is the answer.
 
1 members found this post helpful.
Old 09-15-2020, 09:03 PM   #4
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware, OpenBSD
Posts: 1,442

Original Poster
Rep: Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810
I should clarify because this directly affects Sarpi kernel builds. AppArmor has become apart of the default installation for Debian but had not been enabled in Raspbian. With the new Raspberry Pi OS, apparmor was added recently with a 5.4 kernel upgrade. I think 5.4.61 is the first kernel to see this in the Raspberry pi kernel defconfigs.

For the pi 1 and zero: https://github.com/raspberrypi/linux...mrpi_defconfig
For the Pi 2/3: https://github.com/raspberrypi/linux...2709_defconfig
and the pi 4: https://github.com/raspberrypi/linux...2711_defconfig

All official pi kernel defconfigs now include apparmor support.

Code:
[alk3@miniship hd]$ cd linux-source/linux/
[alk3@miniship linux (rpi-5.4.y)]$ grep APPARMOR .config
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
# CONFIG_SECURITY_APPARMOR_DEBUG is not set
CONFIG_DEFAULT_SECURITY_APPARMOR=y


[alk3@miniship linux (rpi-5.4.y)]$ head -5 Makefile 
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 65
EXTRAVERSION =
[alk3@miniship linux (rpi-5.4.y)]$
Will this remain the default for SARPi kernels?
 
Old 09-15-2020, 09:06 PM   #5
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware, OpenBSD
Posts: 1,442

Original Poster
Rep: Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810
Quote:
Originally Posted by Exaga View Post
"Hell, yessir!" I believe is the answer.
This just made my day! Thanks!

I will be creating apparmor profiles and sharing them here: apparmor-profiles-slackware
 
Old 09-15-2020, 09:09 PM   #6
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware, OpenBSD
Posts: 1,442

Original Poster
Rep: Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810
Quote:
Originally Posted by mralk3 View Post
This just made my day! Thanks!

I will be creating apparmor profiles and sharing them here: apparmor-profiles-slackware
EDIT: The profiles I added are experimental and not ready for production. I am learning a lot about apparmor still. Any contributions welcome.
 
Old 09-15-2020, 09:41 PM   #7
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware [ARM]
Posts: 413

Rep: Reputation: 245Reputation: 245Reputation: 245
Quote:
Originally Posted by mralk3 View Post
This just made my day! Thanks!

I will be creating apparmor profiles and sharing them here: apparmor-profiles-slackware
I know nothing of apparmor. Although it reads like a French/Italian alcoholic beverage you might drink which makes you feel sexeh...

 
Old 09-15-2020, 10:14 PM   #8
mralk3
Senior Member
 
Registered: May 2015
Location: Utah, USA
Distribution: Slackware, OpenBSD
Posts: 1,442

Original Poster
Rep: Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810
It took me a bit to figure out the profiles. The firefox profile was the hardest to configure because the profile shipped with Debian is very out dated. Had to start from scratch. Still, AppArmor is MUCH simpler than SELinux, and is easier to customize.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No audit messages for Apparmor in Syslog after compiling new Kernel 4.10 freshbash Linux - Security 0 05-04-2017 11:51 PM
How do I patch my kernel 3.2 with apparmor kernel patches? alex123456 Ubuntu 3 11-03-2012 02:12 PM
LXer: Linux Kernel 2.6.36 Gets AppArmor LXer Syndicated Linux News 0 10-22-2010 12:00 AM
LXer: AppArmor Is Going Into The Linux 2.6.36 Kernel LXer Syndicated Linux News 0 08-01-2010 09:20 AM
base Kernel compile - how to patch for apparmor/firewall petersk SUSE / openSUSE 7 03-05-2008 02:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 08:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration