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. Signed-off-by: Christoph Hellwig <hch@lst.de>
Цей коміт міститься в:
@@ -507,7 +507,7 @@ struct nlm_void { int dummy; };
|
||||
#define No (1+1024/4) /* netobj */
|
||||
#define St 1 /* status */
|
||||
#define Rg 4 /* range (offset + length) */
|
||||
struct svc_procedure nlmsvc_procedures4[] = {
|
||||
const struct svc_procedure nlmsvc_procedures4[] = {
|
||||
PROC(null, void, void, void, void, 1),
|
||||
PROC(test, testargs, testres, args, res, Ck+St+2+No+Rg),
|
||||
PROC(lock, lockargs, res, args, res, Ck+St),
|
||||
|
@@ -551,7 +551,7 @@ struct nlm_void { int dummy; };
|
||||
#define No (1+1024/4) /* Net Obj */
|
||||
#define Rg 2 /* range - offset + size */
|
||||
|
||||
struct svc_procedure nlmsvc_procedures[] = {
|
||||
const struct svc_procedure nlmsvc_procedures[] = {
|
||||
PROC(null, void, void, void, void, 1),
|
||||
PROC(test, testargs, testres, args, res, Ck+St+2+No+Rg),
|
||||
PROC(lock, lockargs, res, args, res, Ck+St),
|
||||
|
Посилання в новій задачі
Заблокувати користувача