From nobody Thu Apr 2 23:53:31 2026 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BF9D2BDC2C for ; Sun, 15 Feb 2026 14:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771165728; cv=none; b=iPm12XWMVKziyW9eX9y68deSTTL52HuHpRx2sBubQ3s76LzVEi1jARGMCmNriOdMqfI7o4Yapjd89A/MmZO8ad+2b4Dv30C4dgiOSq8IwkdGA3URN9m3wdJbO2HxcI07jD7HLMAqhhToZbJS443BfUb+BUJ3iAbYc1p0a227Dfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771165728; c=relaxed/simple; bh=UIsI38CxV5C8/dpQs7kHF6213q1DPMbGVu78V9Xy1IY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=makjo6KMexOsOp2BqCKLoIHzKTMiFWYCyHYY58MU7Croa3Tm6r2jDD67LHVx5SlWaMWuf776IXuQmETyLcEV82VGCa0K+Na4+sK8mfhWofnx+doSX+F8jZvUTpISPgvLFZtIAVOyUPw9KZHb+S+ozCFGKtk4poy58y3Ka7iTdHA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mUW8aIeJ; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mUW8aIeJ" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2a7bced39cfso26994585ad.1 for ; Sun, 15 Feb 2026 06:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771165726; x=1771770526; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/1QT4RXhbMrOmsnwGPGjXx/hD6yj4KylbY6P+Zn5W4A=; b=mUW8aIeJ0aLaYN/JZhL0QJZt6gXid5umM9zXxCW2+AHEGkVj9Xttxxz/gdMe4iUckt kM0FOCSqY3e/0ms224SJYX63j+y8EmQVjCafU6xMKG2FVaVofdnznhy1zVW2uOmzdyhp 15FjuSnG+h2cQbgeGrYLepVJB+aN2yNwUEMk0/pykTAkvozeHNvHjlZ74Kc9/sfA/DgT tR+V/3kNYFMs2t5NOulPG/7DM/3zQXCjWQQNAAly/3cBRASDbrZUg6m0BiYdYD8w7NsN aFewQX1I52JYeIeXX8FnUWU23IC+IOO/xDY2UAa3YqPBD1A+Emasdd6C89ZpfC8yr7Tm X4eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771165726; x=1771770526; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/1QT4RXhbMrOmsnwGPGjXx/hD6yj4KylbY6P+Zn5W4A=; b=dwxWgyXPxyadDuT7CcfReVYgYaoOFak1kfv7YLw0Z9udYBnKOm7WE7qChzIhIBmzO6 uuwTymaa1aijZvyR5DBEvoE07WDrY6uNw3aF1G+C/A8O6sS4dyTuhNif+0TPvQlNWa+0 uidZZs/KwnFznZRE7Dnc0qVQcI8LOfWxxgQrJVCe/aYnVYIlDXUTQNwAy1p5HaKuE7DF zb//3HCiAqc4PItRud8v7hfMKggNu2xtBdOHybhYfs4Zp0ydNrUced47edr73kQZJEMy 1LdpoFIfxUq4EfS5B6Fm10fVBw4M1AazBmKmAXfoGuVvrn58pSivNu60FZ6m5O9bVUw9 UzXA== X-Forwarded-Encrypted: i=1; AJvYcCUNR/+wW+PR/zoTLb9Ij8jUeCuYQT3IFZNy6hxE2qiB0rX1VJzokow1FeWUb+HN4tpqye5dtaEBF7QgXGQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyevB7tAAinRLhSDmQgHCFjKWkeNCscr3ystq+K+JWVVU1ZzYwC +k0Qe4crWfSBhLi0CMjzeK6FNjb8d9U0LZH+aAbt3A9vKdLyIHrNK3LP X-Gm-Gg: AZuq6aLcWTp3GyYVvFkfjhwsklSGb73kZ6yX5NRwNz0BehICuodIm8zcR5diAu0aJYP IZFnwIYUmi2Eb1ISqdBOQRuBEdbQ71vxPSwOns/yXaaLDzMgxl/gyhFpr/VpZWdY2TtxetuhNxL xpMJ65G4mfHbGqco4Jxh+4QseDOjdP12MpqlQF9jc5//+gFnPlxXayCP1KbH6cy/UEMaBP7zijP qfQT5eASfujFvvQTxW4gZdvQkHHHFwWOEj8pR4vmNZ1dzNJ+Z5fssCbd9iONoBzV+SqvuqWroGL JKdp83SS7NzxM7/uSCelybwSyHAI50Nj4RNqgMrxTUInlhixk1/FlGsXwovm4wPfD0kxQIzUdoj o6955QBpil3CGYwL3A6gq7qnSS6xM8eTHFtDZ3DSiTG5bcyAaHO7+qtLB2HISF+pwghqb27apjZ NHIrAD4vUm0gzkbM39LfPg3ycnusmUusZ2LBo98Ogy89T+C1fzTWk0Pcuc X-Received: by 2002:a17:902:ced0:b0:2a9:47d0:12cf with SMTP id d9443c01a7336-2ab504e9742mr70645865ad.4.1771165725885; Sun, 15 Feb 2026 06:28:45 -0800 (PST) Received: from speedy3.lan ([116.197.216.237]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ad1aae9e0esm45298925ad.79.2026.02.15.06.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Feb 2026 06:28:45 -0800 (PST) From: "Marcel W. Wysocki" To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , Nathan Chancellor , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, "Marcel W . Wysocki" Subject: [PATCH] x86/vdso: use calll mnemonic for 32-bit vdso calls Date: Sun, 15 Feb 2026 22:28:34 +0800 Message-ID: <20260215142834.1455794-1-maci.stgn@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The VDSO32 fallback functions use unsuffixed "call" in inline asm that is compiled in 32-bit mode (-m32). In AT&T syntax, the unsuffixed "call" is ambiguous -- the assembler must infer the operand size from context. While both GNU as and the standard LLVM integrated assembler handle this correctly in practice, the unsuffixed form is inconsistent with other 32-bit assembly in the kernel tree (arch/x86/boot/header.S, arch/x86/boot/copy.S, arch/x86/realmode/rm/wakeup_asm.S) which already uses the explicit "calll" mnemonic. More importantly, alternative LLVM-based toolchains (e.g. zig cc) contain a separate assembler implementation that rejects unsuffixed "call" in 32-bit inline asm context, preventing VDSO32 compilation entirely. Use "calll" -- the canonical AT&T mnemonic for a 32-bit near call -- to match existing kernel convention and ensure compatibility with all LLVM-based assemblers. No object code change: "call" and "calll" produce identical machine code (opcode E8h with 32-bit relative displacement) on all tested assemblers (GNU as, LLVM 21, LLVM 20). Signed-off-by: Marcel W. Wysocki --- arch/x86/include/asm/vdso/gettimeofday.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/vdso/gettimeofday.h b/arch/x86/include/as= m/vdso/gettimeofday.h --- a/arch/x86/include/asm/vdso/gettimeofday.h +++ b/arch/x86/include/asm/vdso/gettimeofday.h @@ -101,7 +101,7 @@ asm ( "mov %%ebx, %%edx \n" "mov %[clock], %%ebx \n" - "call __kernel_vsyscall \n" + "calll __kernel_vsyscall \n" "mov %%edx, %%ebx \n" : "=3Da" (ret), "=3Dm" (*_ts) : "0" (__NR_clock_gettime64), [clock] "g" (_clkid), "c" (_ts) @@ -118,7 +118,7 @@ asm ( "mov %%ebx, %%edx \n" "mov %[clock], %%ebx \n" - "call __kernel_vsyscall \n" + "calll __kernel_vsyscall \n" "mov %%edx, %%ebx \n" : "=3Da" (ret), "=3Dm" (*_ts) : "0" (__NR_clock_gettime), [clock] "g" (_clkid), "c" (_ts) @@ -136,7 +136,7 @@ asm( "mov %%ebx, %%edx \n" "mov %2, %%ebx \n" - "call __kernel_vsyscall \n" + "calll __kernel_vsyscall \n" "mov %%edx, %%ebx \n" : "=3Da" (ret) : "0" (__NR_gettimeofday), "g" (_tv), "c" (_tz) @@ -153,7 +153,7 @@ asm ( "mov %%ebx, %%edx \n" "mov %[clock], %%ebx \n" - "call __kernel_vsyscall \n" + "calll __kernel_vsyscall \n" "mov %%edx, %%ebx \n" : "=3Da" (ret), "=3Dm" (*_ts) : "0" (__NR_clock_getres_time64), [clock] "g" (_clkid), "c" (_ts) @@ -170,7 +170,7 @@ asm ( "mov %%ebx, %%edx \n" "mov %[clock], %%ebx \n" - "call __kernel_vsyscall \n" + "calll __kernel_vsyscall \n" "mov %%edx, %%ebx \n" : "=3Da" (ret), "=3Dm" (*_ts) : "0" (__NR_clock_getres), [clock] "g" (_clkid), "c" (_ts)