Skip to contentSkip to conversation

secilc: segfault on what should be "Recursive block call found"?

DISCUSSION Dominick Grift 2 participants 4 messages Sep 12, 2015 – Sep 14, 2015 SELinux security module

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

- ----- Forwarded message from Dominick Grift <[email protected]> -----

Date: Sat, 12 Sep 2015 14:51:22 +0200
From: Dominick Grift <[email protected]>
To: [email protected]
Subject: secilc: segfault on what should be "Recursive block call found"?
User-Agent: Every email client sucks, this one just sucks less.

I am knee-deep in namespaces and hitting all kinds of exotic challenges

I had a macro with the same name as a macro call in it, like:

(in bla
(macro foo ((type ARG1))
call foo (ARG1)))

secilc helpfully threw a message telling me:

Recursive macro call found
Failed to compile cildb: -1

Great. after a short struggle i managed to locate the issue (unfortunately secilc was not more specific as to the location of the issue)

Now i am hitting what seems to be a similar issue to the above. except that in this case its not about macros but about block

consider:

(in bla
(block foo_blk
(blockabstract foo_blk)

(blockinherit foo_blk))

In this case, though secilc segfaults, instead of telling me:

Recursive block call found
Failed to compile cildb: -1

this is just theory though... but i suspect the above is true

- --
02DFF788
4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788
https://sks-keyservers.net/pks/lookup?op=get&search=0x314883A202DFF788
Dominick Grift

- ----- End forwarded message -----

- --
02DFF788
4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788
https://sks-keyservers.net/pks/lookup?op=get&search=0x314883A202DFF788
Dominick Grift
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQGcBAEBCgAGBQJV9CA8AAoJENAR6kfG5xmcbWoL/1bxjVcZTjSGEwvOJJL0HDSi r1zyPy/o/9cjAE1Zw3uVBxnzESwpb1nWepQPYhkJ8d79tzS4vgV14MeEw3RHpboF 9eKJg5UvmhCjMk5H+Kjrg6wuAvK+4wqTHTY0IMNjkRrvzQ2PYNWM/kmJedAqO3SE 4R2uTw1H0JIx4+w+ZcQZwOP1oxYjdJAJCrvryY3I6FGPuhWB+yX5OIJ48oSHcbJR WjYlKvYFuK2obAYlGcLBdf1Rdl4K5bCUUMm+rgv5r7cQnd8tlnqnx9rx8DKv0tt+ V5OZc4Kok3m4+U/mTNl/mwTwHh9muen9bw7AfJ8R1OaoW9TJmefKHETvqMVLv3MF fEma8v+TZL+UXxE45tCYTeezm8YhIWeGJ9Xi6yTkDkAsNtUrW3aL9/R6tgimuIwF aA3lsgHvm9fvBHRTAK/Db6OygDp1eedF0t/OMZHGhW4/bmLSwYOt3vnlE0NTJHk9 Je2lwOCHhnBXxnLfCUrUJMVdH1N5K91cI2ie6KBC5A==
=CkY3
-----END PGP SIGNATURE-----

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Sat, Sep 12, 2015 at 02:53:21PM +0200, Dominick Grift wrote:
<snip>

Quoted 6 lines

secilc helpfully threw a message telling me:

Recursive macro call found
Failed to compile cildb: -1

The above is an example for how error message should *not* look. Here is an example of how they *should* look:

macro statement is not allowed in optionals (/run/user/1000/dssp/sources/modules/contrib/system/usersubj/macros.cil:819)

- --
02DFF788
4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788
https://sks-keyservers.net/pks/lookup?op=get&search=0x314883A202DFF788
Dominick Grift
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQGcBAEBCgAGBQJV9spwAAoJENAR6kfG5xmcx4kL/i4JxNAuu3csjwi2RK+CsbNY 1E/Bqwuo4YARC5pXdxHRuOd6NPeJYZg1ZY0zB44qDN17iMGfjzcI5zCfO8HDerov HkoG/h462Z2JC/qdu0hyrhic5tY1t+kh5l4cIHVsxPfbvpDv27+UKRa4ufGzpqTd moqXlh84T/6IOVhEH9bHF5gp5vFRyXkM5B8Fb3p6Q7pvVwtxDn2js3YljcrxBrOo 6NHZ4BrLSw4sJgfllnVt3HzwucrruyMZwR1F7aB5b+sErsFRV/akl2Bq+ULf1uDU EVhblfIJyy2HvJkzHKNxpOIS+iYb7GMSmdZ4CWXIMTwewRekmHjvwhzXbahjrM53 bv3KK7J1Z3YF69ORzonbDLIzCHWuXfoDCmFxEseG19yxpyhPgHnfOwrwIBuTUeD4 b/bRUDmKwI5qGDjFQu9fCyNRDQ9nLENLHI3lqBeFYP+7dqPuQIfLOHjAnjV28J2a gAJFv6eFBsItDQmF5BxuKeA6EdRGpv6IUu8emw04+A==
=4D0w
-----END PGP SIGNATURE-----

#2 lore raw
Quoted 5 lines · Dominick Grift

On Sat, Sep 12, 2015 at 02:53:21PM +0200, Dominick Grift wrote:
<snip>

Quoted 1 line

secilc helpfully threw a message telling me:

Quoted 9 lines
Quoted 2 lines

Recursive macro call found
Failed to compile cildb: -1

The above is an example for how error message should *not* look. Here is an example of how they *should* look:

macro statement is not allowed in optionals (/run/user/1000/dssp/sources/modules/contrib/system/usersubj/macros.cil:819)

The original issue was with recursive blockinherits. Should have a patch out shortly. Will also improve the error message for macros (and blockinherits) to show a trace of where the recursion came form.

- Steve

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Quoted 13 lines · Steve Lawrence
Quoted 12 lines · Dominick Grift

On Sat, Sep 12, 2015 at 02:53:21PM +0200, Dominick Grift wrote:
<snip>

Quoted 4 lines

secilc helpfully threw a message telling me:

Recursive macro call found
Failed to compile cildb: -1

The above is an example for how error message should *not* look. Here is an example of how they *should* look:

Quoted 7 lines
Quoted 2 lines

macro statement is not allowed in optionals (/run/user/1000/dssp/sources/modules/contrib/system/usersubj/macros.cil:819)

The original issue was with recursive blockinherits. Should have a patch out shortly. Will also improve the error message for macros (and blockinherits) to show a trace of where the recursion came form.

Thanks. here is another one that could use the same threatment:

macro is not a block
Failed to compile cildb: -1

Quoted 7 lines

- Steve
_______________________________________________
Selinux mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to [email protected].

- --
02DFF788
4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788
https://sks-keyservers.net/pks/lookup?op=get&search=0x314883A202DFF788
Dominick Grift
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQGcBAEBCgAGBQJV9tXdAAoJENAR6kfG5xmcc8EL/A5ESNaKxoC12WPlpb5tK+xI fYg3iZdSnQx9KPq1QQe4g9nk6NBQdXBfc/Z8lK9Dclna9NKsOyudc4KSqJW6Mx90 ja86g+if24oPQQ6jIONOI/JP1+TXVawCzLpcKGxrXgiTmVbtriBAgvc13p1TETYZ JF1AuwP11N9J/vUVbhQx5WVewiwHMMtU3ilvp3lAJ3SGowDla/DB8ApB9P39A5T6 BZu2tn9IPq2NSjkcrVlutSwlPrpAdlqgRz6xwHOBFyIHQ64XdO5GxPKYA461Z4hI TteLe3MiL8I+FMed2Y/cQWPn73EqP88I1DgZIlAj861L9niPsJQJ9ilZUUbn92xI Vpu2lssfp3lPBzdIVkm+sgv/vjo7b4tROH7zyIzyGI9pB9K19Dq9fgFsP39yXspX 6TbDD0Fo1yvEnJrWcij7xfmwM22Ryt9jxyFUYQ1uEjr27xBUYcmgobSoChnjE8co +fz0NyzH/54YE5Kstcshkvc9oK5NgYO1eJz3/yxsIg==
=0Zmh
-----END PGP SIGNATURE-----