From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 91B5E1094E for ; Sat, 20 Jan 2024 17:00:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705770036; cv=none; b=X1FuRZMkCcx7sxuTUaP7E/blt6nTciPUwlAOFhVfsved9/oFv8LTnfR6JpZYN4Ovq8ZEBdshg4fgDvcrAFJlx0eyf1LO0gRVo1pd7p6LN9sU6SjrH+5w4qPgJ9oe75etPHcJ07eaCHsMBgYhSZPn1W5MflzO7YIxo7vA8q8QCZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705770036; c=relaxed/simple; bh=AjsF/ew79q1rxwqFpLchAi2I9Lgbtykummu8teyFBpI=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XZ1UEBG2JlhZtRrix+umdSkX3t0k5zDwfD2vw21ByJ+N8Pn7chl/bjJa1rsbzZjzM9LXB6YRMZpcIo8dZYpd122OA6c1moe4IjSFu6dC8AhL5BjT7QRT0HqBgvICUDpoPuYjjrQixyQAMtZN6dknkWis8hhR/pHGjpD2pLFa/FA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Op9cexCb; arc=none smtp.client-ip=209.85.128.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Op9cexCb" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-40e8d3b29f2so21271935e9.1 for ; Sat, 20 Jan 2024 09:00:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1705770032; x=1706374832; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=DIHej7AiTWXhetxkzClgi5vGZxcxwr+5xqPSPNaw8Uo=; b=Op9cexCbSCOWkq6zLVWGAeqH9U5I9vqqFbdVpmG69641f52gL2G2F4c2a7soihBcvA ADV497rdwwruGUBi53H3ee5JWLjDvZLDhu7kmDot3o6alW2ICV7U4NbVZ25X9JGz62d/ aNAR0/+YOgEfoT4LXiTPdmuqGfgg3w6fQgwxs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705770032; x=1706374832; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DIHej7AiTWXhetxkzClgi5vGZxcxwr+5xqPSPNaw8Uo=; b=XS3i4vS2/JCNXxvFiq30cHVnD5QbBCMNktMyFJ2gaCfURenUSw0spUXF4dSYUV+AMN mgzgCokqsza4oBsFKOVrwmhpjeslkn3ObMbVi9drztgNIRLgRYP8dpD694Wr4kuUAyk5 feqEuEwmMCTbc0An1DPfQDxTJy56ptNmdIoQ2G4mU7Q3ZRho4C71IPya13Fan9yjIUNg YNuMgBiQj+0iEyTMMgKJG5exXV8L7JjOs4x22NCJu69Mma8ro+EU7CiqVNkvFc+h09qU ZGeC+jEdV5oasWZruxBBhaYRYUksuZJcZ08IXWC/+Sz/OJaVQuOnv+XlYNU8kLyG7WCX SAQg== X-Gm-Message-State: AOJu0YzdtzvIYfPDmYaCzxhB9a8tWnUnVMU8p06wGwdzB/80ZmuDeet/ fJddtZNNzeG8GQvA/RHi0Fd/zZAkWUXUNRnA0nGp3xQWqRczLEAe6lOx4cyl5HJpD5xpIBY+9T4 XtGCVjA== X-Google-Smtp-Source: AGHT+IE/rU/zqBVnuq9W0rqjW4wxY3L+oe4V7EHL1r5IGebuvDghopNTgGG8QuIXdNp+I2SXSG5UQQ== X-Received: by 2002:a05:600c:12ca:b0:40c:2417:3b51 with SMTP id v10-20020a05600c12ca00b0040c24173b51mr595227wmd.74.1705770032628; Sat, 20 Jan 2024 09:00:32 -0800 (PST) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com. [209.85.208.49]) by smtp.gmail.com with ESMTPSA id m13-20020a50998d000000b005551387bb85sm12526312edb.94.2024.01.20.09.00.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Jan 2024 09:00:31 -0800 (PST) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-55a684acf92so1685107a12.0 for ; Sat, 20 Jan 2024 09:00:31 -0800 (PST) X-Received: by 2002:a05:6402:3138:b0:55a:214:c7f7 with SMTP id dd24-20020a056402313800b0055a0214c7f7mr515704edb.84.1705770031241; Sat, 20 Jan 2024 09:00:31 -0800 (PST) Precedence: bulk X-Mailing-List: linux-toolchains@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20210312113253.305040674@infradead.org> <20210312115749.065275711@infradead.org> In-Reply-To: From: Linus Torvalds Date: Sat, 20 Jan 2024 09:00:14 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] x86: Remove dynamic NOP selection To: "H. Peter Anvin" Cc: Thorsten Glaser , Peter Zijlstra , x86@kernel.org, rostedt@goodmis.org, linux-kernel@vger.kernel.org, linux-toolchains@vger.kernel.org, jpoimboe@redhat.com, alexei.starovoitov@gmail.com, mhiramat@kernel.org Content-Type: text/plain; charset="UTF-8" On Sat, 20 Jan 2024 at 00:28, H. Peter Anvin wrote: > > %eiz was something that binutils used to put in when disassembling certain redundant encodings with SIB at some point. Yeah, it's purely (bad) syntactic sugar for "no register". Somebody decided that the fact that so many RISC architectures have a "zero register" means that they should make x86 look like it has a "zero register" too. I assume it regularized some very silly decoding issue, but it was horrible. It's not the worst thing I've ever seen - in objdump output, and it's easy to just remove with a sed script or a simple search-and-replace in the editor. Unlike some of the other "design" choices of objdump. On that note, does anybody have a better disassembler than objdump? Or even a script around it to make it more useful? I do use "objdump --disassemble" a fair amount, and I hate how bad it is. My pet peeve is the crazy relocation handling (or lack there-of). IOW, if I do something like objdump --disassemble \ --no-show-raw-insn --no-addresses \ kernel/exit.o I get output like this: call whis is garbage: it's not calling delayed_put_task_struct+0x1a at all, that's just "the offset bytes are all zero because the data is in the relocation". And if I add "-r" to get relocation info, I get call R_X86_64_PLT32 rethook_flush_task-0x4 which shows the raw relocation data, but with truly mind-bogglingly horrendous syntax. Is there some sane tool that just does the sane thing and shows this as call rethook_flush_task which is what the thing actually means? And no, the llvm-objdump thing isn't any better. It isn't compatible with the GNU binutils objdump, but it does the same insanely bad decoding. Linus