lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201811170557.4EtvwhsA%fengguang.wu@intel.com>
Date:   Sat, 17 Nov 2018 05:55:00 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Matt Mullins <mmullins@...com>
Cc:     kbuild-all@...org, ast@...nel.org, daniel@...earbox.net,
        netdev@...r.kernel.org, kernel-team@...com,
        Matt Mullins <mmullins@...com>, Jessica Yu <jeyu@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH bpf-next] bpf: support raw tracepoints in modules

Hi Matt,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Matt-Mullins/bpf-support-raw-tracepoints-in-modules/20181110-144839
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master

smatch warnings:
kernel/trace/bpf_trace.c:1284 bpf_event_notify() error: potential null dereference 'btm'.  (kzalloc returns null)

vim +/btm +1284 kernel/trace/bpf_trace.c

  1269	
  1270	#ifdef CONFIG_MODULES
  1271	int bpf_event_notify(struct notifier_block *nb, unsigned long op, void *module)
  1272	{
  1273		struct bpf_trace_module *btm, *tmp;
  1274		struct module *mod = module;
  1275	
  1276		if (mod->num_bpf_raw_events == 0)
  1277			return 0;
  1278	
  1279		mutex_lock(&bpf_module_mutex);
  1280	
  1281		switch (op) {
  1282		case MODULE_STATE_COMING:
  1283			btm = kzalloc(sizeof(*btm), GFP_KERNEL);
> 1284			btm->module = module;
  1285			list_add(&btm->list, &bpf_trace_modules);
  1286			break;
  1287		case MODULE_STATE_GOING:
  1288			list_for_each_entry_safe(btm, tmp, &bpf_trace_modules, list) {
  1289				if (btm->module == module) {
  1290					list_del(&btm->list);
  1291					kfree(btm);
  1292					break;
  1293				}
  1294			}
  1295			break;
  1296		}
  1297	
  1298		mutex_unlock(&bpf_module_mutex);
  1299	
  1300		return 0;
  1301	}
  1302	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ