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: <alpine.LSU.2.21.1804131118080.17969@pobox.suse.cz>
Date:   Fri, 13 Apr 2018 13:20:40 +0200 (CEST)
From:   Miroslav Benes <mbenes@...e.cz>
To:     Joe Lawrence <joe.lawrence@...hat.com>
cc:     live-patching@...r.kernel.org, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jiri Kosina <jikos@...nel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Petr Mladek <pmladek@...e.com>,
        Libor Pecháček <lpechacek@...e.com>,
        Nicolai Stange <nstange@...e.de>,
        Artem Savkov <asavkov@...hat.com>
Subject: Re: [PATCH v3] selftests/livepatch: introduce tests

Hi,

On Thu, 12 Apr 2018, Joe Lawrence wrote:

> Add a few livepatch modules and simple target modules that the included
> regression suite can run tests against.

Could you include a brief description which features are tested?
 
> Signed-off-by: Joe Lawrence <joe.lawrence@...hat.com>
> ---

> diff --git a/lib/livepatch/test_klp_shadow_vars.c b/lib/livepatch/test_klp_shadow_vars.c
> new file mode 100644
> index 000000000000..18c75b21cb9e
> --- /dev/null
> +++ b/lib/livepatch/test_klp_shadow_vars.c
>
> +/*
> + * Shadow variable wrapper functions that echo the function and arguments
> + * to the kernel log for testing verification.  Don't display raw pointers,
> + * but use the ptr_id() value instead.
> + */
> +void *shadow_get(void *obj, unsigned long id)
> +{
> +	void *ret = klp_shadow_get(obj, id);
> +
> +	pr_info("klp_%s(obj=PTR%d, id=0x%lx) = PTR%d\n",
> +		__func__, ptr_id(obj), id, ptr_id(ret));
> +
> +	return ret;
> +}

> +void shadow_free(void *obj, unsigned long id, klp_shadow_dtor_t dtor)
> +{
> +	klp_shadow_free(obj, id, dtor);
> +	pr_info("klp_%s(obj=PTR%d, id=0x%lx, dtor=PTR%d)\n",
> +		__func__, ptr_id(obj), id, ptr_id(dtor));
> +}

Sparse (make C=1) would be happier with those two being static.

Otherwise it works as expected. Good job!

Miroslav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ