live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Petr Mladek <pmladek@suse.com>
Cc: kbuild-all@01.org, Jiri Kosina <jikos@kernel.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Miroslav Benes <mbenes@suse.cz>,
	Joe Lawrence <joe.lawrence@redhat.com>,
	Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	Nicolai Stange <nstange@suse.de>,
	live-patching@vger.kernel.org, linux-kernel@vger.kernel.org,
	Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH v3 5/5] livepatch: Selftests of the API for tracking system state changes
Date: Wed, 9 Oct 2019 06:19:40 +0800	[thread overview]
Message-ID: <201910090514.2jNhxHDb%lkp@intel.com> (raw)
In-Reply-To: <20191003090137.6874-6-pmladek@suse.com>

[-- Attachment #1: Type: text/plain, Size: 4612 bytes --]

Hi Petr,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.4-rc2 next-20191008]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Petr-Mladek/livepatch-Keep-replaced-patches-until-post_patch-callback-is-called/20191003-171833
config: x86_64-randconfig-e004-201940 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All error/warnings (new ones prefixed by >>):

   lib/livepatch/test_klp_state.c: In function 'allocate_loglevel_state':
>> lib/livepatch/test_klp_state.c:41:25: error: implicit declaration of function 'kzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
     loglevel_state->data = kzalloc(sizeof(console_loglevel), GFP_KERNEL);
                            ^~~~~~~
                            kvzalloc
>> lib/livepatch/test_klp_state.c:41:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     loglevel_state->data = kzalloc(sizeof(console_loglevel), GFP_KERNEL);
                          ^
   lib/livepatch/test_klp_state.c: In function 'free_loglevel_state':
>> lib/livepatch/test_klp_state.c:85:2: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
     kfree(loglevel_state->data);
     ^~~~~
     kvfree
   cc1: some warnings being treated as errors
--
   lib/livepatch/test_klp_state2.c: In function 'allocate_loglevel_state':
>> lib/livepatch/test_klp_state2.c:48:25: error: implicit declaration of function 'kzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
     loglevel_state->data = kzalloc(sizeof(console_loglevel), GFP_KERNEL);
                            ^~~~~~~
                            kvzalloc
>> lib/livepatch/test_klp_state2.c:48:23: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     loglevel_state->data = kzalloc(sizeof(console_loglevel), GFP_KERNEL);
                          ^
   lib/livepatch/test_klp_state2.c: In function 'free_loglevel_state':
>> lib/livepatch/test_klp_state2.c:114:2: error: implicit declaration of function 'kfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
     kfree(loglevel_state->data);
     ^~~~~
     kvfree
   cc1: some warnings being treated as errors

vim +41 lib/livepatch/test_klp_state.c

    32	
    33	static int allocate_loglevel_state(void)
    34	{
    35		struct klp_state *loglevel_state;
    36	
    37		loglevel_state = klp_get_state(&patch, CONSOLE_LOGLEVEL_STATE);
    38		if (!loglevel_state)
    39			return -EINVAL;
    40	
  > 41		loglevel_state->data = kzalloc(sizeof(console_loglevel), GFP_KERNEL);
    42		if (!loglevel_state->data)
    43			return -ENOMEM;
    44	
    45		pr_info("%s: allocating space to store console_loglevel\n",
    46			__func__);
    47		return 0;
    48	}
    49	
    50	static void fix_console_loglevel(void)
    51	{
    52		struct klp_state *loglevel_state;
    53	
    54		loglevel_state = klp_get_state(&patch, CONSOLE_LOGLEVEL_STATE);
    55		if (!loglevel_state)
    56			return;
    57	
    58		pr_info("%s: fixing console_loglevel\n", __func__);
    59		*(int *)loglevel_state->data = console_loglevel;
    60		console_loglevel = CONSOLE_LOGLEVEL_MOTORMOUTH;
    61	}
    62	
    63	static void restore_console_loglevel(void)
    64	{
    65		struct klp_state *loglevel_state;
    66	
    67		loglevel_state = klp_get_state(&patch, CONSOLE_LOGLEVEL_STATE);
    68		if (!loglevel_state)
    69			return;
    70	
    71		pr_info("%s: restoring console_loglevel\n", __func__);
    72		console_loglevel = *(int *)loglevel_state->data;
    73	}
    74	
    75	static void free_loglevel_state(void)
    76	{
    77		struct klp_state *loglevel_state;
    78	
    79		loglevel_state = klp_get_state(&patch, CONSOLE_LOGLEVEL_STATE);
    80		if (!loglevel_state)
    81			return;
    82	
    83		pr_info("%s: freeing space for the stored console_loglevel\n",
    84			__func__);
  > 85		kfree(loglevel_state->data);
    86	}
    87	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28477 bytes --]

  parent reply	other threads:[~2019-10-08 22:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03  9:01 [PATCH v3 0/5] livepatch: new API to track system state changes Petr Mladek
2019-10-03  9:01 ` [PATCH v3 1/5] livepatch: Keep replaced patches until post_patch callback is called Petr Mladek
2019-10-03  9:01 ` [PATCH v3 2/5] livepatch: Basic API to track system state changes Petr Mladek
2019-10-03  9:01 ` [PATCH v3 3/5] livepatch: Allow to distinguish different version of " Petr Mladek
2019-10-23 21:15   ` Josh Poimboeuf
2019-10-24 12:13     ` Petr Mladek
2019-10-03  9:01 ` [PATCH v3 4/5] livepatch: Documentation of the new API for tracking " Petr Mladek
2019-10-03  9:01 ` [PATCH v3 5/5] livepatch: Selftests of the " Petr Mladek
2019-10-04 14:47   ` Joe Lawrence
2019-10-09 14:18     ` Petr Mladek
2019-10-09 14:27       ` Joe Lawrence
2019-10-08 22:19   ` kbuild test robot [this message]
2019-10-04 14:39 ` [PATCH v3 0/5] livepatch: new API to track " Joe Lawrence

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=201910090514.2jNhxHDb%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --cc=jpoimboe@redhat.com \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=nstange@suse.de \
    --cc=pmladek@suse.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 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).