public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness
@ 2014-04-19 18:53 Naresh Kamboju
  2014-04-21 14:15 ` Frank Ch. Eigler
  2014-04-21 20:15 ` William Cohen
  0 siblings, 2 replies; 6+ messages in thread
From: Naresh Kamboju @ 2014-04-19 18:53 UTC (permalink / raw)
  To: Frank Ch. Eigler, William Cohen, systemtap
  Cc: Fathi Boudra, Milosz Wasilewski

Hi,

The systemtap test suite compilation failed with below error.

ARCH: arm
---------------

kernel version: 3.14.0-linaro-arndale
systemtap location: /usr/local/bin/stap
systemtap version: version 2.5/0.158, commit
release-2.4-489-ge5fb7aeea34b + changes
gcc location: /usr/bin/gcc
gcc version: gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1


**** failed systemtap kernel-devel smoke test:

Makefile:622: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR:
-fstack-protector not supported by compiler
In file included from include/linux/kobject.h:21:0,
                 from include/linux/module.h:16,
                 from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
                 from /usr/local/share/systemtap/runtime/runtime.h:24,
                 from
/tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.c:24:
include/linux/sysfs.h: In function 'sysfs_get_dirent':
include/linux/sysfs.h:449:2: error: pointer targets in passing
argument 2 of 'kernfs_find_and_get' differ in signedness
[-Werror=pointer-sign]
  return kernfs_find_and_get(parent, name);
  ^
In file included from include/linux/sysfs.h:15:0,
                 from include/linux/kobject.h:21,
                 from include/linux/module.h:16,
                 from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
                 from /usr/local/share/systemtap/runtime/runtime.h:24,
                 from
/tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.c:24:
include/linux/kernfs.h:331:1: note: expected 'const char *' but
argument is of type 'const unsigned char *'
 kernfs_find_and_get(struct kernfs_node *kn, const char *name)
 ^
cc1: all warnings being treated as errors
make[4]: *** [/tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.o]
Error 1
make[3]: *** [_module_/tmp/stap5eHu9T] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed.  [man error::pass4]

**** aborting testing.

make[2]: Leaving directory `/root/systemtap/testsuite'
if test -n ""; then mail  < systemtap.sum; fi
make[1]: Leaving directory `/root/systemtap/testsuite'

Please let me know if you need more information.

Best regards
Naresh Kamboju

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness
  2014-04-19 18:53 systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness Naresh Kamboju
@ 2014-04-21 14:15 ` Frank Ch. Eigler
  2014-04-21 16:20   ` Josh Stone
  2014-04-21 20:15 ` William Cohen
  1 sibling, 1 reply; 6+ messages in thread
From: Frank Ch. Eigler @ 2014-04-21 14:15 UTC (permalink / raw)
  To: Naresh Kamboju; +Cc: systemtap, Fathi Boudra, Milosz Wasilewski

Naresh Kamboju <naresh.kamboju@linaro.org> writes:

> [...]
> The systemtap test suite compilation failed with below error.

None of these errors appears to be triggered by systemtap code, but
appear to represent problems in the kernel sources / configury.

- FChE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness
  2014-04-21 14:15 ` Frank Ch. Eigler
@ 2014-04-21 16:20   ` Josh Stone
  0 siblings, 0 replies; 6+ messages in thread
From: Josh Stone @ 2014-04-21 16:20 UTC (permalink / raw)
  To: Frank Ch. Eigler, Naresh Kamboju
  Cc: systemtap, Fathi Boudra, Milosz Wasilewski

On 04/21/2014 07:15 AM, Frank Ch. Eigler wrote:
> Naresh Kamboju <naresh.kamboju@linaro.org> writes:
> 
>> [...]
>> The systemtap test suite compilation failed with below error.
> 
> None of these errors appears to be triggered by systemtap code, but
> appear to represent problems in the kernel sources / configury.

It's true, we don't even call sysfs_get_dirent.  It does have a
signedness issue though, and our added -Werror doesn't help matters.

It's odd to see a warning for an unused function though.  Do the Linaro
patches add a call to this somewhere?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness
  2014-04-19 18:53 systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness Naresh Kamboju
  2014-04-21 14:15 ` Frank Ch. Eigler
@ 2014-04-21 20:15 ` William Cohen
  2014-04-21 22:20   ` Victor Kamensky
  1 sibling, 1 reply; 6+ messages in thread
From: William Cohen @ 2014-04-21 20:15 UTC (permalink / raw)
  To: Naresh Kamboju, Frank Ch. Eigler, systemtap
  Cc: Fathi Boudra, Milosz Wasilewski

On 04/19/2014 02:53 PM, Naresh Kamboju wrote:
> Hi,
> 
> The systemtap test suite compilation failed with below error.

Hi,

On an ARM chromebook I have a linux kernel built from the mainline git repository (2.15.0-rc2) and the current version of systemtap checked out from the git repo. I am not seeing the error messages below. 

-Will

> 
> ARCH: arm
> ---------------
> 
> kernel version: 3.14.0-linaro-arndale
> systemtap location: /usr/local/bin/stap
> systemtap version: version 2.5/0.158, commit
> release-2.4-489-ge5fb7aeea34b + changes
> gcc location: /usr/bin/gcc
> gcc version: gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
> 
> 
> **** failed systemtap kernel-devel smoke test:
> 
> Makefile:622: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR:
> -fstack-protector not supported by compiler
> In file included from include/linux/kobject.h:21:0,
>                  from include/linux/module.h:16,
>                  from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
>                  from /usr/local/share/systemtap/runtime/runtime.h:24,
>                  from
> /tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.c:24:
> include/linux/sysfs.h: In function 'sysfs_get_dirent':
> include/linux/sysfs.h:449:2: error: pointer targets in passing
> argument 2 of 'kernfs_find_and_get' differ in signedness
> [-Werror=pointer-sign]
>   return kernfs_find_and_get(parent, name);
>   ^
> In file included from include/linux/sysfs.h:15:0,
>                  from include/linux/kobject.h:21,
>                  from include/linux/module.h:16,
>                  from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
>                  from /usr/local/share/systemtap/runtime/runtime.h:24,
>                  from
> /tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.c:24:
> include/linux/kernfs.h:331:1: note: expected 'const char *' but
> argument is of type 'const unsigned char *'
>  kernfs_find_and_get(struct kernfs_node *kn, const char *name)
>  ^
> cc1: all warnings being treated as errors
> make[4]: *** [/tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.o]
> Error 1
> make[3]: *** [_module_/tmp/stap5eHu9T] Error 2
> WARNING: kbuild exited with status: 2
> Pass 4: compilation failed.  [man error::pass4]
> 
> **** aborting testing.
> 
> make[2]: Leaving directory `/root/systemtap/testsuite'
> if test -n ""; then mail  < systemtap.sum; fi
> make[1]: Leaving directory `/root/systemtap/testsuite'
> 
> Please let me know if you need more information.
> 
> Best regards
> Naresh Kamboju
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness
  2014-04-21 20:15 ` William Cohen
@ 2014-04-21 22:20   ` Victor Kamensky
  2014-04-22 16:16     ` William Cohen
  0 siblings, 1 reply; 6+ messages in thread
From: Victor Kamensky @ 2014-04-21 22:20 UTC (permalink / raw)
  To: William Cohen, Naresh Kamboju
  Cc: Frank Ch. Eigler, systemtap, Fathi Boudra, Milosz Wasilewski

On 21 April 2014 13:15, William Cohen <wcohen@redhat.com> wrote:
> On 04/19/2014 02:53 PM, Naresh Kamboju wrote:
>> Hi,
>>
>> The systemtap test suite compilation failed with below error.
>
> Hi,
>
> On an ARM chromebook I have a linux kernel built from the mainline git repository (2.15.0-rc2) and the current version of systemtap checked out from the git repo. I am not seeing the error messages below.

William, Does your kernel config have CONFIG_CC_STACKPROTECTOR set?
Also what is your compiler version?

On my arndale board everything works OK with
CONFIG_CC_STACKPROTECTOR=y and Linaro OE
based rootfs with gcc Linaro GCC 4.8-2014.02:

Here are my settings:

root@genericarmv7a:~# zcat /proc/config.gz | grep STACKPROTECTOR
CONFIG_HAVE_CC_STACKPROTECTOR=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_CC_STACKPROTECTOR_NONE is not set
CONFIG_CC_STACKPROTECTOR_REGULAR=y
# CONFIG_CC_STACKPROTECTOR_STRONG is not set

Host: Linux genericarmv7a 3.14.0 #2 SMP Mon Apr 21 14:51:04 PDT 2014
armv7l GNU/Linux
Snapshot: version 2.5/0.158, commit release-2.4-448-g80d1a1b3c06d + changes
GCC: 4.8.3 [gcc Linaro GCC 4.8-2014.02) 4.8.3 20140203 (prerelease)]
Distro: Linux
SElinux: unknown

> -Will
>
>>
>> ARCH: arm
>> ---------------
>>
>> kernel version: 3.14.0-linaro-arndale
>> systemtap location: /usr/local/bin/stap
>> systemtap version: version 2.5/0.158, commit
>> release-2.4-489-ge5fb7aeea34b + changes
>> gcc location: /usr/bin/gcc
>> gcc version: gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
>>
>>
>> **** failed systemtap kernel-devel smoke test:
>>
>> Makefile:622: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR:
>> -fstack-protector not supported by compiler

Most likely it is exactly what module build make says
above: either compiler too old or not configured correctly.
Try to compile something with -fstack-protector and see
whether compilation is fine.

Possible workarounds are either upgrade compiler or
configure kernel without CONFIG_CC_STACKPROTECTOR_REGULAR, i.e
CONFIG_CC_STACKPROTECTOR_NONE=y

Thanks,
Victor

>> In file included from include/linux/kobject.h:21:0,
>>                  from include/linux/module.h:16,
>>                  from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
>>                  from /usr/local/share/systemtap/runtime/runtime.h:24,
>>                  from
>> /tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.c:24:
>> include/linux/sysfs.h: In function 'sysfs_get_dirent':
>> include/linux/sysfs.h:449:2: error: pointer targets in passing
>> argument 2 of 'kernfs_find_and_get' differ in signedness
>> [-Werror=pointer-sign]
>>   return kernfs_find_and_get(parent, name);
>>   ^
>> In file included from include/linux/sysfs.h:15:0,
>>                  from include/linux/kobject.h:21,
>>                  from include/linux/module.h:16,
>>                  from /usr/local/share/systemtap/runtime/linux/runtime.h:14,
>>                  from /usr/local/share/systemtap/runtime/runtime.h:24,
>>                  from
>> /tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.c:24:
>> include/linux/kernfs.h:331:1: note: expected 'const char *' but
>> argument is of type 'const unsigned char *'
>>  kernfs_find_and_get(struct kernfs_node *kn, const char *name)
>>  ^
>> cc1: all warnings being treated as errors
>> make[4]: *** [/tmp/stap5eHu9T/stap_bdd64b2c1a0e84441832fdc380015719_878_src.o]
>> Error 1
>> make[3]: *** [_module_/tmp/stap5eHu9T] Error 2
>> WARNING: kbuild exited with status: 2
>> Pass 4: compilation failed.  [man error::pass4]
>>
>> **** aborting testing.
>>
>> make[2]: Leaving directory `/root/systemtap/testsuite'
>> if test -n ""; then mail  < systemtap.sum; fi
>> make[1]: Leaving directory `/root/systemtap/testsuite'
>>
>> Please let me know if you need more information.
>>
>> Best regards
>> Naresh Kamboju
>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness
  2014-04-21 22:20   ` Victor Kamensky
@ 2014-04-22 16:16     ` William Cohen
  0 siblings, 0 replies; 6+ messages in thread
From: William Cohen @ 2014-04-22 16:16 UTC (permalink / raw)
  To: Victor Kamensky, Naresh Kamboju
  Cc: Frank Ch. Eigler, systemtap, Fathi Boudra, Milosz Wasilewski

On 04/21/2014 06:20 PM, Victor Kamensky wrote:
> On 21 April 2014 13:15, William Cohen <wcohen@redhat.com> wrote:
>> On 04/19/2014 02:53 PM, Naresh Kamboju wrote:
>>> Hi,
>>>
>>> The systemtap test suite compilation failed with below error.
>>
>> Hi,
>>
>> On an ARM chromebook I have a linux kernel built from the mainline git repository (2.15.0-rc2) and the current version of systemtap checked out from the git repo. I am not seeing the error messages below.
> 
> William, Does your kernel config have CONFIG_CC_STACKPROTECTOR set?
> Also what is your compiler version?
> 
> On my arndale board everything works OK with
> CONFIG_CC_STACKPROTECTOR=y and Linaro OE
> based rootfs with gcc Linaro GCC 4.8-2014.02:
> 
> Here are my settings:
> 
> root@genericarmv7a:~# zcat /proc/config.gz | grep STACKPROTECTOR
> CONFIG_HAVE_CC_STACKPROTECTOR=y
> CONFIG_CC_STACKPROTECTOR=y
> # CONFIG_CC_STACKPROTECTOR_NONE is not set
> CONFIG_CC_STACKPROTECTOR_REGULAR=y
> # CONFIG_CC_STACKPROTECTOR_STRONG is not set
> 
> Host: Linux genericarmv7a 3.14.0 #2 SMP Mon Apr 21 14:51:04 PDT 2014
> armv7l GNU/Linux
> Snapshot: version 2.5/0.158, commit release-2.4-448-g80d1a1b3c06d + changes
> GCC: 4.8.3 [gcc Linaro GCC 4.8-2014.02) 4.8.3 20140203 (prerelease)]
> Distro: Linux
> SElinux: unknown
> 

Hi,

Here are my similar setting on Fedora 20 on 32-bit ARM:

[wcohen@chromebook-f19 ~]$ rpm -q gcc
gcc-4.8.2-7.fc20.armv7hl
[wcohen@chromebook-f19 ~]$ uname -a
Linux chromebook-f19 3.15.0-rc2 #24 SMP Mon Apr 21 14:19:42 EDT 2014 armv7l armv7l armv7l GNU/Linux
[wcohen@chromebook-f19 linux]$ grep STACKPROTECTOR .config
CONFIG_HAVE_CC_STACKPROTECTOR=y
# CONFIG_CC_STACKPROTECTOR is not set
CONFIG_CC_STACKPROTECTOR_NONE=y
# CONFIG_CC_STACKPROTECTOR_REGULAR is not set
# CONFIG_CC_STACKPROTECTOR_STRONG is not set

>> -Will
>>
>>>
>>> ARCH: arm
>>> ---------------
>>>
>>> kernel version: 3.14.0-linaro-arndale
>>> systemtap location: /usr/local/bin/stap
>>> systemtap version: version 2.5/0.158, commit
>>> release-2.4-489-ge5fb7aeea34b + changes
>>> gcc location: /usr/bin/gcc
>>> gcc version: gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1
>>>
>>>
>>> **** failed systemtap kernel-devel smoke test:
>>>
>>> Makefile:622: Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR:
>>> -fstack-protector not supported by compiler
> 
> Most likely it is exactly what module build make says
> above: either compiler too old or not configured correctly.
> Try to compile something with -fstack-protector and see
> whether compilation is fine.
> 
> Possible workarounds are either upgrade compiler or
> configure kernel without CONFIG_CC_STACKPROTECTOR_REGULAR, i.e
> CONFIG_CC_STACKPROTECTOR_NONE=y
> 
> Thanks,
> Victor
> 

It looks like my kernel has the CONFIG_CC_STACKPROTECTOR_NONE set.

-Will

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-04-22 16:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-19 18:53 systemtap test suite compilation failed: include/linux/sysfs.h:449:2: argument 2 of 'kernfs_find_and_get' differ in signedness Naresh Kamboju
2014-04-21 14:15 ` Frank Ch. Eigler
2014-04-21 16:20   ` Josh Stone
2014-04-21 20:15 ` William Cohen
2014-04-21 22:20   ` Victor Kamensky
2014-04-22 16:16     ` William Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).