Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1710761pxb; Thu, 7 Oct 2021 13:28:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWTpZ8TukacXI87I2HOFjkGOBnBkGcpr1/ld4bMHt5TzQodq0/DkR9p4CUXFagW+CeSqT0 X-Received: by 2002:a17:907:629b:: with SMTP id nd27mr8398440ejc.24.1633638492626; Thu, 07 Oct 2021 13:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633638492; cv=none; d=google.com; s=arc-20160816; b=AJt1mo4eoCVkOPU9+eRVvIiizOd1OUXRthw0S6yETJdMN/87C0H4V1nYRrdmizKNBQ Lh2T0qah6lsPa92rhgXg7lwRhnaMExnM36TADyhD0a2hml0dNjvQXEqyJFpS02dm1ZVQ 8EgQOf1RrhZ9rCqgUrkRr81A0O/XDUGynOUbWkJ72RiulR7yTTcYtpMyXurjQ70ySCoq 5ZOGUEeLzS/wx66+N4vjnTJa8IS+pwxqN6Oo3Ouvby14kOmDFH3pHzvn7OmbhtQOH2jo r1O9JqJBz5GgcEOB/XIZHcgUD34uOYsV9ndb+YsprqWPuJWxO+W/I3ZZOV1pkU/Xpc9c t4Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=iFfb36heb1Xp0rc1qf/DNK3t0gf0dV0IKh/PpKDQeRs=; b=QewdaLkLaJ7Z68b2v+0hXHSErup/4WcFV0BHNA7Po+jb5059DTcSJzlg+Gd1/xd9l8 A+41tb7W8YbLzol2zZTb4RieAs2s3GBaHFWKU/C9SxJytQ+xqwf25qisKXEJJeUPZ94Q Likukb45/jyFamHJUwNQrXO/Sf890LMDSpKETyGk1YIydz+5PeIlLDDD5DCWDeKsYZSO AYFWt5QUb4dBMBl8mwSKu4xf3tPBks0CCpU/FCuUxxTVF/hi09nhtlXSUIKelSEh6E8v RGQJFePnTmjRDICd85jceskJ4hO+JGEvLZ36w19EtwpQiOqJ/XFo3QMpLjx5yBvJpj86 rd2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Dw7oQ2k1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si442463ejd.23.2021.10.07.13.27.48; Thu, 07 Oct 2021 13:28:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Dw7oQ2k1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241533AbhJGUYJ (ORCPT + 99 others); Thu, 7 Oct 2021 16:24:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232840AbhJGUYJ (ORCPT ); Thu, 7 Oct 2021 16:24:09 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07CB1C061570 for ; Thu, 7 Oct 2021 13:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=iFfb36heb1Xp0rc1qf/DNK3t0gf0dV0IKh/PpKDQeRs=; b=Dw7oQ2k1EKObaQAcRyeGwT/wRV En6bWFGQjQoCLmVJ3d+0GbZ/k8xoJfLLSeDlFtmyzyVZhrA7AlrfpTEgIzgjZRKPrWIxPoHdoztYp wORzGZmzm3Q+djkFyD82slzRQevx7CFgZUuGq1oOQq2FUlx+rjWegKhmeBZSSViglxePRLGGUwZeG GTqIYkkotaTMQVHKY6mCw0EgdRSKblMWpuSBax4/7uCNOhL0xVB3n18gAsMwNP47AR8Amx7r19f+7 VKBqIQYt+6GtY7AQEHBKolPF9AfLUYheiLVYAZ1e+tcYycgW7eTGETODf7+lbv7heXe0fCRYZSJ1V bh1XmLlg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYZu0-008XiL-SC; Thu, 07 Oct 2021 20:22:05 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 4204F981261; Thu, 7 Oct 2021 22:22:04 +0200 (CEST) Date: Thu, 7 Oct 2021 22:22:04 +0200 From: Peter Zijlstra To: herbert@gondor.apana.org.au, tianjia.zhang@linux.alibaba.com, linux-kernel@vger.kernel.org, Josh Poimboeuf Cc: x86@kernel.org Subject: [RFC] crypto/sm4: Fix objtool/libelf warning Message-ID: <20211007202204.GT174703@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, objtool is yielding the obscure libelf warning: vmlinux.o: warning: objtool: elf_update: invalid section entry size Which I tracked down to section: [3023] .rodata.cst164 PROGBITS 0000000000000000 1ab501e0 000154 a4 AM 0 0 16 Which has a section size of 0x154 (340) and an entry size of 0xa4 (164). An obvious mis-match. From there, git-grep quickly yields: arch/x86/crypto/sm4-aesni-avx-asm_64.S:.section .rodata.cst164, "aM", @progbits, 164 arch/x86/crypto/sm4-aesni-avx2-asm_64.S:.section .rodata.cst164, "aM", @progbits, 164 So those files create this .rodata section with an explicit entry size, but then don't respect it themselves. Removing the entry size makes the warning go away, but I can't tell if that's right or not, given there is zero clue as to why that entry size was specified to begin with. Please explain... --- diff --git a/arch/x86/crypto/sm4-aesni-avx-asm_64.S b/arch/x86/crypto/sm4-aesni-avx-asm_64.S index 18d2f5199194..d089cccf4db7 100644 --- a/arch/x86/crypto/sm4-aesni-avx-asm_64.S +++ b/arch/x86/crypto/sm4-aesni-avx-asm_64.S @@ -78,7 +78,7 @@ vpxor tmp0, x, x; -.section .rodata.cst164, "aM", @progbits, 164 +.section .rodata.cst164, "aM", @progbits .align 16 /* diff --git a/arch/x86/crypto/sm4-aesni-avx2-asm_64.S b/arch/x86/crypto/sm4-aesni-avx2-asm_64.S index d2ffd7f76ee2..a0f7541c2246 100644 --- a/arch/x86/crypto/sm4-aesni-avx2-asm_64.S +++ b/arch/x86/crypto/sm4-aesni-avx2-asm_64.S @@ -93,7 +93,7 @@ vpxor tmp0, x, x; -.section .rodata.cst164, "aM", @progbits, 164 +.section .rodata.cst164, "aM", @progbits .align 16 /*