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] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 30 Mar 2014 05:56:39 +0200
From:	Andi Kleen <andi@...stfloor.org>
To:	Jovi Zhangwei <jovi.zhangwei@...il.com>
Cc:	Ingo Molnar <mingo@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH v2 12/29] ktap: add generic object handling
 code(kernel/trace/ktap/kp_obj.[c|h])

> + * You should have received a copy of the GNU General Public License along with
> + * this program; if not, write to the Free Software Foundation, Inc.,
> + * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.

We're not supposed to use the address anymore.

> +/* memory allocation flag */
> +#define KTAP_ALLOC_FLAGS ((GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN) \
> +			 & ~__GFP_WAIT)
> +
> +void *kp_malloc(ktap_state_t *ks, int size)
> +{
> +	void *addr;
> +
> +	addr = kmalloc(size, KTAP_ALLOC_FLAGS);
> +	if (unlikely(!addr)) {
> +		kp_error(ks, "kmalloc failed\n");
> +	}
> +	return addr;

Please remove this pointless wrapper. Similar for the functions below.
Just use kmalloc etc. directly.

> +	case KTAP_TNUM:
> +		kp_printf(ks, "NUM %ld", nvalue(v));

Similar here. That's all printk


-Andi
-- 
ak@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ