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: <d4075815-2b41-781d-3541-6a17a181512d@suse.com>
Date:   Thu, 19 Apr 2018 15:19:02 +0200
From:   Juergen Gross <jgross@...e.com>
To:     Oleksandr Andrushchenko <andr2000@...il.com>,
        Jason Andryuk <jandryuk@...il.com>
Cc:     xen-devel@...ts.xenproject.org, linux-input@...r.kernel.org,
        open list <linux-kernel@...r.kernel.org>,
        dmitry.torokhov@...il.com, lyan@...e.com,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        andrii_chepurnyi@...m.com,
        Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
Subject: Re: [Xen-devel] [PATCH] Input: xen-kbdfront - allow better run-time
 configuration

On 19/04/18 15:12, Oleksandr Andrushchenko wrote:
> On 04/19/2018 04:10 PM, Jason Andryuk wrote:
>> On Thu, Apr 19, 2018 at 9:01 AM, Oleksandr Andrushchenko
>> <andr2000@...il.com> wrote:
>>> Ok, so I'll send v2 with the following changes:
>>>
>>> diff --git a/drivers/input/misc/xen-kbdfront.c
>>> b/drivers/input/misc/xen-kbdfront.c
>>> index a3306aad40b0..d8cca212f737 100644
>>> --- a/drivers/input/misc/xen-kbdfront.c
>>> +++ b/drivers/input/misc/xen-kbdfront.c
>>> @@ -51,13 +51,13 @@ module_param_array(ptr_size, int, NULL, 0444);
>>>   MODULE_PARM_DESC(ptr_size,
>>>          "Pointing device width, height in pixels (default 800,600)");
>>>
>>> -static unsigned int no_ptr_dev;
>>> -module_param(no_ptr_dev, uint, 0);
>>> +static bool no_ptr_dev;
>>> +module_param(no_ptr_dev, bool, 0);
>>>   MODULE_PARM_DESC(no_ptr_dev,
>>>          "If set then no virtual pointing device exposed to the guest");
>>>
>>> -static unsigned int no_kbd_dev;
>>> -module_param(no_kbd_dev, uint, 0);
>>> +static bool no_kbd_dev;
>>> +module_param(no_kbd_dev, bool, 0);
>>>   MODULE_PARM_DESC(no_kbd_dev,
>>>          "If set then no virtual keyboard device exposed to the guest");
>> I prefer direct logic over inverse logic.  Maybe just use kbd_dev,
>> default to true, but allow it to be set off?
>>
>> static bool kbd_dev = true;
>> module_param(kbd_dev, bool, 0);
> I have no preference here, either way works for me
> Juergen, what do you think about the above?

I really have no preference here. What should be taken into account is
that boolean parameters don't need a value, meaning "true" in that case.
This would make no sense for "kbd_dev" as it wouldn't change the
default.

Juergen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ