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.

lsm: integrate report_lsm_order() code into caller

With only one caller of report_lsm_order(), insert the function's code
directly into the caller and ger rid of report_lsm_order().

Reviewed-by: Casey Schaufler <casey@schaufler-ca.com>
Reviewed-by: John Johansen <john.johhansen@canonical.com>
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>

+12 -21
+12 -21
security/lsm_init.c
··· 291 291 kfree(sep); 292 292 } 293 293 294 - static void __init report_lsm_order(void) 295 - { 296 - struct lsm_info **lsm, *early; 297 - int first = 0; 298 - 299 - pr_info("initializing lsm="); 300 - 301 - /* Report each enabled LSM name, comma separated. */ 302 - lsm_early_for_each_raw(early) { 303 - if (is_enabled(early)) 304 - pr_cont("%s%s", first++ == 0 ? "" : ",", early->name); 305 - } 306 - lsm_order_for_each(lsm) { 307 - if (is_enabled(*lsm)) 308 - pr_cont("%s%s", first++ == 0 ? "" : ",", (*lsm)->name); 309 - } 310 - 311 - pr_cont("\n"); 312 - } 313 - 314 294 /** 315 295 * lsm_early_cred - during initialization allocate a composite cred blob 316 296 * @cred: the cred that needs a blob ··· 321 341 322 342 static void __init ordered_lsm_init(void) 323 343 { 344 + unsigned int first = 0; 324 345 struct lsm_info **lsm; 346 + struct lsm_info *early; 325 347 326 348 if (chosen_lsm_order) { 327 349 if (chosen_major_lsm) { ··· 339 357 lsm_prepare(*lsm); 340 358 } 341 359 342 - report_lsm_order(); 360 + pr_info("initializing lsm="); 361 + lsm_early_for_each_raw(early) { 362 + if (is_enabled(early)) 363 + pr_cont("%s%s", first++ == 0 ? "" : ",", early->name); 364 + } 365 + lsm_order_for_each(lsm) { 366 + if (is_enabled(*lsm)) 367 + pr_cont("%s%s", first++ == 0 ? "" : ",", (*lsm)->name); 368 + } 369 + pr_cont("\n"); 343 370 344 371 init_debug("cred blob size = %d\n", blob_sizes.lbs_cred); 345 372 init_debug("file blob size = %d\n", blob_sizes.lbs_file);