Re: [PATCH] apparmor: fix SECURITY_APPARMOR_HASH_DEFAULT parameter handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/17/2018 04:49 AM, Greg KH wrote:
> On Sun, Sep 09, 2018 at 04:04:18PM +0200, Loic wrote:
>> Hello,
>>
>> Tested without any problem so please picked up this for 4.4 to fix the
>> problem.
>> The patch below is slightly modified to adapt to this version.
> 
> I would like to get an ack from one of the developers/maintainers of
> this patch before I accept it, as it does differ from the in-tree
> version a bit.
> 

Greg the patch is good. Full explanation below


cherry-picking the original patch to 4.4, I get 2 conflicts

	both modified:   security/apparmor/lsm.c
	both modified:   security/apparmor/policy_unpack.c

the lsm.c conflict is do to surrounding code changes and is handled
correctly.  The patch drops the policy_unpack.c change

diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c
index b9b1c66a32a5..138120698f83 100644
--- a/security/apparmor/policy_unpack.c
+++ b/security/apparmor/policy_unpack.c
@@ -778,8 +778,7 @@ int aa_unpack(void *udata, size_t size, struct list_head *lh, const char **ns)
                if (error)
                        goto fail_profile;
 
-               if (aa_g_hash_policy)
-                       error = aa_calc_profile_hash(profile, e.version, start,
+               error = aa_calc_profile_hash(profile, e.version, start,
                                                     e.pos - start);
                if (error)
                        goto fail_profile;


The conflict is caused by commit
31f75bfecd9cef7d485b1cda3c6c38cc0b4a5c6c in 4.11, which adds the
conditional check that the upstream version of this patch is dropping
again.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux