All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xsm: fix printf format string for strlen result
       [not found] <CAF1bEnyhhRfLB_RjwD7UuOY7W5oRTvJ6cb8TzxFanjJFcLC=Mg@mail.gmail.com>
@ 2013-04-15 13:36 ` Ian Campbell
  2013-04-22 12:28   ` Ian Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2013-04-15 13:36 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-users, Daniel De Graaf, Ian Campbell

strlen returns size_t:

policydb.c: In function ‘policydb_read’:
policydb.c:1779: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’

This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit Xen
4.2.x. I expect it affects ARM too.

Reported-by: Dharshini Tharmaraj <dharshinitharmaraj@gmail.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
 xen/xsm/flask/ss/policydb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c
index fefcd59..bdec4ac 100644
--- a/xen/xsm/flask/ss/policydb.c
+++ b/xen/xsm/flask/ss/policydb.c
@@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp)
     if ( len != strlen(POLICYDB_STRING) )
     {
         printk(KERN_ERR "Flask:  policydb string length %d does not "
-               "match expected length %lu\n",
+               "match expected length %zu\n",
                len, strlen(POLICYDB_STRING));
         goto bad;
     }
-- 
1.7.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] xsm: fix printf format string for strlen result
  2013-04-15 13:36 ` [PATCH] xsm: fix printf format string for strlen result Ian Campbell
@ 2013-04-22 12:28   ` Ian Campbell
  2013-04-29 15:50     ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Campbell @ 2013-04-22 12:28 UTC (permalink / raw)
  To: xen-devel; +Cc: xen-users, Daniel De Graaf, Keir Fraser, Jan Beulich

Adding Keir + Jan.

On Mon, 2013-04-15 at 14:36 +0100, Ian Campbell wrote:
> strlen returns size_t:
> 
> policydb.c: In function ‘policydb_read’:
> policydb.c:1779: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’
> 
> This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit Xen
> 4.2.x. I expect it affects ARM too.
> 
> Reported-by: Dharshini Tharmaraj <dharshinitharmaraj@gmail.com>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> ---
>  xen/xsm/flask/ss/policydb.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c
> index fefcd59..bdec4ac 100644
> --- a/xen/xsm/flask/ss/policydb.c
> +++ b/xen/xsm/flask/ss/policydb.c
> @@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp)
>      if ( len != strlen(POLICYDB_STRING) )
>      {
>          printk(KERN_ERR "Flask:  policydb string length %d does not "
> -               "match expected length %lu\n",
> +               "match expected length %zu\n",
>                 len, strlen(POLICYDB_STRING));
>          goto bad;
>      }



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xsm: fix printf format string for strlen result
  2013-04-22 12:28   ` Ian Campbell
@ 2013-04-29 15:50     ` Jan Beulich
  2013-04-29 16:10       ` Daniel De Graaf
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2013-04-29 15:50 UTC (permalink / raw)
  To: Ian Campbell, Daniel De Graaf; +Cc: xen-users, Keir Fraser, xen-devel

>>> On 22.04.13 at 14:28, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> Adding Keir + Jan.

Would really be Daniel to give his ack here. It's a trivial enough
change, so if I don't see an ack soon, I'll probably commit this
anyway...

Jan

> On Mon, 2013-04-15 at 14:36 +0100, Ian Campbell wrote:
>> strlen returns size_t:
>> 
>> policydb.c: In function ‘policydb_read’:
>> policydb.c:1779: error: format ‘%lu’ expects type ‘long unsigned int’, but 
> argument 3 has type ‘size_t’
>> 
>> This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit 
> Xen
>> 4.2.x. I expect it affects ARM too.
>> 
>> Reported-by: Dharshini Tharmaraj <dharshinitharmaraj@gmail.com>
>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
>> ---
>>  xen/xsm/flask/ss/policydb.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c
>> index fefcd59..bdec4ac 100644
>> --- a/xen/xsm/flask/ss/policydb.c
>> +++ b/xen/xsm/flask/ss/policydb.c
>> @@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp)
>>      if ( len != strlen(POLICYDB_STRING) )
>>      {
>>          printk(KERN_ERR "Flask:  policydb string length %d does not "
>> -               "match expected length %lu\n",
>> +               "match expected length %zu\n",
>>                 len, strlen(POLICYDB_STRING));
>>          goto bad;
>>      }



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xsm: fix printf format string for strlen result
  2013-04-29 15:50     ` Jan Beulich
@ 2013-04-29 16:10       ` Daniel De Graaf
  2013-04-30  7:11         ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel De Graaf @ 2013-04-29 16:10 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-users, Keir Fraser, Ian Campbell, xen-devel

On 04/29/2013 11:50 AM, Jan Beulich wrote:
>>>> On 22.04.13 at 14:28, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>> Adding Keir + Jan.
>
> Would really be Daniel to give his ack here. It's a trivial enough
> change, so if I don't see an ack soon, I'll probably commit this
> anyway...
>
> Jan

Ah, sorry about that, for some reason I didn't register that this was
waiting for my Ack since it seemed like a trivial change.

Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>

>
>> On Mon, 2013-04-15 at 14:36 +0100, Ian Campbell wrote:
>>> strlen returns size_t:
>>>
>>> policydb.c: In function ‘policydb_read’:
>>> policydb.c:1779: error: format ‘%lu’ expects type ‘long unsigned int’, but
>> argument 3 has type ‘size_t’
>>>
>>> This is probably benign on 64-bit x86 but was found by Dharshini on 32-bit
>> Xen
>>> 4.2.x. I expect it affects ARM too.
>>>
>>> Reported-by: Dharshini Tharmaraj <dharshinitharmaraj@gmail.com>
>>> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>>> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
>>> ---
>>>   xen/xsm/flask/ss/policydb.c |    2 +-
>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/xen/xsm/flask/ss/policydb.c b/xen/xsm/flask/ss/policydb.c
>>> index fefcd59..bdec4ac 100644
>>> --- a/xen/xsm/flask/ss/policydb.c
>>> +++ b/xen/xsm/flask/ss/policydb.c
>>> @@ -1737,7 +1737,7 @@ int policydb_read(struct policydb *p, void *fp)
>>>       if ( len != strlen(POLICYDB_STRING) )
>>>       {
>>>           printk(KERN_ERR "Flask:  policydb string length %d does not "
>>> -               "match expected length %lu\n",
>>> +               "match expected length %zu\n",
>>>                  len, strlen(POLICYDB_STRING));
>>>           goto bad;
>>>       }

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] xsm: fix printf format string for strlen result
  2013-04-29 16:10       ` Daniel De Graaf
@ 2013-04-30  7:11         ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2013-04-30  7:11 UTC (permalink / raw)
  To: Daniel De Graaf; +Cc: xen-users, Keir Fraser, Ian Campbell, xen-devel

>>> On 29.04.13 at 18:10, Daniel De Graaf <dgdegra@tycho.nsa.gov> wrote:
> On 04/29/2013 11:50 AM, Jan Beulich wrote:
>>>>> On 22.04.13 at 14:28, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>>> Adding Keir + Jan.
>>
>> Would really be Daniel to give his ack here. It's a trivial enough
>> change, so if I don't see an ack soon, I'll probably commit this
>> anyway...
> 
> Ah, sorry about that, for some reason I didn't register that this was
> waiting for my Ack since it seemed like a trivial change.

Trivial or not, the rule of thumb is that all patches should have
an ack from a maintainer. Otherwise we're getting into the
gray zone of determining where "trivial" ends. So while
exceptions to this are possible, we're trying to limit them...

Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-30  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAF1bEnyhhRfLB_RjwD7UuOY7W5oRTvJ6cb8TzxFanjJFcLC=Mg@mail.gmail.com>
2013-04-15 13:36 ` [PATCH] xsm: fix printf format string for strlen result Ian Campbell
2013-04-22 12:28   ` Ian Campbell
2013-04-29 15:50     ` Jan Beulich
2013-04-29 16:10       ` Daniel De Graaf
2013-04-30  7:11         ` Jan Beulich

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.