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] [day] [month] [year] [list]
Message-ID: <20220108195120.GA14485@elementary>
Date:   Sat, 8 Jan 2022 20:51:20 +0100
From:   José Expósito <jose.exposito89@...il.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     jikos@...nel.org, benjamin.tissoires@...hat.com,
        peter.hutterer@...-t.net, roderick.colenbrander@...y.com,
        pali@...nel.org, rydberg@...math.org, nick@...anahar.org,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] Input: add input_set_property()

Hi Dmitry,

On Mon, Jan 03, 2022 at 10:22:42PM -0800, Dmitry Torokhov wrote:
> > +/**
> > + * input_set_property - add a property to the device
> > + * @dev: device to add the property to
> > + * @property: type of the property (INPUT_PROP_POINTER, INPUT_PROP_DIRECT...)
> > + *
> > + * In addition to setting up corresponding bit in dev->propbit the function
> > + * might add or remove related capabilities.
> > + */
> > +void input_set_property(struct input_dev *dev, unsigned int property)
> > +{
> > +	switch (property) {
> > +	case INPUT_PROP_POINTER:
> > +	case INPUT_PROP_DIRECT:
> > +	case INPUT_PROP_SEMI_MT:
> > +	case INPUT_PROP_TOPBUTTONPAD:
> > +	case INPUT_PROP_POINTING_STICK:
> > +	case INPUT_PROP_ACCELEROMETER:
> > +		break;
> > +
> > +	case INPUT_PROP_BUTTONPAD:
> > +		input_set_capability(dev, EV_KEY, BTN_LEFT);
> > +		__clear_bit(BTN_RIGHT, dev->keybit);
> > +		__clear_bit(BTN_MIDDLE, dev->keybit);
> 
> I would prefer if we did this when registering input device, not when
> setting this property.

Thanks a lot for pointing me in this direction.

I emailed you v3 [1] implementing the change you suggested and also
including the "Acked-by" tags present in this conversation.

Thanks to everyone for looking into this, appreciate it.

José Expósito

[1] https://lore.kernel.org/linux-input/20220108194235.14401-1-jose.exposito89@gmail.com/T/#u

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ