Repository navigation
Commit 99c63ba
powerpc/xmon: Restrict when kernel is locked down
[ Upstream commit 69393cb ]
Xmon should be either fully or partially disabled depending on the
kernel lockdown state.
Put xmon into read-only mode for lockdown=integrity and prevent user
entry into xmon when lockdown=confidentiality. Xmon checks the lockdown
state on every attempted entry:
(1) during early xmon'ing
(2) when triggered via sysrq
(3) when toggled via debugfs
(4) when triggered via a previously enabled breakpoint
The following lockdown state transitions are handled:
(1) lockdown=none -> lockdown=integrity
set xmon read-only mode
(2) lockdown=none -> lockdown=confidentiality
clear all breakpoints, set xmon read-only mode,
prevent user re-entry into xmon
(3) lockdown=integrity -> lockdown=confidentiality
clear all breakpoints, set xmon read-only mode,
prevent user re-entry into xmon
Suggested-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Christopher M. Riedl <cmr@informatik.wtf>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190907061124.1947-3-cmr@informatik.wtf
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent f2adfe1 commit 99c63ba
3 files changed
Lines changed: 86 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
190 | 193 | | |
191 | 194 | | |
192 | 195 | | |
| |||
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
286 | | - | |
287 | | - | |
| 289 | + | |
| 290 | + | |
288 | 291 | | |
289 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
290 | 321 | | |
291 | 322 | | |
292 | 323 | | |
| |||
438 | 469 | | |
439 | 470 | | |
440 | 471 | | |
441 | | - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
442 | 476 | | |
443 | 477 | | |
444 | 478 | | |
| |||
455 | 489 | | |
456 | 490 | | |
457 | 491 | | |
| 492 | + | |
458 | 493 | | |
459 | 494 | | |
460 | 495 | | |
| |||
465 | 500 | | |
466 | 501 | | |
467 | 502 | | |
| 503 | + | |
| 504 | + | |
468 | 505 | | |
469 | 506 | | |
470 | 507 | | |
| |||
518 | 555 | | |
519 | 556 | | |
520 | 557 | | |
521 | | - | |
| 558 | + | |
| 559 | + | |
522 | 560 | | |
523 | 561 | | |
524 | 562 | | |
| |||
570 | 608 | | |
571 | 609 | | |
572 | 610 | | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
577 | 619 | | |
578 | 620 | | |
579 | 621 | | |
| |||
597 | 639 | | |
598 | 640 | | |
599 | 641 | | |
600 | | - | |
601 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
602 | 645 | | |
603 | 646 | | |
604 | 647 | | |
| |||
635 | 678 | | |
636 | 679 | | |
637 | 680 | | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
642 | 687 | | |
643 | 688 | | |
644 | | - | |
| 689 | + | |
| 690 | + | |
645 | 691 | | |
646 | 692 | | |
647 | 693 | | |
| |||
670 | 716 | | |
671 | 717 | | |
672 | 718 | | |
673 | | - | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
674 | 723 | | |
675 | 724 | | |
676 | 725 | | |
| |||
3761 | 3810 | | |
3762 | 3811 | | |
3763 | 3812 | | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
3764 | 3818 | | |
3765 | 3819 | | |
3766 | 3820 | | |
| |||
3782 | 3836 | | |
3783 | 3837 | | |
3784 | 3838 | | |
3785 | | - | |
3786 | 3839 | | |
3787 | 3840 | | |
3788 | 3841 | | |
| |||
3800 | 3853 | | |
3801 | 3854 | | |
3802 | 3855 | | |
3803 | | - | |
3804 | | - | |
3805 | 3856 | | |
3806 | 3857 | | |
| 3858 | + | |
3807 | 3859 | | |
3808 | 3860 | | |
3809 | 3861 | | |
3810 | 3862 | | |
3811 | 3863 | | |
3812 | 3864 | | |
3813 | | - | |
| 3865 | + | |
3814 | 3866 | | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
3815 | 3872 | | |
3816 | 3873 | | |
3817 | 3874 | | |
| |||
3837 | 3894 | | |
3838 | 3895 | | |
3839 | 3896 | | |
3840 | | - | |
| 3897 | + | |
| 3898 | + | |
| 3899 | + | |
| 3900 | + | |
| 3901 | + | |
3841 | 3902 | | |
3842 | 3903 | | |
3843 | 3904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| 127 | + | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
0 commit comments