linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: lkp@intel.com (kbuild test robot)
To: linux-security-module@vger.kernel.org
Subject: [PATCH] apparmor: remove dead code
Date: Fri, 24 Aug 2018 02:35:04 +0800	[thread overview]
Message-ID: <201808240108.0FcluUrs%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180823134255.GA12128@embeddedor.com>

Hi Gustavo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on security/next]
[also build test ERROR on v4.18 next-20180822]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Gustavo-A-R-Silva/apparmor-remove-dead-code/20180824-005627
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next
config: i386-randconfig-x079-201833 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   security//apparmor/policy_unpack.c: In function 'unpack_dfa':
>> security//apparmor/policy_unpack.c:445:4: error: label 'fail' used but not defined
       goto fail;
       ^~~~

vim +/fail +445 security//apparmor/policy_unpack.c

736ec752d John Johansen 2010-07-29  414  
736ec752d John Johansen 2010-07-29  415  /**
736ec752d John Johansen 2010-07-29  416   * unpack_dfa - unpack a file rule dfa
736ec752d John Johansen 2010-07-29  417   * @e: serialized data extent information (NOT NULL)
736ec752d John Johansen 2010-07-29  418   *
736ec752d John Johansen 2010-07-29  419   * returns dfa or ERR_PTR or NULL if no dfa
736ec752d John Johansen 2010-07-29  420   */
736ec752d John Johansen 2010-07-29  421  static struct aa_dfa *unpack_dfa(struct aa_ext *e)
736ec752d John Johansen 2010-07-29  422  {
736ec752d John Johansen 2010-07-29  423  	char *blob = NULL;
736ec752d John Johansen 2010-07-29  424  	size_t size;
736ec752d John Johansen 2010-07-29  425  	struct aa_dfa *dfa = NULL;
736ec752d John Johansen 2010-07-29  426  
736ec752d John Johansen 2010-07-29  427  	size = unpack_blob(e, &blob, "aadfa");
736ec752d John Johansen 2010-07-29  428  	if (size) {
736ec752d John Johansen 2010-07-29  429  		/*
736ec752d John Johansen 2010-07-29  430  		 * The dfa is aligned with in the blob to 8 bytes
736ec752d John Johansen 2010-07-29  431  		 * from the beginning of the stream.
dd51c8485 John Johansen 2013-07-10  432  		 * alignment adjust needed by dfa unpack
736ec752d John Johansen 2010-07-29  433  		 */
dd51c8485 John Johansen 2013-07-10  434  		size_t sz = blob - (char *) e->start -
dd51c8485 John Johansen 2013-07-10  435  			((e->pos - e->start) & 7);
736ec752d John Johansen 2010-07-29  436  		size_t pad = ALIGN(sz, 8) - sz;
736ec752d John Johansen 2010-07-29  437  		int flags = TO_ACCEPT1_FLAG(YYTD_DATA32) |
abbf87340 John Johansen 2017-01-16  438  			TO_ACCEPT2_FLAG(YYTD_DATA32) | DFA_FLAG_VERIFY_STATES;
736ec752d John Johansen 2010-07-29  439  		dfa = aa_dfa_unpack(blob + pad, size - pad, flags);
736ec752d John Johansen 2010-07-29  440  
736ec752d John Johansen 2010-07-29  441  		if (IS_ERR(dfa))
736ec752d John Johansen 2010-07-29  442  			return dfa;
736ec752d John Johansen 2010-07-29  443  
736ec752d John Johansen 2010-07-29  444  		if (!verify_accept(dfa, flags))
736ec752d John Johansen 2010-07-29 @445  			goto fail;
736ec752d John Johansen 2010-07-29  446  	}
736ec752d John Johansen 2010-07-29  447  
736ec752d John Johansen 2010-07-29  448  	return dfa;
736ec752d John Johansen 2010-07-29  449  }
736ec752d John Johansen 2010-07-29  450  

:::::: The code at line 445 was first introduced by commit
:::::: 736ec752d95e91e77cc0e8c97c057ab076ac2f51 AppArmor: policy routines for loading and unpacking policy

:::::: TO: John Johansen <john.johansen@canonical.com>
:::::: CC: James Morris <jmorris@namei.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

      parent reply	other threads:[~2018-08-23 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 13:42 [PATCH] apparmor: remove dead code Gustavo A. R. Silva
2018-08-23 18:21 ` John Johansen
2018-08-23 18:33   ` Gustavo A. R. Silva
2018-08-23 18:35 ` kbuild test robot [this message]

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=201808240108.0FcluUrs%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --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).