sivadeilra wrote:

I've added 2 cases that cover global redirection around phi nodes.  And 
thankfully it exposed one bug, which I've fixed.

For the rest of the constants, I think it's time to declare this a starting 
point PR and not a final endpoint PR.  It's not necessary for this to support 
all code.  For Microsoft, hot-patching is usually focused on very small 
sections of code, fitting a very small set of patterns.  If a given patch meets 
our hot-patching requirements, then this is beneficial but it is not a 
requirement for every patch.

Also, we are at the beginning of the process of using Clang in this 
environment. We would like to get this work committed and move to the next 
phase, which is experimenting with it over long periods of time -- necessitated 
by the practical experience of dealing with CVEs when they arise, which happens 
on a schedule that we cannot control.  We expect to refine the support for 
hot-patching over time, as we encounter different code patterns in different 
CVE fixes.

If there are other patterns of constant expressions that can or should be 
supported for common C idioms, and anyone can provide examples of how to 
construct them, I would be happy to look at how to support those.  I'll admit 
that I'm new to manipulating LLVM IR at this level, so I'm still learning about 
how exactly constants are represented and manipulated in this IR.

However, I would like to go ahead with this PR as it stands, now.  It will 
allow us to make concrete progress on adopting Clang in Windows contexts where 
we need to generate hot-patches.

https://github.com/llvm/llvm-project/pull/138972
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to