All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Benjamin Coddington <bcodding@redhat.com>,
	David Howells <dhowells@redhat.com>,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, ebiederm@xmission.com,
	Ian Kent <raven@themaw.net>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2] KEYS: Add keyagent request_key
Date: Fri, 15 Jul 2022 23:28:21 +0800	[thread overview]
Message-ID: <202207152310.dTPT29kb-lkp@intel.com> (raw)
In-Reply-To: <061dd6fe81dc97a4375e52ec0da20a54cf582cb5.1657624639.git.bcodding@redhat.com>

Hi Benjamin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on jmorris-security/next-testing]
[also build test WARNING on dhowells-fs/fscache-next arnd-asm-generic/master linus/master v5.19-rc6 next-20220714]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Benjamin-Coddington/Keyagents-another-call_usermodehelper-approach-for-namespaces/20220712-203658
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git next-testing
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220715/202207152310.dTPT29kb-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/4d4f4ae463335d3e611bdb71330ab37af115cde9
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Benjamin-Coddington/Keyagents-another-call_usermodehelper-approach-for-namespaces/20220712-203658
        git checkout 4d4f4ae463335d3e611bdb71330ab37af115cde9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash security/keys/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> security/keys/keyagent.c:78:5: warning: no previous prototype for 'keyagent_request_key' [-Wmissing-prototypes]
      78 | int keyagent_request_key(struct key *authkey, void *aux)
         |     ^~~~~~~~~~~~~~~~~~~~


vim +/keyagent_request_key +78 security/keys/keyagent.c

    72	
    73	/*
    74	 * Search the calling process' keyrings for a keyagent that
    75	 * matches the requested key type.  If found, signal the keyagent
    76	 * to construct and link the key, else return -ENOKEY.
    77	 */
  > 78	int keyagent_request_key(struct key *authkey, void *aux)
    79	{
    80		struct key *ka_key, *target_key;
    81		struct request_key_auth *rka;
    82		key_ref_t ka_ref;
    83		const struct cred *cred = current_cred();
    84		int ret;
    85	
    86		/* We must be careful not to touch authkey and aux if
    87		 * returning -ENOKEY, since it will be reused.   */
    88		rka = get_request_key_auth(authkey);
    89		target_key = rka->target_key;
    90	
    91		/* Does the calling process have a keyagent in its session keyring? */
    92		ka_ref = keyring_search(
    93						make_key_ref(cred->session_keyring, 1),
    94						&key_type_keyagent,
    95						target_key->type->name, false);
    96	
    97		if (IS_ERR(ka_ref))
    98			return -ENOKEY;
    99	
   100		/* We found a keyagent, let's call out to it. */
   101		ka_key = key_ref_to_ptr(ka_ref);
   102		ret = keyagent_signal(ka_key, target_key, authkey);
   103		key_put(key_ref_to_ptr(ka_ref));
   104	
   105		return ret;
   106	}
   107	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  parent reply	other threads:[~2022-07-15 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-12 12:35 [RFC PATCH 0/2] Keyagents: another call_usermodehelper approach for namespaces Benjamin Coddington
2022-07-12 12:35 ` [PATCH 1/2] KEYS: Add key_type keyagent Benjamin Coddington
2022-07-12 12:35 ` [PATCH 2/2] KEYS: Add keyagent request_key Benjamin Coddington
2022-07-14 22:10   ` kernel test robot
2022-07-15 15:28   ` kernel test robot
2022-07-15 15:28   ` kernel test robot [this message]
2022-07-12 14:16 ` [RFC PATCH 0/2] Keyagents: another call_usermodehelper approach for namespaces Eric W. Biederman
2022-07-12 16:47   ` Benjamin Coddington

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=202207152310.dTPT29kb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bcodding@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=raven@themaw.net \
    --cc=trond.myklebust@hammerspace.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.