From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45695C433E0 for ; Mon, 29 Jun 2020 20:56:39 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1404A206F1 for ; Mon, 29 Jun 2020 20:56:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HYd0GLCF"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s+op9n5q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1404A206F1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alum.mit.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gaGJMM80lYeik7LpZHRXkZ7Wakwqxnec+1/DwvJEkfo=; b=HYd0GLCF7URoVb++YkMclyEBB vmwwJ/jokoQ/LPk0Yns8TP/mOgvyHbxz0xPT7n7e4+Dpg1gE0EucNnfzVllDEIgr0jAlj8TuK/FpZ D5ry3ZKwWW6hVfxnyvEDff+utjQg7nNKZUIQSc+GGmHngjmZlqRpVWw9W9fKaGp3iEjVYdpgNzjek iEOaD86sUqQMcxKtPdRxhxSjgRLi5IZL2N2ckhtc1W2v9mo+HfhrnlM1GocIdNPe7U7IVK7HMssHk WfMgtxNcy05Qj8Ekhljt1MjVJCydeAoziL8BOingxwH0fS72YfEL6JKa0o/8cvYQj2oBt5b6wtHCY bEDKNERDQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jq0nn-0002yo-Kw; Mon, 29 Jun 2020 20:54:55 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jq0nk-0002yT-Ii for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 20:54:53 +0000 Received: by mail-qk1-x743.google.com with SMTP id k18so16612441qke.4 for ; Mon, 29 Jun 2020 13:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9HwG2hptkvSOrRKZDzSfX9HShvoVlZLEE89Q4pxGwKg=; b=s+op9n5qGA+glqVosZzqTbnD2UvIqP3N7tNJyJ/kireTnyE28fdGxODM2aWtaXNSAC t29PEGKsQHLLcaLTDHrNrMGtDXQ8YlfqGe+c+vcrvwaDrgsSi88W6vRLEzpzcdDlh1g1 QHWPA5CGNY+wCzuiB7BwRCYt59ZK5WRsL+IHULDPubTQnwZk71cECIxPIFoh0bWOx0AX /M+hABUsvTA9G3EtAnMYeuCjL++xxyOyaLYBGYECi236pOeEmU39iaMolrQnh8DN/7QZ fLO9TQVNO2jTJAUWFk/FzhFWKlPslVJzS9+zm8yEdDZJyYFUieqf87rZqYhOeAHzoYly n1Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=9HwG2hptkvSOrRKZDzSfX9HShvoVlZLEE89Q4pxGwKg=; b=VEGnbPjxBo4CfHOitBLpvCrxGPadBJM/XZdtzHXxqJYIcoYdkGc/SlqACVi6exmuOZ CIFvlVuT88UK+3wrGIB48ZS63iggMeCxVt3KaiUYMYFz4crw6LDXbGuQNmAoAiHUDKmE hmu8fFMR/fI0ZygOOwfeL0y178YixFRXk1aq46bYRGEICi5hvjqB81h8aT1hDXSbQga9 MBaQshK4+nWIoP6dO5fiHy1Oj05okplBFJkh40VKCdXzwZ7aCr3ju4UaMFc5CdTU1W6Y DfaJS3M4uldMmlwbf2gbyZuKmyH8moU5ApuhZ8NOv20CGtrdBlx0ywp4CT2qfsjhx6Po 6L1A== X-Gm-Message-State: AOAM532NqiHd7JafewaH5jy8FbhgIKsDqaB2itN/FXWtkFFIkJ35BLwi T1RhBrBiCN1mPVu+A43e97c= X-Google-Smtp-Source: ABdhPJzhU0UkI4NLmVT8XqBz5+IwnGuJPy0JQVzhW8zoa0QRRRLDmRVoyW3MbJrOFD6WdNnoAHaCyg== X-Received: by 2002:ae9:efc7:: with SMTP id d190mr16745385qkg.212.1593464090890; Mon, 29 Jun 2020 13:54:50 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id i22sm964461qki.4.2020.06.29.13.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 13:54:50 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 29 Jun 2020 16:54:48 -0400 To: Kees Cook Subject: Re: [PATCH v4 08/17] arm64/mm: Remove needless section quotes Message-ID: <20200629205448.GA1474367@rani.riverdale.lan> References: <20200629061840.4065483-1-keescook@chromium.org> <20200629061840.4065483-9-keescook@chromium.org> <202006291301.46FEF3B7@keescook> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202006291301.46FEF3B7@keescook> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-efi , Catalin Marinas , Arvind Sankar , Will Deacon , Thomas Gleixner , linux-arch , Masahiro Yamada , "maintainer:X86 ARCHITECTURE \(32-BIT AND 64-BIT\)" , Russell King , Ard Biesheuvel , clang-built-linux , Ingo Molnar , Borislav Petkov , Arnd Bergmann , Nathan Chancellor , Peter Collingbourne , Linux ARM , Nick Desaulniers , LKML , James Morse , Joe Perches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 29, 2020 at 01:04:31PM -0700, Kees Cook wrote: > On Mon, Jun 29, 2020 at 12:53:47PM -0700, Nick Desaulniers wrote: > > On Sun, Jun 28, 2020 at 11:18 PM Kees Cook wrote: > > > > > > Fix a case of needless quotes in __section(), which Clang doesn't like. > > > > > > Acked-by: Will Deacon > > > Signed-off-by: Kees Cook > > > > Yep, I remember bugs from this. Probably should scan the kernel for > > other instances of this. +Joe for checkpatch.pl validation. > > I think the others are safe because they're in macros: Why does that make it safe -- the commit msg is a bit sparse, but I assume the problem is that it generates __attribute__((__section__("\".foo\""))) from __section(".foo") after preprocessing, and clang keeps the quotes in the section name when generating assembly, while gcc appears to strip them off. It does that even if nested in another macro, no? > > $ git grep -4 '__section("' > include/linux/compiler.h-# define KENTRY(sym) \ Am I missing something, or is KENTRY unused in the tree? > include/linux/compiler.h- extern typeof(sym) sym; \ > include/linux/compiler.h- static const unsigned long __kentry_##sym \ > include/linux/compiler.h- __used \ > include/linux/compiler.h: __section("___kentry" "+" #sym ) \ > include/linux/compiler.h- = (unsigned long)&sym; > -- > include/linux/export.h-#define __ksym_marker(sym) \ > include/linux/export.h: static int __ksym_marker_##sym[0] __section(".discard.ksym") __used > -- > include/linux/srcutree.h-# define __DEFINE_SRCU(name, is_static) \ > include/linux/srcutree.h- is_static struct srcu_struct name; \ > include/linux/srcutree.h- struct srcu_struct * const __srcu_struct_##name \ > include/linux/srcutree.h: __section("___srcu_struct_ptrs") = &name > > > > Reviewed-by: Nick Desaulniers > > Thanks! > > -- > Kees Cook _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel