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:   Mon, 24 Jul 2017 08:54:30 +0200
From:   Bartosz Golaszewski <brgl@...ev.pl>
To:     Jonathan Cameron <jic23@...nel.org>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <marc.zyngier@....com>,
        Jonathan Corbet <corbet@....net>,
        Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-doc@...r.kernel.org
Subject: Re: [PATCH 1/3] irq/irq_sim: add a simple interrupt simulator framework

2017-07-22 22:59 GMT+02:00 Jonathan Cameron <jic23@...nel.org>:
>> +
>> +/**
>> + * irq_sim_fire - Enqueue an interrupt.
>> + *
>> + * @sim:        The interrupt simulator object.
>> + * @offset:     Offset of the simulated interrupt which should be fired.
>> + */
>> +void irq_sim_fire(struct irq_sim *sim, unsigned int offset)
>> +{
>> +     if (sim->irqs[offset].enabled) {
>> +             sim->work_ctx.irq = irq_sim_irqnum(sim, offset);
> Is this safe against more than one firing at a time?  Or is it
> the responsibility of the caller to prevent that?
>

Yes, I assumed this should be the responsibility of the caller. Let me
know if there's an important reason to implement separate locking
within this framework. My goal was to keep it simple, hence no
generalized UAPI too - callers should use their own interfaces to
expose this to the user space if needed.

Thanks,
Bartosz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ