linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sam@ravnborg.org (Sam Ravnborg)
To: linux-security-module@vger.kernel.org
Subject: [sparc64] kernel unaligned access at TPC aa_dfa_unpack
Date: Mon, 1 Jan 2018 22:42:45 +0100	[thread overview]
Message-ID: <20180101214245.GA9827@ravnborg.org> (raw)
In-Reply-To: <CADxRZqwo8sL3RtEWRMcHkgkSAnWKeVibLRrtdXU2e8w2Q5KSTQ@mail.gmail.com>

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

  reply	other threads:[~2018-01-01 21:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01 21:11 [sparc64] kernel unaligned access at TPC aa_dfa_unpack Anatoly Pugachev
2018-01-01 21:42 ` Sam Ravnborg [this message]
2018-01-02 13:56   ` Anatoly Pugachev
2018-01-21 19:41 ` Anatoly Pugachev
2018-02-10  8:10   ` Anatoly Pugachev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180101214245.GA9827@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-security-module@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).