From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Sat, 03 Sep 2011 22:32:14 +1000 Subject: [U-Boot] [RFC][PATCH] Generate CRC of structure of Global Data for standalone apps In-Reply-To: <20110903121320.3CC82140ABD4@gemini.denx.de> References: <1315048903-23217-1-git-send-email-graeme.russ@gmail.com> <20110903121320.3CC82140ABD4@gemini.denx.de> Message-ID: <4E621E4E.8010703@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Wolfgang, On 03/09/11 22:13, Wolfgang Denk wrote: > Dear Graeme Russ, > > In message <1315048903-23217-1-git-send-email-graeme.russ@gmail.com> you wrote: >> The CRC is generated by: >> - Pre-processing common.h (which includes global_data.h after all the >> board, arch and SoC defines are set) >> - Searches for a chunk of text delimited by 'typedef struct global_data {' >> and '} gd_t;' >> - Strips all blank lines and whitespaces (pre-processor already took care >> of comments) >> - Pipes the result through 'tools/gencrc32header/gencrc32header' > > Sorry, but I don't consider this an even halfway robust or reliable > method. Minor changes to the text formatting, changes to remove for > example the typedef, renames of fields or appending additional fields > will all break this, while tere will actually be no problems with the > code. > > THis is a level of make-believe security that is fragile, and I doubt > if it's really useful, or needed. > > > It's a nice idea, but the problem it addresses is mostly a theoretical > one - has anybody seen any actual bug reports that this has ever been > a real problem? Back the original question that spawned this - asked several times and never answered - Does a modification to the Global Data structure trigger an increment of XF_VERSION? If the answer is No, then no problems, dropping this is OK by me However, if the answer is 'yes', what do we do about the #ifdefs? Regards, Graeme