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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Jan 2017 08:44:17 -0700
From:   Jens Axboe <axboe@...nel.dk>
To:     Chris Wilson <chris@...is-wilson.co.uk>,
        linux-kernel@...r.kernel.org
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Hannes Reinecke <hare@...e.com>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Chen Fan <chen.fan.fnst@...fujitsu.com>,
        Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH] softirq: Reserve a bit in tasklet.state for the user

On 01/23/2017 08:33 AM, Chris Wilson wrote:
> Allow the user to communicate with the tasklet through the atomic state
> field by assigning a bit for their use. This can be used, for example,
> to differentiate between a tasklet called following an irq or from
> process context, where some hardware state may only be valid after the
> irq.
> 
> Signed-off-by: Chris Wilson <chris@...is-wilson.co.uk>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Jens Axboe <axboe@...nel.dk>
> Cc: Hannes Reinecke <hare@...e.com>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Chen Fan <chen.fan.fnst@...fujitsu.com>
> Cc: Alexander Potapenko <glider@...gle.com>
> ---
>  include/linux/interrupt.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index 53144e78a369..ab321552089b 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -542,7 +542,8 @@ struct tasklet_struct name = { NULL, 0, ATOMIC_INIT(1), func, data }
>  enum
>  {
>  	TASKLET_STATE_SCHED,	/* Tasklet is scheduled for execution */
> -	TASKLET_STATE_RUN	/* Tasklet is running (SMP only) */
> +	TASKLET_STATE_RUN,	/* Tasklet is running (SMP only) */
> +	TASKLET_STATE_USER	/* Reserved for use by the owner */
>  };

I have no problem making that distinction, but it's impossible to ack
this patch without having seen how you plan to utilize it, as the patch
is meaningless on its own.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ