Re: [PATCH v3] selinux: policydb - fix byte order and alignment issues

2018-10-17 Thread William Roberts
On Wed, Oct 17, 2018 at 7:19 AM Ondrej Mosnacek wrote: > > Do the LE conversions before doing the Infiniband-related range checks. > The incorrect checks are otherwise causing a failure to load any policy > with an ibendportcon rule on BE systems. This can be reproduced by > running (on e.g.

Re: [PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread William Roberts
On Wed, Oct 17, 2018 at 2:21 PM Stephen Smalley wrote: > > On 10/17/2018 05:18 PM, Paul Moore wrote: > > On Wed, Oct 17, 2018 at 12:07 PM William Roberts > > wrote: > >> On Wed, Oct 17, 2018 at 7:48 AM Ondrej Mosnacek > >> wrote: > >>> > >>> We need to convert from little-endian before dong

Re: [PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread Stephen Smalley
On 10/17/2018 05:18 PM, Paul Moore wrote: On Wed, Oct 17, 2018 at 12:07 PM William Roberts wrote: On Wed, Oct 17, 2018 at 7:48 AM Ondrej Mosnacek wrote: We need to convert from little-endian before dong range checks on the ibpkey port numbers, otherwise we would be checking a wrong value.

Re: [PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread Paul Moore
On Wed, Oct 17, 2018 at 12:07 PM William Roberts wrote: > On Wed, Oct 17, 2018 at 7:48 AM Ondrej Mosnacek wrote: > > > > We need to convert from little-endian before dong range checks on the > > ibpkey port numbers, otherwise we would be checking a wrong value. > > > > Fixes: 9fbb3112769a

Re: [PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread William Roberts
On Wed, Oct 17, 2018 at 7:48 AM Ondrej Mosnacek wrote: > > We need to convert from little-endian before dong range checks on the > ibpkey port numbers, otherwise we would be checking a wrong value. > > Fixes: 9fbb3112769a ("libsepol: Add ibpkey ocontext handling") > Signed-off-by: Ondrej Mosnacek

Re: [PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread William Roberts
On Wed, Oct 17, 2018 at 8:30 AM Stephen Smalley wrote: > > On 10/17/2018 10:46 AM, Ondrej Mosnacek wrote: > > We need to convert from little-endian before dong range checks on the > > ibpkey port numbers, otherwise we would be checking a wrong value. > > > > Fixes: 9fbb3112769a ("libsepol: Add

Re: [PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread Stephen Smalley
On 10/17/2018 10:46 AM, Ondrej Mosnacek wrote: We need to convert from little-endian before dong range checks on the ibpkey port numbers, otherwise we would be checking a wrong value. Fixes: 9fbb3112769a ("libsepol: Add ibpkey ocontext handling") Signed-off-by: Ondrej Mosnacek Acked-by:

Re: [PATCH v3] selinux: policydb - fix byte order and alignment issues

2018-10-17 Thread Stephen Smalley
On 10/17/2018 10:15 AM, Ondrej Mosnacek wrote: Do the LE conversions before doing the Infiniband-related range checks. The incorrect checks are otherwise causing a failure to load any policy with an ibendportcon rule on BE systems. This can be reproduced by running (on e.g. ppc64): cat

Re: [PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread William Roberts
On Wed, Oct 17, 2018 at 7:48 AM Ondrej Mosnacek wrote: > > We need to convert from little-endian before dong range checks on the > ibpkey port numbers, otherwise we would be checking a wrong value. > > Fixes: 9fbb3112769a ("libsepol: Add ibpkey ocontext handling") > Signed-off-by: Ondrej Mosnacek

[PATCH] libsepol: fix endianity in ibpkey range checks

2018-10-17 Thread Ondrej Mosnacek
We need to convert from little-endian before dong range checks on the ibpkey port numbers, otherwise we would be checking a wrong value. Fixes: 9fbb3112769a ("libsepol: Add ibpkey ocontext handling") Signed-off-by: Ondrej Mosnacek --- libsepol/src/policydb.c | 14 ++ 1 file changed,

[PATCH v3] selinux: policydb - fix byte order and alignment issues

2018-10-17 Thread Ondrej Mosnacek
Do the LE conversions before doing the Infiniband-related range checks. The incorrect checks are otherwise causing a failure to load any policy with an ibendportcon rule on BE systems. This can be reproduced by running (on e.g. ppc64): cat >my_module.cil < Cc: Eli Cohen Cc: James Morris Cc:

Re: [PATCH v2] selinux: fix byte order and alignment issues in policydb.c

2018-10-17 Thread Ondrej Mosnacek
On Tue, Oct 16, 2018 at 4:19 PM Ondrej Mosnacek wrote: > On Tue, Oct 16, 2018 at 2:53 PM Stephen Smalley wrote: > > On 10/16/2018 03:09 AM, Ondrej Mosnacek wrote: > > > Add missing LE conversions to the Infiniband-related range checks. These > > > were causing a failure to load any policy with