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]
Message-ID: <CACvgo50i0Y=TJNCvX+c2m8u8ai2p30EbaU1u3xBmQYBZGWH5UA@mail.gmail.com>
Date:	Tue, 17 May 2016 00:10:24 +0100
From:	Emil Velikov <emil.l.velikov@...il.com>
To:	Benjamin Gaignard <benjamin.gaignard@...aro.org>
Cc:	linux-media@...r.kernel.org,
	"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
	ML dri-devel <dri-devel@...ts.freedesktop.org>,
	zoltan.kuscsik@...aro.org, Sumit Semwal <sumit.semwal@...aro.org>,
	cc.ma@...iatek.com, pascal.brand@...aro.org,
	joakim.bech@...aro.org, dan.caprita@...driver.com
Subject: Re: [PATCH v7 3/3] SMAF: add fake secure module

Hi Benjamin,

On 9 May 2016 at 16:07, Benjamin Gaignard <benjamin.gaignard@...aro.org> wrote:
> This module is allow testing secure calls of SMAF.
>
"Add fake secure module" does sound like something not (m)any people
want to hear ;-)
Have you considered calling it 'dummy', 'test' or similar ?


> --- /dev/null
> +++ b/drivers/smaf/smaf-fakesecure.c
> @@ -0,0 +1,85 @@
> +/*
> + * smaf-fakesecure.c
> + *
> + * Copyright (C) Linaro SA 2015
> + * Author: Benjamin Gaignard <benjamin.gaignard@...aro.org> for Linaro.
> + * License terms:  GNU General Public License (GPL), version 2
> + */
> +#include <linux/module.h>
> +#include <linux/slab.h>
> +#include <linux/smaf-secure.h>
> +
> +#define MAGIC 0xDEADBEEF
> +
> +struct fake_private {
> +       int magic;
> +};
> +
> +static void *smaf_fakesecure_create(void)
> +{
> +       struct fake_private *priv;
> +
> +       priv = kzalloc(sizeof(*priv), GFP_KERNEL);
Missing ENOMEM handling ?

> +       priv->magic = MAGIC;
> +
> +       return priv;
> +}
> +
> +static int smaf_fakesecure_destroy(void *ctx)
> +{
> +       struct fake_private *priv = (struct fake_private *)ctx;
You might want to flesh this cast into a (inline) helper and use it throughout ?


... and that is all. Hope these were useful, or at the very least not
utterly wrong, suggestions :-)


Regards,
Emil

P.S. From a quick look userspace has some subtle bugs/odd practises.
Let me know if you're interested in my input.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ