Deutsch English Français Italiano |
<uumpan$pq1o$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thomas Koenig <tkoenig@netcologne.de> Newsgroups: comp.arch Subject: Re: Another security vulnerability Date: Thu, 4 Apr 2024 17:51:19 -0000 (UTC) Organization: A noiseless patient Spider Lines: 39 Message-ID: <uumpan$pq1o$1@dont-email.me> References: <utpoi2$b6to$1@dont-email.me> <2024Mar25.082534@mips.complang.tuwien.ac.at> <20240326192941.0000314a@yahoo.com> <uu0kt1$2nr9j$1@dont-email.me> <VpVMN.731075$p%Mb.618266@fx15.iad> <2024Mar27.191411@mips.complang.tuwien.ac.at> <HH_MN.732789$p%Mb.8039@fx15.iad> <5fc6ea8088c0afe8618d2862cbacebab@www.novabbs.org> <TfhNN.110764$_a1e.90012@fx16.iad> <jwvedbmco81.fsf-monnier+comp.arch@gnu.org> <uukcpe$4g83$2@dont-email.me> <561654fafbeb5e542817dbc5f0ee993e@www.novabbs.org> Injection-Date: Thu, 04 Apr 2024 17:51:19 +0200 (CEST) Injection-Info: dont-email.me; posting-host="e2ad545fe6137ff6f00be81ed6b5bafa"; logging-data="845880"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PPR220OwBws2YBuov1NVDW9BaIlVuaME=" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:sDo73j54LSHqY9A0U7VEyJuv+fs= Bytes: 2729 MitchAlsup1 <mitchalsup@aol.com> schrieb: > Thomas Koenig wrote: > >> Stefan Monnier <monnier@iro.umontreal.ca> schrieb: >>>> Since each chased pointer starts back at LSQ, the cost is no different >>>> than an explicit Prefetch instruction, except without (a),(b) and (c) >>>> having been applied first. >>> >>> I thought the important difference is that the decision to prefetch or >>> not can be done dynamically based on past history. > >> Programmers and compilers are notoriously bad at predicting >> branches (except for error branches), > > Which are always predicted to have no error. On the second or third time, certainly. Hmmm... given hot/cold splitting which is fairly standard by now, do branch predictors take this into account? >> but ought to be quite good >> at predicting prefetches. > > What makes you think programmers understand prefetches any better than > exceptions ?? Pointers are used in many common data structures; linked list, trees, ... A programmer who does not know about dereferencing pointers should be kept away from computer keyboards, preferably at a distance of at least 3 m. > >> If a pointer is loaded, chances are >> very high that are it will be dereferenced. > > What if the value loaded is NULL. Then it should be trivially predicted that it should not be prefetched.