From: Randy Dunlap <rdunlap@infradead.org>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Mimi Zohar <zohar@us.ibm.com>,
axboe@kernel.dk
Subject: [PATCH -next] security/integrity/ima: make part_pack_uuid() always visible
Date: Wed, 20 Feb 2013 11:30:28 -0800 [thread overview]
Message-ID: <51252454.1050609@infradead.org> (raw)
In-Reply-To: <1361379050.29360.12.camel@falcor1>
On 02/20/13 08:50, Mimi Zohar wrote:
> On Tue, 2013-02-19 at 16:28 -0800, Randy Dunlap wrote:
>> On 02/18/13 22:03, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20130218:
>>>
>>
>> on x86_64:
>>
>> CC security/integrity/ima/ima_policy.o
>> security/integrity/ima/ima_policy.c: In function 'ima_parse_rule':
>> security/integrity/ima/ima_policy.c:538:4: error: implicit declaration of function 'part_pack_uuid' [-Werror=implicit-function-declaration]
>> cc1: some warnings being treated as errors
>> make[4]: *** [security/integrity/ima/ima_policy.o] Error 1
>>
>>
>> Full randconfig file is attached.
>
> part_pack_uuid() is only defined for CONFIG_BLOCK in
> include/linux/genhd.h. One solution would be to add a stub function
> definition in include/linux/genhd.h, the other option would be to ifndef
> CONFIG_BLOCK in C code.
ITYM #ifdef CONFIG_BLOCK to call part_pack_uuid().
Yes, either of those would work.
How about a third option -- just make part_pack_uuid() always visible
and not just a stub? Patch is below.
---
From: Randy Dunlap <rdunlap@infradead.org>
Fix build error when CONFIG_BLOCK is not enabled
by making the static inline function part_pack_uuid()
visible independent of CONFIG_BLOCK's setting.
security/integrity/ima/ima_policy.c:538:4: error: implicit declaration of function 'part_pack_uuid' [-Werror=implicit-function-declaration]
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Mimi Zohar <zohar@us.ibm.com>
---
include/linux/genhd.h | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
--- linux-next-20130220.orig/include/linux/genhd.h
+++ linux-next-20130220/include/linux/genhd.h
@@ -213,24 +213,6 @@ static inline struct gendisk *part_to_di
return NULL;
}
-static inline void part_pack_uuid(const u8 *uuid_str, u8 *to)
-{
- int i;
- for (i = 0; i < 16; ++i) {
- *to++ = (hex_to_bin(*uuid_str) << 4) |
- (hex_to_bin(*(uuid_str + 1)));
- uuid_str += 2;
- switch (i) {
- case 3:
- case 5:
- case 7:
- case 9:
- uuid_str++;
- continue;
- }
- }
-}
-
static inline int disk_max_parts(struct gendisk *disk)
{
if (disk->flags & GENHD_FL_EXT_DEVT)
@@ -720,4 +702,22 @@ static inline dev_t blk_lookup_devt(cons
#endif /* CONFIG_BLOCK */
+static inline void part_pack_uuid(const u8 *uuid_str, u8 *to)
+{
+ int i;
+ for (i = 0; i < 16; ++i) {
+ *to++ = (hex_to_bin(*uuid_str) << 4) |
+ (hex_to_bin(*(uuid_str + 1)));
+ uuid_str += 2;
+ switch (i) {
+ case 3:
+ case 5:
+ case 7:
+ case 9:
+ uuid_str++;
+ continue;
+ }
+ }
+}
+
#endif /* _LINUX_GENHD_H */
next prev parent reply other threads:[~2013-02-20 19:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 6:03 linux-next: Tree for Feb 19 Stephen Rothwell
2013-02-20 0:28 ` linux-next: Tree for Feb 19 (security/integrity/ima) Randy Dunlap
2013-02-20 16:50 ` Mimi Zohar
2013-02-20 19:30 ` Randy Dunlap [this message]
2013-02-20 19:46 ` [PATCH -next] security/integrity/ima: make part_pack_uuid() always visible Mimi Zohar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51252454.1050609@infradead.org \
--to=rdunlap@infradead.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=zohar@linux.vnet.ibm.com \
--cc=zohar@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox