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]
Date:	Sun, 15 Dec 2013 15:52:47 +0100
From:	Levente Kurusa <levex@...ux.com>
To:	Doron Tsur <doront@...lanox.com>, linux-kernel@...r.kernel.org
CC:	itaib@...lanox.com
Subject: Re: [PATCH] include/uapi/linux/netlink.h -Wall -Wextra -Werror support
 fix

On 12/15/2013 03:40 PM, Doron Tsur wrote:
> For code using:
>     #include <linux/netlink.h>
>     NLMSG_OK
>     -I<INSTALL_HDR_PATH>/include
> 
> Tested-by: Doron Tsur <doront@...lanox.com>
This should go where your Signed-off-by line is.

[insert newlines here]
> Test log:
> Compilation environments:
> Ubuntu 13.10, x86_64, gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
> Ubuntu 13.04, x86_64, gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
> [ -ftrack-macro-expansion=2 issue submitted:
>   gcc.gnu.org/bugzilla/show_bug.cgi?id=59495 ]


[insert newlines here]
> Kernel headers installed at:
> make -C .../linux-stable headers_install \
>     INSTALL_HDR_PATH=/builds/kernel_tests_user_headers/


[insert newlines here]
> Pre-patch compilation:
> gcc -Wall -Wextra -Werror
> -I/builds/kernel_tests_pre_patch_user_headers/include
> include-uapi-linux-netlink.h.test.c
> In file included from include-uapi-linux-netlink.h.test.c:2:0:
> include-uapi-linux-netlink.h.test.c: In function ‘main’:
> /builds/kernel_tests_pre_patch_user_headers/include/linux/netlink.h:89:24:
> error: comparison between signed and unsigned integer expressions
> [-Werror=sign-compare]
>        (nlh)->nlmsg_len <= (len))
>                         ^
> include-uapi-linux-netlink.h.test.c:26:5: note: in expansion of macro ‘NLMSG_OK’
>      NLMSG_OK(&auxiliary_netlink_header, active_len));
>      ^
> cc1: all warnings being treated as errors


[insert newlines here]
> Post-patch:
> $ gcc  -Wall -Wextra -Werror
> -I/builds/kernel_tests_user_headers/include/
> include-uapi-linux-netlink.h.test.c


[insert newlines here]
> $ ./a.out
> nlmsg_len= 1, len = 1 NLMSG_OK(nlh,len) test result: 0
> nlmsg_len= 1, len = 3000 NLMSG_OK(nlh,len) test result: 0
> nlmsg_len= 3000, len = 1 NLMSG_OK(nlh,len) test result: 0
> nlmsg_len= 3000, len = 3000 NLMSG_OK(nlh,len) test result: 1
> 
> Signed-off-by: Doron Tsur <doront@...lanox.com>

Please make your commit message understandable by adding newlines and such.
Also it doesn't say what did you change and why. All it says, that there
was a warning and post-patch there is no warning.

-- 
Regards,
Levente Kurusa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ