xen/gntalloc: validate grant count before allocation
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 2 repliesIn review
- v11 patch 1 replySuperseded
Changes in v2 from the cover letter
- Split the unsigned type changes into a prerequisite patch.
- Remove the signed checks and unnecessary casts.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | xen/gntalloc: make grant counters unsigneddrivers/ | +3 | 1 reply | |
| 2/2 | xen/gntalloc: validate grant count before allocationdrivers/ | +11 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Juergen Gross |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] xen/gntalloc: validate grant count before allocation
The allocation ioctl currently allocates a user-sized grant-id array before checking the global grant limit. It also adds the requested count when enforcing that limit, which makes the check harder to reason about in the presence of mixed signed and unsigned types.
Make the grant counters unsigned first, then reject impossible requests before allocation and use subtraction for the locked limit check.
Changes in v2:
- Split the unsigned type changes into a prerequisite patch.
- Remove the signed checks and unnecessary casts.
Yousef Alhouseen (2):
xen/gntalloc: make grant counters unsigned xen/gntalloc: validate grant count before allocation
drivers/xen/gntalloc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
Signature · 1 line
2.54.0