* [PATCH] grub-core/lib/libgcrypt/cipher/rijndael.c 2 warnings.
@ 2015-04-13 10:47 Toomas Soome
2015-04-13 16:56 ` Andrei Borzenkov
0 siblings, 1 reply; 5+ messages in thread
From: Toomas Soome @ 2015-04-13 10:47 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 252 bytes --]
hi!
first warning is about comparing signed int with unsigned (int i, unsigned keylen), second warning is suggesting to use { } around the block.
after this update, the grub-core/lib/libgcrypt-grub needs to be re-populated.
rgds,
toomas
[-- Attachment #2: rijndael.diff --]
[-- Type: application/octet-stream, Size: 751 bytes --]
diff --git a/grub-core/lib/libgcrypt/cipher/rijndael.c b/grub-core/lib/libgcrypt/cipher/rijndael.c
index 559550b..a064245 100644
--- a/grub-core/lib/libgcrypt/cipher/rijndael.c
+++ b/grub-core/lib/libgcrypt/cipher/rijndael.c
@@ -181,7 +181,8 @@ do_setkey (RIJNDAEL_context *ctx, const byte *key, const unsigned keylen)
static int initialized = 0;
static const char *selftest_failed=0;
int rounds;
- int i,j, r, t, rconpointer = 0;
+ unsigned i;
+ int j, r, t, rconpointer = 0;
int KC;
union
{
@@ -227,7 +228,9 @@ do_setkey (RIJNDAEL_context *ctx, const byte *key, const unsigned keylen)
KC = 4;
if (0)
+ {
;
+ }
#ifdef USE_PADLOCK
else if ((_gcry_get_hw_features () & HWF_PADLOCK_AES))
{
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] grub-core/lib/libgcrypt/cipher/rijndael.c 2 warnings.
2015-04-13 10:47 [PATCH] grub-core/lib/libgcrypt/cipher/rijndael.c 2 warnings Toomas Soome
@ 2015-04-13 16:56 ` Andrei Borzenkov
2015-04-13 17:32 ` Toomas Soome
0 siblings, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2015-04-13 16:56 UTC (permalink / raw)
To: Toomas Soome; +Cc: The development of GRUB 2
В Mon, 13 Apr 2015 13:47:11 +0300
Toomas Soome <tsoome@me.com> пишет:
>
> hi!
>
> first warning is about comparing signed int with unsigned (int i, unsigned keylen), second warning is suggesting to use { } around the block.
>
> after this update, the grub-core/lib/libgcrypt-grub needs to be re-populated.
>
> rgds,
> toomas
>
well, this is is external project and policy is normally to fix such
issues upstream. Could you check if this is fixed in current libgcrypt?
If not could you report it there?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] grub-core/lib/libgcrypt/cipher/rijndael.c 2 warnings.
2015-04-13 16:56 ` Andrei Borzenkov
@ 2015-04-13 17:32 ` Toomas Soome
2015-04-15 5:16 ` Andrei Borzenkov
0 siblings, 1 reply; 5+ messages in thread
From: Toomas Soome @ 2015-04-13 17:32 UTC (permalink / raw)
To: Andrei Borzenkov; +Cc: The development of GRUB 2
hi!
just checked the git://git.gnupg.org/libgcrypt.git - apparently it has been changed compared to one included in grub; the int i versus unsigned keylen is still there (visual inspection), the { } were inserted to if (0) ; statement.
so second half is already fixed. I did report the signed/unsigned compare issue to gcrypt-devel, but then the question is about updating libcgrypt in grub; the reason I have posted this fix is to get warnings cleared to make illumos build system happy with as little local fixes as possible… well, of course i can just keep this commit in my local branch anyhow.
btw, I also have rather large update in queue, zfs module rework. I suppose its not good idea directly to list, are there alternative ways?
rgds,
toomas
> On 13.04.2015, at 19:56, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>
> В Mon, 13 Apr 2015 13:47:11 +0300
> Toomas Soome <tsoome@me.com> пишет:
>
>>
>> hi!
>>
>> first warning is about comparing signed int with unsigned (int i, unsigned keylen), second warning is suggesting to use { } around the block.
>>
>> after this update, the grub-core/lib/libgcrypt-grub needs to be re-populated.
>>
>> rgds,
>> toomas
>>
>
> well, this is is external project and policy is normally to fix such
> issues upstream. Could you check if this is fixed in current libgcrypt?
> If not could you report it there?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] grub-core/lib/libgcrypt/cipher/rijndael.c 2 warnings.
2015-04-13 17:32 ` Toomas Soome
@ 2015-04-15 5:16 ` Andrei Borzenkov
2015-04-15 5:44 ` Toomas Soome
0 siblings, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2015-04-15 5:16 UTC (permalink / raw)
To: Toomas Soome; +Cc: The development of GRUB 2
В Mon, 13 Apr 2015 20:32:53 +0300
Toomas Soome <tsoome@me.com> пишет:
> hi!
>
> just checked the git://git.gnupg.org/libgcrypt.git - apparently it has been changed compared to one included in grub; the int i versus unsigned keylen is still there (visual inspection), the { } were inserted to if (0) ; statement.
>
> so second half is already fixed. I did report the signed/unsigned compare issue to gcrypt-devel, but then the question is about updating libcgrypt in grub;
It gets updated every now and then. "Upstream first" makes sure that if
we add local patch it won't be lost next time library is pulled in.
Just to be sure - these are just warnings, right? They do not cause
build failure or any regression?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] grub-core/lib/libgcrypt/cipher/rijndael.c 2 warnings.
2015-04-15 5:16 ` Andrei Borzenkov
@ 2015-04-15 5:44 ` Toomas Soome
0 siblings, 0 replies; 5+ messages in thread
From: Toomas Soome @ 2015-04-15 5:44 UTC (permalink / raw)
To: Andrei Borzenkov; +Cc: The development of GRUB 2
> On 15.04.2015, at 8:16, Andrei Borzenkov <arvidjaar@gmail.com> wrote:
>
> В Mon, 13 Apr 2015 20:32:53 +0300
> Toomas Soome <tsoome@me.com> пишет:
>
>> hi!
>>
>> just checked the git://git.gnupg.org/libgcrypt.git - apparently it has been changed compared to one included in grub; the int i versus unsigned keylen is still there (visual inspection), the { } were inserted to if (0) ; statement.
>>
>> so second half is already fixed. I did report the signed/unsigned compare issue to gcrypt-devel, but then the question is about updating libcgrypt in grub;
>
> It gets updated every now and then. "Upstream first" makes sure that if
> we add local patch it won't be lost next time library is pulled in.
>
> Just to be sure - these are just warnings, right? They do not cause
> build failure or any regression?
they are just warnings, yes, and *can* cause problems if the -Werror is used. which is the case in some build environments.
anyhow, as I wrote, I did report signed vs unsigned issue to upstream, I haven’t seen any responses yet.
rgds,
toomas
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-15 5:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-13 10:47 [PATCH] grub-core/lib/libgcrypt/cipher/rijndael.c 2 warnings Toomas Soome
2015-04-13 16:56 ` Andrei Borzenkov
2015-04-13 17:32 ` Toomas Soome
2015-04-15 5:16 ` Andrei Borzenkov
2015-04-15 5:44 ` Toomas Soome
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.