projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7cf341
)
lsm: align based on pointer length in lsm_fill_user_ctx()
author
Paul Moore
<paul@paul-moore.com>
Wed, 1 Nov 2023 21:39:44 +0000
(17:39 -0400)
committer
Paul Moore
<paul@paul-moore.com>
Mon, 13 Nov 2023 03:54:42 +0000
(22:54 -0500)
Using the size of a void pointer is much cleaner than
BITS_PER_LONG / 8.
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/security.c
patch
|
blob
|
history
diff --git
a/security/security.c
b/security/security.c
index 86f7a19959910d4d455f8eb7744ae2467e015150..a808fd5eba6d43b8be0d11541ad77857e4918ba4 100644
(file)
--- a/
security/security.c
+++ b/
security/security.c
@@
-792,7
+792,7
@@
int lsm_fill_user_ctx(struct lsm_ctx __user *uctx, size_t *uctx_len,
size_t nctx_len;
int rc = 0;
- nctx_len = ALIGN(struct_size(nctx, ctx, val_len),
BITS_PER_LONG / 8
);
+ nctx_len = ALIGN(struct_size(nctx, ctx, val_len),
sizeof(void *)
);
if (nctx_len > *uctx_len) {
rc = -E2BIG;
goto out;