Skip to content

Commit 87d0377

Browse files
committed
Merge tag 'tomoyo-pr-20260422' of git://git.code.sf.net/p/tomoyo/tomoyo
Pull tomoyo update from Tetsuo Handa: "Handle 64-bit inode numbers" * tag 'tomoyo-pr-20260422' of git://git.code.sf.net/p/tomoyo/tomoyo: tomoyo: use u64 for holding inode->i_ino value
2 parents 2a4c0c1 + 8fc1ad9 commit 87d0377

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

security/tomoyo/audit.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,21 +195,19 @@ static char *tomoyo_print_header(struct tomoyo_request_info *r)
195195
if (i & 1) {
196196
pos += snprintf(buffer + pos,
197197
tomoyo_buffer_len - 1 - pos,
198-
" path%u.parent={ uid=%u gid=%u ino=%lu perm=0%o }",
198+
" path%u.parent={ uid=%u gid=%u ino=%llu perm=0%o }",
199199
(i >> 1) + 1,
200200
from_kuid(&init_user_ns, stat->uid),
201201
from_kgid(&init_user_ns, stat->gid),
202-
(unsigned long)stat->ino,
203-
stat->mode & S_IALLUGO);
202+
stat->ino, stat->mode & S_IALLUGO);
204203
continue;
205204
}
206205
pos += snprintf(buffer + pos, tomoyo_buffer_len - 1 - pos,
207-
" path%u={ uid=%u gid=%u ino=%lu major=%u minor=%u perm=0%o type=%s",
206+
" path%u={ uid=%u gid=%u ino=%llu major=%u minor=%u perm=0%o type=%s",
208207
(i >> 1) + 1,
209208
from_kuid(&init_user_ns, stat->uid),
210209
from_kgid(&init_user_ns, stat->gid),
211-
(unsigned long)stat->ino,
212-
MAJOR(dev), MINOR(dev),
210+
stat->ino, MAJOR(dev), MINOR(dev),
213211
mode & S_IALLUGO, tomoyo_filetype(mode));
214212
if (S_ISCHR(mode) || S_ISBLK(mode)) {
215213
dev = stat->rdev;

security/tomoyo/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ struct tomoyo_address_group {
567567
struct tomoyo_mini_stat {
568568
kuid_t uid;
569569
kgid_t gid;
570-
ino_t ino;
570+
u64 ino;
571571
umode_t mode;
572572
dev_t dev;
573573
dev_t rdev;

security/tomoyo/condition.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,8 @@ bool tomoyo_condition(struct tomoyo_request_info *r,
766766
const struct tomoyo_condition *cond)
767767
{
768768
u32 i;
769-
unsigned long min_v[2] = { 0, 0 };
770-
unsigned long max_v[2] = { 0, 0 };
769+
u64 min_v[2] = { 0, 0 };
770+
u64 max_v[2] = { 0, 0 };
771771
const struct tomoyo_condition_element *condp;
772772
const struct tomoyo_number_union *numbers_p;
773773
const struct tomoyo_name_union *names_p;
@@ -834,7 +834,7 @@ bool tomoyo_condition(struct tomoyo_request_info *r,
834834
/* Check numeric or bit-op expressions. */
835835
for (j = 0; j < 2; j++) {
836836
const u8 index = j ? right : left;
837-
unsigned long value = 0;
837+
u64 value = 0;
838838

839839
switch (index) {
840840
case TOMOYO_TASK_UID:

0 commit comments

Comments
 (0)