Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/fdinfo: get rid of dumping credentials

It's a faily obscure feature, and registered credentials would for that
mostly be a static thing. Don't bother including code to dump the
personalities indices.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

-38
-38
io_uring/fdinfo.c
··· 15 15 #include "cancel.h" 16 16 #include "rsrc.h" 17 17 18 - static __cold int io_uring_show_cred(struct seq_file *m, unsigned int id, 19 - const struct cred *cred) 20 - { 21 - struct user_namespace *uns = seq_user_ns(m); 22 - struct group_info *gi; 23 - kernel_cap_t cap; 24 - int g; 25 - 26 - seq_printf(m, "%5d\n", id); 27 - seq_put_decimal_ull(m, "\tUid:\t", from_kuid_munged(uns, cred->uid)); 28 - seq_put_decimal_ull(m, "\t\t", from_kuid_munged(uns, cred->euid)); 29 - seq_put_decimal_ull(m, "\t\t", from_kuid_munged(uns, cred->suid)); 30 - seq_put_decimal_ull(m, "\t\t", from_kuid_munged(uns, cred->fsuid)); 31 - seq_put_decimal_ull(m, "\n\tGid:\t", from_kgid_munged(uns, cred->gid)); 32 - seq_put_decimal_ull(m, "\t\t", from_kgid_munged(uns, cred->egid)); 33 - seq_put_decimal_ull(m, "\t\t", from_kgid_munged(uns, cred->sgid)); 34 - seq_put_decimal_ull(m, "\t\t", from_kgid_munged(uns, cred->fsgid)); 35 - seq_puts(m, "\n\tGroups:\t"); 36 - gi = cred->group_info; 37 - for (g = 0; g < gi->ngroups; g++) { 38 - seq_put_decimal_ull(m, g ? " " : "", 39 - from_kgid_munged(uns, gi->gid[g])); 40 - } 41 - seq_puts(m, "\n\tCapEff:\t"); 42 - cap = cred->cap_effective; 43 - seq_put_hex_ll(m, NULL, cap.val, 16); 44 - seq_putc(m, '\n'); 45 - return 0; 46 - } 47 - 48 18 #ifdef CONFIG_NET_RX_BUSY_POLL 49 19 static __cold void common_tracking_show_fdinfo(struct io_ring_ctx *ctx, 50 20 struct seq_file *m, ··· 182 212 seq_printf(m, "%5u: 0x%llx/%u\n", i, buf->ubuf, buf->len); 183 213 else 184 214 seq_printf(m, "%5u: <none>\n", i); 185 - } 186 - if (!xa_empty(&ctx->personalities)) { 187 - unsigned long index; 188 - const struct cred *cred; 189 - 190 - seq_printf(m, "Personalities:\n"); 191 - xa_for_each(&ctx->personalities, index, cred) 192 - io_uring_show_cred(m, index, cred); 193 215 } 194 216 195 217 seq_puts(m, "PollList:\n");