History

sunrpc: mark all struct svc_procinfo instances as const

struct svc_procinfo contains function pointers, and marking it as constant avoids it being able to be used as an attach vector for code injections.

Christoph Hellwig committed 9 years ago

Commit b9c744c1 parent 0becc1112 files · +15 −15Browse files

Showing the changes to include/linux (2 of 12 files). Show all

Unified · Split

2 files
  1. include/linux/lockd/lockd.h +2 −2
  2. include/linux/sunrpc/svc.h +2 −2
include/linux/lockd/lockd.h+2−2
@@ -192,9 +192,9 @@ struct nlm_block { · 191 unmodified lines
192 * Global variables192 * Global variables
193 */193 */
194extern const struct rpc_program nlm_program;194extern const struct rpc_program nlm_program;
195extern struct svc_procedure nlmsvc_procedures[];195extern const struct svc_procedure nlmsvc_procedures[];
196#ifdef CONFIG_LOCKD_V4196#ifdef CONFIG_LOCKD_V4
197extern struct svc_procedure nlmsvc_procedures4[];197extern const struct svc_procedure nlmsvc_procedures4[];
198#endif198#endif
199extern int nlmsvc_grace_period;199extern int nlmsvc_grace_period;
200extern unsigned long nlmsvc_timeout;200extern unsigned long nlmsvc_timeout;
include/linux/sunrpc/svc.h+2−2
@@ -237,7 +237,7 @@ struct svc_rqst { · 236 unmodified lines
237 237
238 struct svc_serv * rq_server; /* RPC service definition */238 struct svc_serv * rq_server; /* RPC service definition */
239 struct svc_pool * rq_pool; /* thread pool */239 struct svc_pool * rq_pool; /* thread pool */
240 struct svc_procedure * rq_procinfo; /* procedure info */240 const struct svc_procedure *rq_procinfo;/* procedure info */
241 struct auth_ops * rq_authop; /* authentication flavour */241 struct auth_ops * rq_authop; /* authentication flavour */
242 struct svc_cred rq_cred; /* auth info */242 struct svc_cred rq_cred; /* auth info */
243 void * rq_xprt_ctxt; /* transport specific context ptr */243 void * rq_xprt_ctxt; /* transport specific context ptr */
@@ -397,7 +397,7 @@ struct svc_program { · 153 unmodified lines
397struct svc_version {397struct svc_version {
398 u32 vs_vers; /* version number */398 u32 vs_vers; /* version number */
399 u32 vs_nproc; /* number of procedures */399 u32 vs_nproc; /* number of procedures */
400 struct svc_procedure * vs_proc; /* per-procedure info */400 const struct svc_procedure *vs_proc; /* per-procedure info */
401 unsigned int *vs_count; /* call counts */401 unsigned int *vs_count; /* call counts */
402 u32 vs_xdrsize; /* xdrsize needed for this version */402 u32 vs_xdrsize; /* xdrsize needed for this version */
403 403

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t