From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from 011.lax.mailroute.net (011.lax.mailroute.net [199.89.1.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D4251D86DC; Fri, 27 Feb 2026 00:19:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772151577; cv=none; b=G8J/y1pxMYQjWIKvtNmvRoJsHzzyF2YLgj/QRvacl8dDPKA9VeWZycwugmO4Eivq0/Bda1bDs5kX5c80EQHpuEpbUSeAIqZdLGyT08QR3NBcQEB7AzZ9/b+5ot8XA0FsnfZ6/gVmcmrGlDJiDWUYCaiUPO7wbu/bNFgwWINmq9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772151577; c=relaxed/simple; bh=PdDRZ1136gB9ByykHhCx7SagMxi8ihnkjGprhvvrQqg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dxktX3/nq7Dr1WdaxnX7plam1G2COSGy2zvixD2qpv5enHnN8epHS5lOTdAvCUku3bBWJ+JzHUTbLKorMo67+xt7UdVxXWWMJL61JAl5Swe4+ir0oMDefsUZmNYu84YmlHODHOa5eoVro/TVv0Tx5Ix7Rt0LACV0En8LMgOWxpU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=e2/QORc/; arc=none smtp.client-ip=199.89.1.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="e2/QORc/" Received: from localhost (localhost [127.0.0.1]) by 011.lax.mailroute.net (Postfix) with ESMTP id 4fMTV00h9Pz1XM5jn; Fri, 27 Feb 2026 00:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1772151568; x=1774743569; bh=PdDRZ1136gB9ByykHhCx7Sag Mxi8ihnkjGprhvvrQqg=; b=e2/QORc/d72GzQUvZzpkNrGsAks90HyLmbZ6b2Ti Z8qM5Ib22t4huRDdas1B6JFswvibU1lcWoFP4ODvgmxJRFsUXje3HRSOBeVM0Mr0 3AtWY0Jerf65O25sLMhYwyRT2vnSRJJdGwQLRQ+ZgO7Jn865N3ZOoFFE7P062m7N TVd44nQhxv3u+mUNxni4K40rM1PGa1vdQSqwHTf8DK8lwbblZNgOfhNLaabSBbK/ P9WqSTmTxMSvHZOXQj1aYPPDcp0iX+3dMWiR52wDNLyLhTCXawgPzMsD0bo3PGIW 5DeHDNWjHJHmQ30xJNv7rJlaDzF/IHFTaOrzGgbKfC6dPg== X-Virus-Scanned: by MailRoute Received: from 011.lax.mailroute.net ([127.0.0.1]) by localhost (011.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id UB8PKPvG2cbV; Fri, 27 Feb 2026 00:19:28 +0000 (UTC) Received: from [172.20.2.156] (unknown [4.28.11.157]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 011.lax.mailroute.net (Postfix) with ESMTPSA id 4fMTTm3H28z1XM6JX; Fri, 27 Feb 2026 00:19:24 +0000 (UTC) Message-ID: Date: Thu, 26 Feb 2026 16:19:21 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 01/62] kvm: Make pi_enable_wakeup_handler() easier to analyze To: Marco Elver , Sean Christopherson Cc: Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , linux-kernel@vger.kernel.org, Christoph Hellwig , Steven Rostedt , Nick Desaulniers , Nathan Chancellor , Kees Cook , Jann Horn , Paolo Bonzini , kvm@vger.kernel.org References: <20260223215118.2154194-1-bvanassche@acm.org> <20260223215118.2154194-2-bvanassche@acm.org> <7a22294b-1150-4c55-a95a-ea918cfb9b76@acm.org> Content-Language: en-US From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/26/26 12:13 PM, Marco Elver wrote: > The goal of RELOC_HIDE is to make the optimizer be less aggressive. > But the Thread Safety Analysis's alias analysis happens during > semantic analysis and is completely detached from the optimizer, and > we could potentially construct an expression that (a) lets Thread > Safety Analysis figure out that __ptr is an alias to ptr, while (b) > still hiding it from the optimizer. But I think we're sufficiently > scared of breaking (b) that I'm not sure if this is feasible in a > clean enough way that won't have other side-effects (e.g. worse > codegen). Does the thread-safety alias analyzer assume that function calls with identical inputs produce identical outputs? If so, how about changing RELOC_HIDE() from a macro into an inline function? Would that be sufficient to make the thread-safety checker recognize identical per_cpu() expressions as identical without affecting the behavior of the optimizer? Thanks, Bart.