Skip to contentSkip to conversation

Selabel/selinux support in mtd-utils for ubifs

DISCUSSION Ritesh Harjani 2 participants 3 messages May 21, 2018 – May 22, 2018 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hello all,

Could anyone please help whether selinux support is fully present on ubifs or not?

Below are my observations:-
1. Selinux support was added in ubifs kernel via below patch "UBIFS: Add security.* XATTR support for the UBIFS"

2. Extended attribute support was added in mtd-utils via below patch. "mkfs.ubifs: Add extended attribute support"

With above I think that selinux could be enabled but only at the boot time using selinux tools.

But I could not see any support to add selinux labels/context information while creating ubifs.img in mtd-utils. I do see below link where something like above was tried but never made upstream. Could anyone please give pointers on whether this support is added/ or bring worked upon?

http://lists.infradead.org/pipermail/linux-mtd/2014-February/052136.html

Also Whether selinux labeling support can be added in the mkfs.ubifs or not? Do we see any issues with this?

I would like to work upon adding selinux support in mtd-utils.
I would appreciate if I could get some pointers on above queries and if anyone has any pointers/suggestions for this.

Regards
Ritesh

Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
#1 lore raw

Ritesh,

Am Montag, 21. Mai 2018, 13:47:53 CEST schrieb Ritesh Harjani:

Quoted 9 lines

Hello all,

Could anyone please help whether selinux support is fully present on ubifs or not?

Below are my observations:-
1. Selinux support was added in ubifs kernel via below patch "UBIFS: Add security.* XATTR support for the UBIFS"

Quoted 5 lines

2. Extended attribute support was added in mtd-utils via below patch. "mkfs.ubifs: Add extended attribute support"

With above I think that selinux could be enabled but only at the boot time using selinux tools.

Yes.

Quoted 10 lines

But I could not see any support to add selinux labels/context information while creating ubifs.img in mtd-utils. I do see below link where something like above was tried but never made upstream. Could anyone please give pointers on whether this support is added/ or bring worked upon?

http://lists.infradead.org/pipermail/linux-mtd/2014-February/052136.html

Also Whether selinux labeling support can be added in the mkfs.ubifs or not? Do we see any issues with this?

No, just revive the patches.
In 2014 the maintainer situation was different and sadly we forgot about some patches.

Quoted 1 line

I would like to work upon adding selinux support in mtd-utils.

This would be wonderful!

Quoted 2 lines

I would appreciate if I could get some pointers on above queries and if anyone has any pointers/suggestions for this.

Just go ahead. :-)

Thanks,
//richard

#2 lore raw
Quoted 35 lines · Richard Weinberger

Ritesh,

Am Montag, 21. Mai 2018, 13:47:53 CEST schrieb Ritesh Harjani:

Quoted 9 lines

Hello all,

Could anyone please help whether selinux support is fully present on ubifs or not?

Below are my observations:-
1. Selinux support was added in ubifs kernel via below patch "UBIFS: Add security.* XATTR support for the UBIFS"

Quoted 5 lines

2. Extended attribute support was added in mtd-utils via below patch. "mkfs.ubifs: Add extended attribute support"

With above I think that selinux could be enabled but only at the boot time using selinux tools.

Yes.

Quoted 10 lines

But I could not see any support to add selinux labels/context information while creating ubifs.img in mtd-utils. I do see below link where something like above was tried but never made upstream. Could anyone please give pointers on whether this support is added/ or bring worked upon?

http://lists.infradead.org/pipermail/linux-mtd/2014-February/052136.html

Also Whether selinux labeling support can be added in the mkfs.ubifs or not? Do we see any issues with this?

No, just revive the patches.
In 2014 the maintainer situation was different and sadly we forgot about some patches.

Quoted 8 lines
Quoted 1 line

I would like to work upon adding selinux support in mtd-utils.

This would be wonderful!

Quoted 2 lines

I would appreciate if I could get some pointers on above queries and if anyone has any pointers/suggestions for this.

Just go ahead. :-)

Sure, thanks Richard.
I will work on this and will post the patches.

Quoted 8 lines

Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.