Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-Wpointer-sign in arch/s390/boot/kaslr.c #862

Closed
nathanchance opened this issue Feb 7, 2020 · 3 comments
Closed

-Wpointer-sign in arch/s390/boot/kaslr.c #862

nathanchance opened this issue Feb 7, 2020 · 3 comments
Assignees
Labels
-Wpointer-sign [ARCH] s390 This bug impacts ARCH=s390 [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.6 This bug was fixed in Linux 5.6

Comments

@nathanchance
Copy link
Member

../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter of type 'const u8 *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign]                                                                                                                      
                                  (char *) entropy, (char *) entropy,                                                                                           
                                                    ^~~~~~~~~~~~~~~~                                                                                            
../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to parameter 'src' here                                                                         
                            u8 *dest, const u8 *src, long src_len)                                                                                              
                                                ^             

Should just need to change the cast.

@nathanchance nathanchance added [BUG] linux A bug that should be fixed in the mainline kernel. [ARCH] s390 This bug impacts ARCH=s390 -Wpointer-sign labels Feb 7, 2020
@nathanchance nathanchance self-assigned this Feb 7, 2020
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added the [PATCH] Submitted A patch has been submitted for review label Feb 8, 2020
fengguang pushed a commit to 0day-ci/linux that referenced this issue Feb 11, 2020
Clang warns:

../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter
of type 'const u8 *' (aka 'const unsigned char *') converts between
pointers to integer
types with different sign [-Wpointer-sign]
                                  (char *) entropy, (char *) entropy,
                                                    ^~~~~~~~~~~~~~~~
../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to
parameter 'src' here
                            u8 *dest, const u8 *src, long src_len)
                                                ^
2 warnings generated.

Fix the cast to match what else is done in this function.

Fixes: b2d24b9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
Link: ClangBuiltLinux#862
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
ruscur pushed a commit to ruscur/linux that referenced this issue Feb 18, 2020
Clang warns:

../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter
of type 'const u8 *' (aka 'const unsigned char *') converts between
pointers to integer
types with different sign [-Wpointer-sign]
                                  (char *) entropy, (char *) entropy,
                                                    ^~~~~~~~~~~~~~~~
../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to
parameter 'src' here
                            u8 *dest, const u8 *src, long src_len)
                                                ^
2 warnings generated.

Fix the cast to match what else is done in this function.

Fixes: b2d24b9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
Link: ClangBuiltLinux#862
Link: https://lkml.kernel.org/r/20200208141052.48476-1-natechancellor@gmail.com
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Submitted A patch has been submitted for review labels Feb 18, 2020
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [FIXED][LINUX] 5.6 This bug was fixed in Linux 5.6 and removed [PATCH] Accepted A submitted patch has been accepted upstream labels Feb 22, 2020
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Feb 28, 2020
commit 788d671 upstream.

Clang warns:

../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter
of type 'const u8 *' (aka 'const unsigned char *') converts between
pointers to integer
types with different sign [-Wpointer-sign]
                                  (char *) entropy, (char *) entropy,
                                                    ^~~~~~~~~~~~~~~~
../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to
parameter 'src' here
                            u8 *dest, const u8 *src, long src_len)
                                                ^
2 warnings generated.

Fix the cast to match what else is done in this function.

Fixes: b2d24b9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
Link: ClangBuiltLinux/linux#862
Link: https://lkml.kernel.org/r/20200208141052.48476-1-natechancellor@gmail.com
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Feb 28, 2020
commit 788d671 upstream.

Clang warns:

../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter
of type 'const u8 *' (aka 'const unsigned char *') converts between
pointers to integer
types with different sign [-Wpointer-sign]
                                  (char *) entropy, (char *) entropy,
                                                    ^~~~~~~~~~~~~~~~
../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to
parameter 'src' here
                            u8 *dest, const u8 *src, long src_len)
                                                ^
2 warnings generated.

Fix the cast to match what else is done in this function.

Fixes: b2d24b9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
Link: ClangBuiltLinux/linux#862
Link: https://lkml.kernel.org/r/20200208141052.48476-1-natechancellor@gmail.com
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jackpot51 pushed a commit to pop-os/linux that referenced this issue Apr 13, 2020
BugLink: https://bugs.launchpad.net/bugs/1868865

commit 788d671 upstream.

Clang warns:

../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter
of type 'const u8 *' (aka 'const unsigned char *') converts between
pointers to integer
types with different sign [-Wpointer-sign]
                                  (char *) entropy, (char *) entropy,
                                                    ^~~~~~~~~~~~~~~~
../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to
parameter 'src' here
                            u8 *dest, const u8 *src, long src_len)
                                                ^
2 warnings generated.

Fix the cast to match what else is done in this function.

Fixes: b2d24b9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
Link: ClangBuiltLinux#862
Link: https://lkml.kernel.org/r/20200208141052.48476-1-natechancellor@gmail.com
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
mseaster-wr pushed a commit to WindRiver-Labs/linux-yocto-5.2 that referenced this issue Jun 10, 2020
commit 788d671517b5c81efbed9310ccbadb8cca86a08e upstream.

Clang warns:

../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter
of type 'const u8 *' (aka 'const unsigned char *') converts between
pointers to integer
types with different sign [-Wpointer-sign]
                                  (char *) entropy, (char *) entropy,
                                                    ^~~~~~~~~~~~~~~~
../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to
parameter 'src' here
                            u8 *dest, const u8 *src, long src_len)
                                                ^
2 warnings generated.

Fix the cast to match what else is done in this function.

Fixes: b2d24b9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
Link: ClangBuiltLinux/linux#862
Link: https://lkml.kernel.org/r/20200208141052.48476-1-natechancellor@gmail.com
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-Wpointer-sign [ARCH] s390 This bug impacts ARCH=s390 [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.6 This bug was fixed in Linux 5.6
Projects
None yet
Development

No branches or pull requests

1 participant