File tree Expand file tree Collapse file tree 10 files changed +13
-13
lines changed Expand file tree Collapse file tree 10 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ static struct pciid {
79
79
{ 0x15df1022 , "AMD CCP-5a" },
80
80
};
81
81
82
- static struct random_source random_ccp = {
82
+ static const struct random_source random_ccp = {
83
83
.rs_ident = "AMD CCP TRNG" ,
84
84
.rs_source = RANDOM_PURE_CCP ,
85
85
.rs_read = random_ccp_read ,
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ static device_attach_t trng_attach;
58
58
59
59
static unsigned trng_read (void * , unsigned );
60
60
61
- static struct random_source random_trng = {
61
+ static const struct random_source random_trng = {
62
62
.rs_ident = "Arm SMCCC TRNG" ,
63
63
.rs_source = RANDOM_PURE_ARM_TRNG ,
64
64
.rs_read = trng_read ,
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ static int qcom_rnd_detach(device_t);
63
63
static int qcom_rnd_harvest (struct qcom_rnd_softc * , void * , size_t * );
64
64
static unsigned qcom_rnd_read (void * , unsigned );
65
65
66
- static struct random_source random_qcom_rnd = {
66
+ static const struct random_source random_qcom_rnd = {
67
67
.rs_ident = "Qualcomm Entropy Adapter" ,
68
68
.rs_source = RANDOM_PURE_QUALCOMM ,
69
69
.rs_read = qcom_rnd_read ,
Original file line number Diff line number Diff line change 44
44
static u_int random_rndr_read (void * , u_int );
45
45
46
46
static bool has_rndr ;
47
- static struct random_source random_armv8_rndr = {
47
+ static const struct random_source random_armv8_rndr = {
48
48
.rs_ident = "Armv8 rndr RNG" ,
49
49
.rs_source = RANDOM_PURE_ARMV8 ,
50
50
.rs_read = random_rndr_read ,
Original file line number Diff line number Diff line change 56
56
57
57
static u_int random_darn_read (void * , u_int );
58
58
59
- static struct random_source random_darn = {
59
+ static const struct random_source random_darn = {
60
60
.rs_ident = "PowerISA DARN random number generator" ,
61
61
.rs_source = RANDOM_PURE_DARN ,
62
62
.rs_read = random_darn_read
Original file line number Diff line number Diff line change 51
51
static bool has_rdrand , has_rdseed ;
52
52
static u_int random_ivy_read (void * , u_int );
53
53
54
- static struct random_source random_ivy = {
54
+ static const struct random_source random_ivy = {
55
55
.rs_ident = "Intel Secure Key RNG" ,
56
56
.rs_source = RANDOM_PURE_RDRAND ,
57
57
.rs_read = random_ivy_read
Original file line number Diff line number Diff line change 44
44
45
45
static u_int random_nehemiah_read (void * , u_int );
46
46
47
- static struct random_source random_nehemiah = {
47
+ static const struct random_source random_nehemiah = {
48
48
.rs_ident = "VIA Nehemiah Padlock RNG" ,
49
49
.rs_source = RANDOM_PURE_NEHEMIAH ,
50
50
.rs_read = random_nehemiah_read
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ __read_frequently u_int hc_source_mask;
110
110
111
111
struct random_sources {
112
112
CK_LIST_ENTRY (random_sources ) rrs_entries ;
113
- struct random_source * rrs_source ;
113
+ const struct random_source * rrs_source ;
114
114
};
115
115
116
116
static CK_LIST_HEAD (sources_head , random_sources ) source_list =
@@ -849,7 +849,7 @@ random_harvest_deregister_source(enum random_entropy_source source)
849
849
}
850
850
851
851
void
852
- random_source_register (struct random_source * rsource )
852
+ random_source_register (const struct random_source * rsource )
853
853
{
854
854
struct random_sources * rrs ;
855
855
@@ -868,7 +868,7 @@ random_source_register(struct random_source *rsource)
868
868
}
869
869
870
870
void
871
- random_source_deregister (struct random_source * rsource )
871
+ random_source_deregister (const struct random_source * rsource )
872
872
{
873
873
struct random_sources * rrs = NULL ;
874
874
Original file line number Diff line number Diff line change @@ -103,8 +103,8 @@ struct random_source {
103
103
random_source_read_t * rs_read ;
104
104
};
105
105
106
- void random_source_register (struct random_source * );
107
- void random_source_deregister (struct random_source * );
106
+ void random_source_register (const struct random_source * );
107
+ void random_source_deregister (const struct random_source * );
108
108
109
109
#endif /* _KERNEL */
110
110
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ static struct virtio_feature_desc vtrnd_feature_desc[] = {
77
77
{ 0 , NULL }
78
78
};
79
79
80
- static struct random_source random_vtrnd = {
80
+ static const struct random_source random_vtrnd = {
81
81
.rs_ident = "VirtIO Entropy Adapter" ,
82
82
.rs_source = RANDOM_PURE_VIRTIO ,
83
83
.rs_read = vtrnd_read ,
You can’t perform that action at this time.
0 commit comments