* [sparc64] kernel unaligned access at TPC aa_dfa_unpack
@ 2018-01-01 21:11 Anatoly Pugachev
2018-01-01 21:42 ` Sam Ravnborg
2018-01-21 19:41 ` Anatoly Pugachev
0 siblings, 2 replies; 5+ messages in thread
From: Anatoly Pugachev @ 2018-01-01 21:11 UTC (permalink / raw)
To: linux-security-module
Hello!
Using latest git kernel (4.15.0-rc6) , getting the following messages
on LDOM/kernel boot:
[ 7.693653] Kernel unaligned access at TPC[7496d8] aa_dfa_unpack+0x38/0x580
[ 7.693735] Kernel unaligned access at TPC[7496f8] aa_dfa_unpack+0x58/0x580
[ 7.693782] Kernel unaligned access at TPC[749708] aa_dfa_unpack+0x68/0x580
[ 7.693829] Kernel unaligned access at TPC[74973c] aa_dfa_unpack+0x9c/0x580
[ 7.693875] Kernel unaligned access at TPC[749758] aa_dfa_unpack+0xb8/0x580
[ 7.697135] audit: type=1400 audit(1514840016.480:2):
apparmor="STATUS" operation="profile_load" profile="unconfined"
name="/usr/sbin/tcpdump" pid=507 comm="apparmor_parser"
Can someone please look, what could cause unaligned access at this
aa_dfa_unpack function/structure ?
kernel config for apparmor is the following:
$ grep APPARMOR /boot/config-4.15.0-rc6
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
CONFIG_SECURITY_APPARMOR_DEBUG=y
CONFIG_SECURITY_APPARMOR_DEBUG_ASSERTS=y
# CONFIG_SECURITY_APPARMOR_DEBUG_MESSAGES is not set
CONFIG_DEFAULT_SECURITY_APPARMOR=y
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sparc64] kernel unaligned access at TPC aa_dfa_unpack
2018-01-01 21:11 [sparc64] kernel unaligned access at TPC aa_dfa_unpack Anatoly Pugachev
@ 2018-01-01 21:42 ` Sam Ravnborg
2018-01-02 13:56 ` Anatoly Pugachev
2018-01-21 19:41 ` Anatoly Pugachev
1 sibling, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2018-01-01 21:42 UTC (permalink / raw)
To: linux-security-module
Hi Anatoly.
On Tue, Jan 02, 2018 at 12:11:49AM +0300, Anatoly Pugachev wrote:
> Hello!
>
> Using latest git kernel (4.15.0-rc6) , getting the following messages
> on LDOM/kernel boot:
>
> [ 7.693653] Kernel unaligned access at TPC[7496d8] aa_dfa_unpack+0x38/0x580
> [ 7.693735] Kernel unaligned access at TPC[7496f8] aa_dfa_unpack+0x58/0x580
> [ 7.693782] Kernel unaligned access at TPC[749708] aa_dfa_unpack+0x68/0x580
> [ 7.693829] Kernel unaligned access at TPC[74973c] aa_dfa_unpack+0x9c/0x580
> [ 7.693875] Kernel unaligned access at TPC[749758] aa_dfa_unpack+0xb8/0x580
> [ 7.697135] audit: type=1400 audit(1514840016.480:2):
> apparmor="STATUS" operation="profile_load" profile="unconfined"
> name="/usr/sbin/tcpdump" pid=507 comm="apparmor_parser"
>
>
> Can someone please look, what could cause unaligned access at this
> aa_dfa_unpack function/structure ?
A quick guess would be that you are using nulldfa.
And this variable may not be aligned.
Try to check the address of nulldfa_src.
You could also try to force the compiler to align the data
to 8 byte like this (security/apparmor/match.c):
static char nulldfa_src[] = {
#include "nulldfa.in"
} __aligned(8); <= see the added __aligned(8)
This is just from a quick look at things, but please try it to
see if this is the problematic spot.
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info@ http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sparc64] kernel unaligned access at TPC aa_dfa_unpack
2018-01-01 21:42 ` Sam Ravnborg
@ 2018-01-02 13:56 ` Anatoly Pugachev
0 siblings, 0 replies; 5+ messages in thread
From: Anatoly Pugachev @ 2018-01-02 13:56 UTC (permalink / raw)
To: linux-security-module
On Tue, Jan 2, 2018 at 12:42 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
> Hi Anatoly.
>
> On Tue, Jan 02, 2018 at 12:11:49AM +0300, Anatoly Pugachev wrote:
>> Hello!
>>
>> Using latest git kernel (4.15.0-rc6) , getting the following messages
>> on LDOM/kernel boot:
>>
>> [ 7.693653] Kernel unaligned access at TPC[7496d8] aa_dfa_unpack+0x38/0x580
>> [ 7.693735] Kernel unaligned access at TPC[7496f8] aa_dfa_unpack+0x58/0x580
>> [ 7.693782] Kernel unaligned access at TPC[749708] aa_dfa_unpack+0x68/0x580
>> [ 7.693829] Kernel unaligned access at TPC[74973c] aa_dfa_unpack+0x9c/0x580
>> [ 7.693875] Kernel unaligned access at TPC[749758] aa_dfa_unpack+0xb8/0x580
>> [ 7.697135] audit: type=1400 audit(1514840016.480:2):
>> apparmor="STATUS" operation="profile_load" profile="unconfined"
>> name="/usr/sbin/tcpdump" pid=507 comm="apparmor_parser"
>>
>>
>> Can someone please look, what could cause unaligned access at this
>> aa_dfa_unpack function/structure ?
>
> A quick guess would be that you are using nulldfa.
> And this variable may not be aligned.
>
> Try to check the address of nulldfa_src.
>
> You could also try to force the compiler to align the data
> to 8 byte like this (security/apparmor/match.c):
>
> static char nulldfa_src[] = {
> #include "nulldfa.in"
> } __aligned(8); <= see the added __aligned(8)
>
> This is just from a quick look at things, but please try it to
> see if this is the problematic spot.
Sam,
this doesn't work:
$ make
...
CC security/apparmor/match.o
In file included from ./include/linux/compiler_types.h:58:0,
from ./include/linux/linkage.h:5,
from ./include/linux/kernel.h:7,
from security/apparmor/match.c:16:
./include/linux/compiler-gcc.h:123:23: error: expected ?,? or ?;?
before ?__attribute__?
#define __aligned(x) __attribute__((aligned(x)))
^
security/apparmor/match.c:30:3: note: in expansion of macro ?__aligned?
} __aligned(8);
^~~~~~~~~
scripts/Makefile.build:310: recipe for target 'security/apparmor/match.o' failed
$ git diff
diff --git a/security/apparmor/match.c b/security/apparmor/match.c
index 72c604350e80..8f42ab8fc365 100644
--- a/security/apparmor/match.c
+++ b/security/apparmor/match.c
@@ -27,7 +27,7 @@
static char nulldfa_src[] = {
#include "nulldfa.in"
-};
+} __aligned(8);
struct aa_dfa *nulldfa;
int aa_setup_dfa_engine(void)
~/linux-2.6$
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [sparc64] kernel unaligned access at TPC aa_dfa_unpack
2018-01-01 21:11 [sparc64] kernel unaligned access at TPC aa_dfa_unpack Anatoly Pugachev
2018-01-01 21:42 ` Sam Ravnborg
@ 2018-01-21 19:41 ` Anatoly Pugachev
2018-02-10 8:10 ` Anatoly Pugachev
1 sibling, 1 reply; 5+ messages in thread
From: Anatoly Pugachev @ 2018-01-21 19:41 UTC (permalink / raw)
To: linux-security-module
On Tue, Jan 2, 2018 at 12:11 AM, Anatoly Pugachev <matorola@gmail.com> wrote:
> Hello!
>
> Using latest git kernel (4.15.0-rc6) , getting the following messages
> on LDOM/kernel boot:
>
> [ 7.693653] Kernel unaligned access at TPC[7496d8] aa_dfa_unpack+0x38/0x580
> [ 7.693735] Kernel unaligned access at TPC[7496f8] aa_dfa_unpack+0x58/0x580
> [ 7.693782] Kernel unaligned access at TPC[749708] aa_dfa_unpack+0x68/0x580
> [ 7.693829] Kernel unaligned access at TPC[74973c] aa_dfa_unpack+0x9c/0x580
> [ 7.693875] Kernel unaligned access at TPC[749758] aa_dfa_unpack+0xb8/0x580
> [ 7.697135] audit: type=1400 audit(1514840016.480:2):
> apparmor="STATUS" operation="profile_load" profile="unconfined"
> name="/usr/sbin/tcpdump" pid=507 comm="apparmor_parser"
git bisect'ed to this:
~/linux-2.6$ git bisect bad
80c094a47dd4ea63375e3f60b5e076064f16e857 is the first bad commit
commit 80c094a47dd4ea63375e3f60b5e076064f16e857
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Thu Oct 26 19:35:35 2017 +0200
Revert "apparmor: add base infastructure for socket mediation"
This reverts commit 651e28c5537abb39076d3949fb7618536f1d242e.
This caused a regression:
"The specific problem is that dnsmasq refuses to start on openSUSE Leap
42.2. The specific cause is that and attempt to open a PF_LOCAL socket
gets EACCES. This means that networking doesn't function on a system
with a 4.14-rc2 system."
Sadly, the developers involved seemed to be in denial for several weeks
about this, delaying the revert. This has not been a good release for
the security subsystem, and this area needs to change development
practices.
Reported-and-bisected-by: James Bottomley
<James.Bottomley@hansenpartnership.com>
Tracked-by: Thorsten Leemhuis <regressions@leemhuis.info>
Cc: John Johansen <john.johansen@canonical.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
:040000 040000 c431996039c7b63f7a58b881a65f4a7d21b452a9
ac6a6f38c0b189b4f822838fcab8a6af52169059 M security
~/linux-2.6$ git bisect log
git bisect start
# good: [5771a8c08880cdca3bfb4a3fc6d309d6bba20877] Linux v4.13-rc1
git bisect good 5771a8c08880cdca3bfb4a3fc6d309d6bba20877
# bad: [dda3e15231b35840fe6f0973f803cc70ddb86281] Merge branch 'fixes'
of git://git.armlinux.org.uk/~rmk/linux-arm
git bisect bad dda3e15231b35840fe6f0973f803cc70ddb86281
# good: [4dce3c4b9b581c4e54d3de083e1a97cb8ebf8c16] Merge tag
'extcon-next-for-4.15' of
git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into
usb-next
git bisect good 4dce3c4b9b581c4e54d3de083e1a97cb8ebf8c16
# bad: [5d352e69c60e54b5f04d6e337a1d2bf0dbf3d94a] Merge tag
'media/v4.15-1' of
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
git bisect bad 5d352e69c60e54b5f04d6e337a1d2bf0dbf3d94a
# bad: [4008e6a9bcee2f3b61bb11951de0fb0ed764cb91] Merge branch
'i2c/for-4.15' of
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wsa/linux
git bisect bad 4008e6a9bcee2f3b61bb11951de0fb0ed764cb91
# bad: [3c073991eb417b6f785ddc6afbbdc369eb84aa6a] Merge tag
'devprop-4.15-rc1' of
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
git bisect bad 3c073991eb417b6f785ddc6afbbdc369eb84aa6a
# bad: [d60a540ac5f2fbab3e6fe592717b445bd7343a91] Merge branch
'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
git bisect bad d60a540ac5f2fbab3e6fe592717b445bd7343a91
# bad: [3fefc31843cfe2b5f072efe11ed9ccaf6a7a5092] Merge tag
'pm-final-4.14' of
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
git bisect bad 3fefc31843cfe2b5f072efe11ed9ccaf6a7a5092
# bad: [2b7cda9c35d3b940eb9ce74b30bbd5eb30db493d] tcp: fix
tcp_mtu_probe() vs highest_sack
git bisect bad 2b7cda9c35d3b940eb9ce74b30bbd5eb30db493d
# bad: [22450e03acf18ef0dbdbbc155f0f97f105bf6878] Merge tag
'pci-v4.14-fixes-6' of
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
git bisect bad 22450e03acf18ef0dbdbbc155f0f97f105bf6878
# bad: [02c7dfc006a6e3f4a169f98b8f6c5703756d0072] Merge branch
'perf-urgent-for-linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
git bisect bad 02c7dfc006a6e3f4a169f98b8f6c5703756d0072
# good: [4ed590271a65b0fbe3eb1cf828ad5af16603c8ce] Merge tag
'xfs-4.14-fixes-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
git bisect good 4ed590271a65b0fbe3eb1cf828ad5af16603c8ce
# good: [832c6b18f904b96f494d43d6023db68c9f330cf0] Merge tag
'spi-fix-v4.14-rc5' of
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
git bisect good 832c6b18f904b96f494d43d6023db68c9f330cf0
# good: [3b5a9a8e654c3695e7b499b0784341f299adef48] Merge branch
'for-linus' of git://git.kernel.dk/linux-block
git bisect good 3b5a9a8e654c3695e7b499b0784341f299adef48
# bad: [15f859ae5c43c7f0a064ed92d33f7a5bc5de6de0] Merge tag
'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
git bisect bad 15f859ae5c43c7f0a064ed92d33f7a5bc5de6de0
# good: [567825502730b6bc108f926bdb1cf2de7ae436ca] Merge tag
'pm-4.14-rc7' of
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
git bisect good 567825502730b6bc108f926bdb1cf2de7ae436ca
# good: [b4d91aeb6e120b7e2f207021c31b914895c69bc4] RDMA/netlink: OOPs
in rdma_nl_rcv_msg() from misinterpreted flag
git bisect good b4d91aeb6e120b7e2f207021c31b914895c69bc4
# bad: [80c094a47dd4ea63375e3f60b5e076064f16e857] Revert "apparmor:
add base infastructure for socket mediation"
git bisect bad 80c094a47dd4ea63375e3f60b5e076064f16e857
# first bad commit: [80c094a47dd4ea63375e3f60b5e076064f16e857] Revert
"apparmor: add base infastructure for socket mediation"
where "bad" is dmesg with "Kernel unaligned access at TPC[xxx]
aa_dfa_unpack" message ,
and "good" where is no such messages.
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [sparc64] kernel unaligned access at TPC aa_dfa_unpack
2018-01-21 19:41 ` Anatoly Pugachev
@ 2018-02-10 8:10 ` Anatoly Pugachev
0 siblings, 0 replies; 5+ messages in thread
From: Anatoly Pugachev @ 2018-02-10 8:10 UTC (permalink / raw)
To: linux-security-module
On Sun, Jan 21, 2018 at 10:41 PM, Anatoly Pugachev <matorola@gmail.com> wrote:
> On Tue, Jan 2, 2018 at 12:11 AM, Anatoly Pugachev <matorola@gmail.com> wrote:
>> Hello!
>>
>> Using latest git kernel (4.15.0-rc6) , getting the following messages
>> on LDOM/kernel boot:
>>
>> [ 7.693653] Kernel unaligned access at TPC[7496d8] aa_dfa_unpack+0x38/0x580
>> [ 7.693735] Kernel unaligned access at TPC[7496f8] aa_dfa_unpack+0x58/0x580
>> [ 7.693782] Kernel unaligned access at TPC[749708] aa_dfa_unpack+0x68/0x580
>> [ 7.693829] Kernel unaligned access at TPC[74973c] aa_dfa_unpack+0x9c/0x580
>> [ 7.693875] Kernel unaligned access at TPC[749758] aa_dfa_unpack+0xb8/0x580
https://bugzilla.kernel.org/show_bug.cgi?id=198743
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-02-10 8:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-01 21:11 [sparc64] kernel unaligned access at TPC aa_dfa_unpack Anatoly Pugachev
2018-01-01 21:42 ` Sam Ravnborg
2018-01-02 13:56 ` Anatoly Pugachev
2018-01-21 19:41 ` Anatoly Pugachev
2018-02-10 8:10 ` Anatoly Pugachev
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).