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: <e458d47e-e0da-c6a4-f91a-c44b3a66531b@wolfvision.net>
Date:   Mon, 15 May 2023 10:33:14 +0200
From:   Javier Carrasco <javier.carrasco@...fvision.net>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        202305140640.VLcvhR5G-lkp@...el.com,
        kernel test robot <lkp@...el.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Henrik Rydberg <rydberg@...math.org>,
        Bastian Hecht <hechtb@...il.com>,
        Michael Riesch <michael.riesch@...fvision.net>
Cc:     linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
        oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH 3/4] Input: st1232 - add virtual touchscreen and buttons
 handling

On 15.05.23 08:43, Krzysztof Kozlowski wrote:
> On 15/05/2023 06:34, Javier Carrasco wrote:
>> On 14.05.23 00:38, kernel test robot wrote:
>>> Hi Javier,
>>>
>>> kernel test robot noticed the following build errors:
>>>
>>> [auto build test ERROR on ac9a78681b921877518763ba0e89202254349d1b]
>>>
>>> url:    https://github.com/intel-lab-lkp/linux/commits/Javier-Carrasco/Input-ts-virtobj-Add-touchsreen-virtual-object-handling/20230510-215519
>>> base:   ac9a78681b921877518763ba0e89202254349d1b
>>> patch link:    https://lore.kernel.org/r/20230510-feature-ts_virtobj_patch-v1-3-5ae5e81bc264%40wolfvision.net
>>> patch subject: [PATCH 3/4] Input: st1232 - add virtual touchscreen and buttons handling
>>> config: arm-randconfig-m041-20230514 (https://download.01.org/0day-ci/archive/20230514/202305140640.VLcvhR5G-lkp@intel.com/config)
>>> compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
>>> reproduce (this is a W=1 build):
>>>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>>         chmod +x ~/bin/make.cross
>>>         # https://github.com/intel-lab-lkp/linux/commit/133c0f8c33dc5e70a72e6a7d670e133b6043a7a3
>>>         git remote add linux-review https://github.com/intel-lab-lkp/linux
>>>         git fetch --no-tags linux-review Javier-Carrasco/Input-ts-virtobj-Add-touchsreen-virtual-object-handling/20230510-215519
>>>         git checkout 133c0f8c33dc5e70a72e6a7d670e133b6043a7a3
>>>         # save the config file
>>>         mkdir build_dir && cp config build_dir/.config
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm olddefconfig
>>>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
>>>
>>> If you fix the issue, kindly add following tag where applicable
>>> | Reported-by: kernel test robot <lkp@...el.com>
>>> | Link: https://lore.kernel.org/oe-kbuild-all/202305140640.VLcvhR5G-lkp@intel.com/
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>    arm-linux-gnueabi-ld: drivers/input/touchscreen/st1232.o: in function `st1232_ts_parse_and_report':
>>>>> st1232.c:(.text+0x148): undefined reference to `ts_virtobj_is_button_slot'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x15e): undefined reference to `ts_virtobj_button_press'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x16c): undefined reference to `ts_virtobj_mt_on_touchscreen'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x242): undefined reference to `ts_virtobj_mapped_buttons'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x266): undefined reference to `ts_virtobj_is_button_slot'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x276): undefined reference to `ts_virtobj_button_release'
>>>    arm-linux-gnueabi-ld: drivers/input/touchscreen/st1232.o: in function `st1232_ts_probe':
>>>>> st1232.c:(.text+0x42c): undefined reference to `ts_virtobj_map_objects'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x43c): undefined reference to `ts_virtobj_mapped_touchscreen'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x44a): undefined reference to `ts_virtobj_get_touchscreen_abs'
>>>    arm-linux-gnueabi-ld: st1232.c:(.text+0x520): undefined reference to `ts_virtobj_mapped_buttons'
>>>>> arm-linux-gnueabi-ld: st1232.c:(.text+0x542): undefined reference to `ts_virtobj_set_button_caps'
>>>
>> Apparently there is something wrong about the references from this patch
>> to a previous one from the same series ([PATCH 1/4] Input: ts-virtobj -
>> Add touchs[c]reen virtual object handling). The "url" link shows all
>> patches of this series in the right order though.
>>
>> All these functions are declared in the linux/input/ts-virtobj.h header
>> and also inline-defined there if ts-virtobj is not selected. If it is
>> selected (either y or M), the functions are exported from
>> driver/input/touchscreen/ts-virtobj.c. According to the error report,
>> ts-virtobj was selected as a module.
>>
>> I could build the kernel with the three possible configurations
>> (ts-virtobj y/n/M) for x86_64 as well as for arm64 with no errors or
>> warnings repeatedly, so I am a bit confused now. I am probably
>> missing something, but I do not know what.
>>
>> I wonder if the new file where the functions are defined (ts-virtobj.c)
>> could not be found by some reason or if the test build does not like the
>> way I handled the function declaration/definition. Any hint or advice
>> would be more than welcome.
> 
> The report is correct. Build driver builtin and your virtual as module.

You are right, that was the configuration I was missing, which I
honestly did not even consider when I tested this feature.

The problem seems to be that I am using the IS_ENABLED macro which
returns true if selected as a module, but the define is in that case
CONFIG_TOUCHSCREEN_TS_VIRTOBJ_MODULE instead of
CONFIG_TOUCHSCREEN_TS_VIRTOBJ. As I am using the latter define in the
Makefile, it does not get compiled.

I am testing the IS_REACHABLE macro for the header instead, which I
think is the right one in this case and actually fixes the bug. I am
telling you that just in case I am talking nonsense to save everyone
from a pointless v2.
But first I will go through all possible combinations between my virtual
and a touchscreen driver before I submit a broken v2, where I will also
provide an improved documentation as you suggested.
Thanks a lot again!

> 
> Best regards,
> Krzysztof
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ