lkml.org 
[lkml]   [2023]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 10/11] x86/alternatives: Simplify ALTERNATIVE_n()
On Sat, Sep 09, 2023 at 11:25:54AM +0200, Peter Zijlstra wrote:
> This becomes more of a problem with your example above where the
> respective lengths are 0, 5, 16. In that case, when you patch 5, you'll
> leave 11 single nops in there.
>
> So what that code you deleted does is look for all alternatives that
> start at the same point and computes the max replacementlen, because
> that is the amount of bytes in the source text that has been reserved
> for this alternative.
>
> That is not optional.

Note that the original alternatives did this with the alt_max_*() macro
at build time.

\
 
 \ /
  Last update: 2023-09-09 11:43    [W:0.129 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site