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: <CAOAMb1A71iNuRHkuTynBF35DjZx0jHMz+SrwbMUzkdp4i1FZ7A@mail.gmail.com>
Date:	Tue, 11 Sep 2012 10:53:14 +0900
From:	Chanho Min <chanho0207@...il.com>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	H Hartley Sweeten <hsweeten@...ionengravers.com>,
	Stephen Warren <swarren@...dia.com>,
	David Howells <dhowells@...hat.com>,
	Nicolas Pitre <nico@...aro.org>
Subject: Re: [PATCH] ARM: Fix build warning in do_alignment.

> What it's caused by is do_alignment_t32_to_handler(), and its assignment
> through a pointer of this variable.  You can see that this is the cause
> because the patch below fixes the warning.
We couldn't fix the warning with your patch. the patch below fixes it instead.
IMHO, gcc can't seems to know that do_alignment_ldmstm never returns TYPE_LDST.
So It just warn that do_alignment_finish_ldst is called with the
uninitialized value.
I know gcc is not smart enough to see all the reasons. So, It is optional.
Also, I'm not sure these optional warning should be fixed.
Anyway, this is the last build warning in our whole source when using gcc-4.6.3

Thanks
Chanho,

diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 9107231..978db1f 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -856,8 +856,10 @@ do_alignment(unsigned long addr, unsigned int
fsr, struct pt_regs *regs)
 	case 0x08000000:	/* ldm or stm, or thumb-2 32bit instruction */
 		if (thumb2_32b)
 			handler = do_alignment_t32_to_handler(&instr, regs, &offset);
-		else
+		else {
+			offset.un = 0;
 			handler = do_alignment_ldmstm;
+		}
 		break;

 	default:
--
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