From: Roberto Sassu <roberto.sassu@huaweicloud.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
linux-security-module@vger.kernel.org
Cc: Valentin Vidic <vvidic@valentin-vidic.from.hr>,
Paul Moore <paul@paul-moore.com>
Subject: Re: Stable backport of de3004c874e7 ("ocfs2: Switch to security_inode_init_security()")
Date: Mon, 22 May 2023 09:55:36 +0200 [thread overview]
Message-ID: <46825987ddde217cd60b144888171cf3fe113152.camel@huaweicloud.com> (raw)
In-Reply-To: <f5ada796-41ba-5cc8-b43d-efd639994f15@I-love.SAKURA.ne.jp>
On Sat, 2023-05-20 at 14:54 +0900, Tetsuo Handa wrote:
> On 2023/05/20 6:51, Paul Moore wrote:
> > Finally, since security_inode_init_security(), unlike
> > security_old_inode_init_security(), returns zero instead of -EOPNOTSUPP if
> > no xattrs were provided by LSMs or if inodes are private, additionally
> > check in ocfs2_init_security_get() if the xattr name is set.
> >
> > If not, act as if security_old_inode_init_security() returned -EOPNOTSUPP,
> > and set si->enable to zero to notify to the functions following
> > ocfs2_init_security_get() that no xattrs are available.
>
> Regarding security_inode_init_security(), similar problem was found on reiserfs.
>
> https://lkml.kernel.org/r/a800496b-cae9-81bf-c79e-d8342418c5be@I-love.SAKURA.ne.jp
>
> Is it really expected behavior that security_inode_init_security() returns 0 when
> initxattrs is provided but call_int_hook(inode_init_security) returned -EOPNOTSUPP ?
It is going to change with this upcoming patch:
https://lore.kernel.org/linux-integrity/20230331123221.3273328-3-roberto.sassu@huaweicloud.com/
There will be only one loop, and error handling would be the same.
Thanks
Roberto
next prev parent reply other threads:[~2023-05-22 7:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 21:51 Stable backport of de3004c874e7 ("ocfs2: Switch to security_inode_init_security()") Paul Moore
2023-05-20 5:54 ` Tetsuo Handa
2023-05-20 19:45 ` Paul Moore
2023-05-22 7:55 ` Roberto Sassu [this message]
2023-05-22 16:07 ` Sasha Levin
2023-05-22 16:34 ` Paul Moore
2023-05-26 18:36 ` Greg KH
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=46825987ddde217cd60b144888171cf3fe113152.camel@huaweicloud.com \
--to=roberto.sassu@huaweicloud.com \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=vvidic@valentin-vidic.from.hr \
/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