Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7122663rwb; Mon, 12 Dec 2022 10:18:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf4UUbtUmhfA8eGBS8uY83kGK2oIoydGO6XYWwurA3RYxY1PZajHNzOEVnKb0AHsEyN7HUWG X-Received: by 2002:a05:6a21:e313:b0:a7:cafa:9f08 with SMTP id cb19-20020a056a21e31300b000a7cafa9f08mr22551928pzc.30.1670869102383; Mon, 12 Dec 2022 10:18:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670869102; cv=none; d=google.com; s=arc-20160816; b=uA/upZSvnxnZ85aTiJ73VDxBghzh0G6HMeCAQUi0NjImlu+SnhDPhgA0F4d0R3Eh46 nrXGstRzgow67sZhSUVq7bWA7uxd4iHZ+LegqRtB1HGuAlQnYUreGdvTRhsgJYhtVMfk bGTzqf+cdyyQJLSH6VL4bz4kZH84KtFIJlzvHpzkv+r3BLYPd1hWjt/PaeLRK+AnjS++ n1OsEeDWLirhkH89VqYZWgnHoyXuXLtNpFuOHWAzYpTmfm2pZWvYlK4uPtU6D9VDWlnX 43AiemOTJmhUq+qh2OoOHxRN8QN4BIYzJiEkbkz+hRQWbJd1hcXaKswmNlgZr2UXqQNl wcRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IbdQlONAF3F5tE8sTJVSPYNxwq82LlNJlRxKJhZeRSk=; b=dTQ4WutDatBX6vO2ib9XY/HMf4I0Xa9IZ1NiwQo+skO0nTIU4KkZbKCFch9Dv6GGwR pW8lNCoyds5msqphKB3xgIEgMmS5bqE5KX6QgDXwAXv4dvAIakBhmbG69+VvZ34Zhjcm LRVf+oRQN1EXQloIu+IvPEH8Sakd/Y7M/uBMrNYsL/BkE63QJkGqcZhcJYnGkHGZeoNT LpXCmo/ZZH/X4BA80VlkvDeAkgQUAJ3Ankf3TkiLG0kH4rU38AKExQhO3/NMND4iIlbr FbLukTZXITyyuAssbt3LzvoDcRVLu+QeR/go7ygOPB5eyR//5RFvBpCA2DebHv38rFkp LW+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=BVjhFVJE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l21-20020a056a00141500b0056ba98afe0dsi10561213pfu.75.2022.12.12.10.18.11; Mon, 12 Dec 2022 10:18:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=BVjhFVJE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232889AbiLLRxH (ORCPT + 74 others); Mon, 12 Dec 2022 12:53:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232952AbiLLRwi (ORCPT ); Mon, 12 Dec 2022 12:52:38 -0500 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0068F1409E for ; Mon, 12 Dec 2022 09:52:35 -0800 (PST) Received: by mail-il1-x12b.google.com with SMTP id y3so2171676ilq.0 for ; Mon, 12 Dec 2022 09:52:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IbdQlONAF3F5tE8sTJVSPYNxwq82LlNJlRxKJhZeRSk=; b=BVjhFVJE0GkqiD0W9BupRfp+/6CtfFOAEvalRIwgyds/szdM7Ho1LGyPQuKZ+1RHxs xvc8lZmdLKuqEltla0cZ6e+RVJexsbM91uSHVZngnkLsThW6u6CAD45fS8RA9cXtgdam gWDr/YasFT90pBuaJqoE1QT1i9JCQWBrYaVNE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IbdQlONAF3F5tE8sTJVSPYNxwq82LlNJlRxKJhZeRSk=; b=pLQMKu+AHQIZmFIhlv+B7XmxGvZOp/hA+IHKbmn0FcWu0RzKkBGWDmIDEyKmUK2Xlg B+mKlqZvSYHTfjso8hfpMxipMMv8G0YIHzVm/4/FnSWain1Z93/Dl3bADI9wzTU0n4Su e5ozX8ZARL6rWAusdSResYOtVQyuD8LGcqOtnXyK46LPCOFFx8VfuKUVtTuVjzf0Kppe jhyFa/PJDntya3YjLKBM0RxfYJqSXXoWevzOLRFQSKAyAZ+mFVj8iEig8HlU1Ub1hall c2Rnk/GC4zV7ozDQPK29wqvatjAX6iuqT7zl9P5ik7GE/UGP5QMAHPP+0F7dmUV7OBkO X+XA== X-Gm-Message-State: ANoB5pmAqr+j8KXEhY3xPzpb2XAtq4R4XpVH2TAX8zHQrPbSimdiSrpI Q1lbfk5e2agmXTOT5elEzEShvw== X-Received: by 2002:a05:6e02:1a27:b0:304:b2dc:4274 with SMTP id g7-20020a056e021a2700b00304b2dc4274mr1102837ile.3.1670867555255; Mon, 12 Dec 2022 09:52:35 -0800 (PST) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id n23-20020a027157000000b003712c881d67sm108802jaf.164.2022.12.12.09.52.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Dec 2022 09:52:34 -0800 (PST) Message-ID: <8e82905f-8bdf-05de-2e6a-d8b896d75910@linuxfoundation.org> Date: Mon, 12 Dec 2022 10:52:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: linux-next: manual merge of the kunit-next tree with the apparmor tree Content-Language: en-US To: John Johansen , Stephen Rothwell , Brendan Higgins , David Gow Cc: Linux Kernel Mailing List , Linux Next Mailing List , Rae Moar , Shuah Khan References: <20221208135327.01364529@canb.auug.org.au> From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On 12/8/22 13:10, John Johansen wrote: > On 12/7/22 18:53, Stephen Rothwell wrote: >> Hi all, >> >> Today's linux-next merge of the kunit-next tree got a conflict in: >> >>    security/apparmor/policy_unpack.c >> >> between commits: >> >>    371e50a0b19f ("apparmor: make unpack_array return a trianary value") >>    73c7e91c8bc9 ("apparmor: Remove unnecessary size check when unpacking trans_table") >>    217af7e2f4de ("apparmor: refactor profile rules and attachments") >> (and probably others) >> >> from the apparmor tree and commit: >> >>    2c92044683f5 ("apparmor: test: make static symbols visible during kunit testing") >> >> from the kunit-next tree. >> >> This is somewhat of a mess ... pity there is not a shared branch (or >> better routing if the patches). >> > sorry, there was a miscommunication/misunderstanding, probably all on me, I > thought the kunit stuff that is conflicting here was going to merge next > cycle. > Sorry for not noticing David isn't on the cc - added David now. What's the best way to resolve this? >> I fixed it up (hopefully - see below) and can carry the fix as >> necessary. This is now fixed as far as linux-next is concerned, but any >> non trivial conflicts should be mentioned to your upstream maintainer >> when your tree is submitted for merging.  You may also want to consider >> cooperating with the maintainer of the conflicting tree to minimise any >> particularly complex conflicts. >> >> I also had to add this patch: >> > this needs to be modified to build if kunit is not enabled, basically > the defines need to move up outside the #if IS_ENABLED(CONFIG_KUNIT) > > ie. > diff --git a/security/apparmor/include/policy_unpack.h b/security/apparmor/include/policy_unpack.h > index 8fdf8f703bd0..dcf7d1bbf96b 100644 > --- a/security/apparmor/include/policy_unpack.h > +++ b/security/apparmor/include/policy_unpack.h > @@ -165,6 +165,11 @@ static inline void aa_put_loaddata(struct aa_loaddata *data) >          kref_put(&data->count, aa_loaddata_kref); >  } > > +#define tri int > +#define TRI_TRUE 1 > +#define TRI_NONE 0 > +#define TRI_FALSE -1 > + >  #if IS_ENABLED(CONFIG_KUNIT) >  bool aa_inbounds(struct aa_ext *e, size_t size); >  size_t aa_unpack_u16_chunk(struct aa_ext *e, char **chunk); > @@ -173,11 +178,6 @@ bool aa_unpack_nameX(struct aa_ext *e, enum aa_code code, const char *name); >  bool aa_unpack_u32(struct aa_ext *e, u32 *data, const char *name); >  bool aa_unpack_u64(struct aa_ext *e, u64 *data, const char *name); > > -#define tri int > -#define TRI_TRUE 1 > -#define TRI_NONE 0 > -#define TRI_FALSE -1 > - >  tri aa_unpack_array(struct aa_ext *e, const char *name, u16 *size); >  size_t aa_unpack_blob(struct aa_ext *e, char **blob, const char *name); >  int aa_unpack_str(struct aa_ext *e, const char **string, const char *name); > > > feel free to apply that to your patch and then add my > Acked-by: John Johansen > >> From: Stephen Rothwell >> Date: Thu, 8 Dec 2022 13:47:43 +1100 >> Subject: [PATCH] fixup for "apparmor: make unpack_array return a trianary value" >> >> Signed-off-by: Stephen Rothwell >> --- >>   security/apparmor/include/policy_unpack.h | 8 +++++++- >>   security/apparmor/policy_unpack.c         | 5 ----- >>   2 files changed, 7 insertions(+), 6 deletions(-) >> >> diff --git a/security/apparmor/include/policy_unpack.h b/security/apparmor/include/policy_unpack.h >> index 940da8a33e0c..8fdf8f703bd0 100644 >> --- a/security/apparmor/include/policy_unpack.h >> +++ b/security/apparmor/include/policy_unpack.h >> @@ -172,7 +172,13 @@ bool aa_unpack_X(struct aa_ext *e, enum aa_code code); >>   bool aa_unpack_nameX(struct aa_ext *e, enum aa_code code, const char *name); >>   bool aa_unpack_u32(struct aa_ext *e, u32 *data, const char *name); >>   bool aa_unpack_u64(struct aa_ext *e, u64 *data, const char *name); >> -size_t aa_unpack_array(struct aa_ext *e, const char *name); >> + >> +#define tri int >> +#define TRI_TRUE 1 >> +#define TRI_NONE 0 >> +#define TRI_FALSE -1 >> + >> +tri aa_unpack_array(struct aa_ext *e, const char *name, u16 *size); >>   size_t aa_unpack_blob(struct aa_ext *e, char **blob, const char *name); >>   int aa_unpack_str(struct aa_ext *e, const char **string, const char *name); >>   int aa_unpack_strdup(struct aa_ext *e, char **string, const char *name); >> diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c >> index 6513545dad5e..173d832fc4ee 100644 >> --- a/security/apparmor/policy_unpack.c >> +++ b/security/apparmor/policy_unpack.c >> @@ -30,11 +30,6 @@ >>   #include "include/policy_unpack.h" >>   #include "include/policy_compat.h" >> -#define tri int >> -#define TRI_TRUE 1 >> -#define TRI_NONE 0 >> -#define TRI_FALSE -1 >> - >>   /* audit callback for unpack fields */ >>   static void audit_cb(struct audit_buffer *ab, void *va) >>   { > thanks, -- Shuah