From patchwork Wed Aug 28 22:55:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 172490 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1395685ily; Wed, 28 Aug 2019 15:56:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYljRFa1dmhfvRoSLT52HHvIEH8yP1FlEyU3C6LBOqSqvWINIk9ktFXQIDn61x+gvIvvgd X-Received: by 2002:a17:90b:949:: with SMTP id dw9mr6734407pjb.49.1567032964498; Wed, 28 Aug 2019 15:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567032964; cv=none; d=google.com; s=arc-20160816; b=zdEnlMfEJAmA+eed2G0M+b3w0Ee7yGpE1Wt/Jhr7w82wMEVmOCU2795FNNJRvFtgD8 Uv3TDowhNIkiyYIy10HFDx3Ore4ddvYbEC3RU2CHl6aDVnvP3LIdx6dkSVc4AUUfc/kc mhUjFUJhTwdlJKybRMpCk3gRNRqvs9z9/H/NeKD+Wr1wEHe2W4RUJEFmZKV1HRWjCMt8 wfw8E6ZhE8TRP12wJSru6iSSSdov9hjVQFaTEh88AR3HrvqLFmYCwChY8mq1lXFOX9KV AqzP8mQdDsiExBfvJ+gz3Da7ElbCBQi2WOq9iOReeHsoLrI3zTAXapLhRSjlVWFhsXdQ DUwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature; bh=Zg0X84lAW+jskRxv7RHMWautXvu8YhPHY9Jy+iSuQjU=; b=ifQN6bwmb2ZErCdOPrWS6UoHkYIiVY4LSuuf3Vhxr+9RU2nuTRzmrCdYg4921DlxMu iyutf+ehTNfueyjE185tCXYwnXdbgKOSYyc3VdtDQEOG1n3sWBBEY52wWYPQW990wbpQ EmdQHEtOohmHun48TPeNuqbKZYvrKIw5nPbxQTuyZvgeL1N3klZz5kmNDWnQbwwqxDpH lCHdMgBz0UEkfX6r0jlxGCsqFHDP+G84o/rVq4ZU156gh0TBWHEfoREJaVdR333W0Wku EfOvSduGgXztX0gzRcOz9S+55loYdAR3p7DBY64Oc3kI+PqhizBkQHvmQdwPZVU5WzgJ qzMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HX5fMmMu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si371817pgm.167.2019.08.28.15.56.04; Wed, 28 Aug 2019 15:56:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HX5fMmMu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727123AbfH1W4D (ORCPT + 28 others); Wed, 28 Aug 2019 18:56:03 -0400 Received: from mail-qk1-f201.google.com ([209.85.222.201]:38894 "EHLO mail-qk1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726896AbfH1W4B (ORCPT ); Wed, 28 Aug 2019 18:56:01 -0400 Received: by mail-qk1-f201.google.com with SMTP id l64so1645183qkb.5 for ; Wed, 28 Aug 2019 15:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=Zg0X84lAW+jskRxv7RHMWautXvu8YhPHY9Jy+iSuQjU=; b=HX5fMmMuEEYiCC+kRp4pc9Noj2nY0gtJookY+HnsuC0mXP+Kpmrhc51OO/nr8AbUBU 2JQeYXHoL+Q90dzJNfxKt1snDKKVrxKWTGVvY65zFmruqz8hJMR+8L0ijFwkTNGBOas+ ZhmuebpDc6CG/EHVSgNFTYDscfBzeKeHsYuNePRiKLlErztkDeVuqPxy/2KV8r9DBf2l m64FPQGSujdzeeeO1A+1r5G9PdHaNAwlZOrcwXDQH/QX1vzPQmBylP09k0Ply+xaQ9J/ KV/Acv/+IJICMJhT7i0vVWsqoooa2WlGa1IpXoIUKzLpwGn8rBQg8Hk6kOHhY5n5sKvZ h5Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=Zg0X84lAW+jskRxv7RHMWautXvu8YhPHY9Jy+iSuQjU=; b=CSnIIoYCf6p8BkQtlPIrKBMEqUw14jELymY0gZeMb8Cwq/Q8rwuQyWPuCmXF/akTX2 N0GBt0+qf9BUb+BDh69DuM8GkWEzE9hYOmbvzUm6Sl9MmtlxyIObksc7JD5JP04M31m7 U7kMoaUQcJltavpKqpwRvncDLOg7dJK87afLZOOSTcpwJ9R2JpLvBgCIsNN+K0giB9Fh Bpndjysmq/hk6JjB1RnNOpMlPTGcE3LKwIbb7oSGh6vxvYwWBAk/wlMtDeyc0YiDW8iw HFJqgzVzvgpX8Ha+h47TKi/ENYaUk3qMYWIzKalbk6rSAvlmEXcvXJdrdDLEo0y9kk1g eWIg== X-Gm-Message-State: APjAAAWizX30FjhNqTnK24ApcZfJ7eCdYwDmz1xW6MJFcJ40045LnxQm QwIffCFA8MfUtMLwn114MaH4B+1qRp8E6X7/mkQ= X-Received: by 2002:a0c:ea89:: with SMTP id d9mr4725816qvp.16.1567032960447; Wed, 28 Aug 2019 15:56:00 -0700 (PDT) Date: Wed, 28 Aug 2019 15:55:22 -0700 In-Reply-To: <20190828225535.49592-1-ndesaulniers@google.com> Message-Id: <20190828225535.49592-2-ndesaulniers@google.com> Mime-Version: 1.0 References: <20190828225535.49592-1-ndesaulniers@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog Subject: [PATCH v3 01/14] s390/boot: fix section name escaping From: Nick Desaulniers To: miguel.ojeda.sandonis@gmail.com Cc: sedat.dilek@gmail.com, will@kernel.org, jpoimboe@redhat.com, naveen.n.rao@linux.vnet.ibm.com, davem@davemloft.net, paul.burton@mips.com, clang-built-linux@googlegroups.com, linux-kernel@vger.kernel.org, Nick Desaulniers Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GCC unescapes escaped string section names while Clang does not. Because __section uses the `#` stringification operator for the section name, it doesn't need to be escaped. Instead, we should: 1. Prefer __section(.section_name_no_quotes). 2. Only use __attribute__((__section__(".section"))) when creating the section name via C preprocessor (see the definition of __define_initcall in arch/um/include/shared/init.h). This antipattern was found with: $ grep -e __section\(\" -e __section__\(\" -r See the discussions in: Link: https://bugs.llvm.org/show_bug.cgi?id=42950 Link: https://marc.info/?l=linux-netdev&m=156412960619946&w=2 Link: https://github.com/ClangBuiltLinux/linux/issues/619 Reported-by: Sedat Dilek Suggested-by: Josh Poimboeuf Signed-off-by: Nick Desaulniers --- arch/s390/boot/startup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.23.0.187.g17f5b7556c-goog diff --git a/arch/s390/boot/startup.c b/arch/s390/boot/startup.c index 7b0d05414618..26493c4ff04b 100644 --- a/arch/s390/boot/startup.c +++ b/arch/s390/boot/startup.c @@ -46,7 +46,7 @@ struct diag_ops __bootdata_preserved(diag_dma_ops) = { .diag0c = _diag0c_dma, .diag308_reset = _diag308_reset_dma }; -static struct diag210 _diag210_tmp_dma __section(".dma.data"); +static struct diag210 _diag210_tmp_dma __section(.dma.data); struct diag210 *__bootdata_preserved(__diag210_tmp_dma) = &_diag210_tmp_dma; void _swsusp_reset_dma(void); unsigned long __bootdata_preserved(__swsusp_reset_dma) = __pa(_swsusp_reset_dma);