Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp475378iob; Wed, 4 May 2022 00:27:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+laZHWVQCXqQfUgA3nkB+UVrKkKLiuUmB5i82TTaAWMWd9yaz3TyVSb4QPlL0NbBXTaIv X-Received: by 2002:a17:907:62aa:b0:6e0:f208:b869 with SMTP id nd42-20020a17090762aa00b006e0f208b869mr18974788ejc.270.1651649244287; Wed, 04 May 2022 00:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651649244; cv=none; d=google.com; s=arc-20160816; b=WTYq9sMzO5VTg2wlh190njnAluZ1hFuK0qm02MhQE8VoEl/2UFNPYt8iNi0NqwM63F hcXwMNlIjpRS+Xm0Xl3h7cte5DPzT+tskbMMMOpO9v4NNleOgscxXc+W+wU/zS3n7ZA+ PT2c2Wd5SkDsLqcJyqLXYzktdCoMMP0XjQ7OepfWNHmeH1fSD9w8Sn/zVv80rV1MyO5M DWP/fuW3pTrCwJnCOKUHED9TzJ4q2wDuzQOmsU31yy0XFQzthJ0Kmpo9e5q7uH4F0YQO +QtVbJKTvg0BujztAS9VmZhgFWtbLRjkJI2HjhK5tqSsgC3izEh8zFDOTXsKbujQSR6/ MneA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=lO/St+o2/PonjjcblNEybj23wOVCI5+m6U1+OI/TnZE=; b=JPZLJ68JkMtHHUvvOSiyyIN7EufoiYXo/PqFGNPOLRP7LS6SfOkstqSf137HTHiriR 8C3zE3yCY9qsf+a8I0VsZeRTKj2sW+TN2wy5Z1Xnus0J3wpKqynPC2Z2qOw8GEFYYz7G ZrxKuQChEMpKz5lOw7y5vT4Dt+EdY6EsHafpSQ4w+BumWSstUc3Gj4Ae/LypQsEealzP N2OT83BrNSzb3f+bYNx1liQ/2SeyoHt1XfimHhEvB6vpV6hWEQBhJtCDR8XAm0JX+Bea 8QK2wKWWgVz5MHwgOWrX6Ka8D+EomixNNoo7iOCIMVTSZPK4K1VqAoNR/6eXXdOunvRY r5JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b=PCvGCzsv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id zo6-20020a170906ff4600b006e82f2c77cfsi15110996ejb.199.2022.05.04.00.27.01; Wed, 04 May 2022 00:27:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b=PCvGCzsv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235548AbiECUGV (ORCPT + 99 others); Tue, 3 May 2022 16:06:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230514AbiECUGT (ORCPT ); Tue, 3 May 2022 16:06:19 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B8D403C9 for ; Tue, 3 May 2022 13:02:46 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id t11-20020a17090ad50b00b001d95bf21996so3257586pju.2 for ; Tue, 03 May 2022 13:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=lO/St+o2/PonjjcblNEybj23wOVCI5+m6U1+OI/TnZE=; b=PCvGCzsvIlu1EuXOzDqVzSwE4DAmJ15LlcKthP3s6kp4sJdaVpq9wwEcFLGha/McMd E2KG//amULHo4ISJDsiQ3tbmqYzmtcZUlJtCvhMEch/LKDRQZK8W0ShcLlfggWS3h0q7 qkw6Ff1OihT0y0Hk+heZknTEeRzZmualGVja8NdrYSVda816O8WOKHPBRZ1XM0xH48Zp pheeFma0vOK2GncA1jZ/fqB0SubqSY44XUX/dLcAp8fUoktfTTqKnq2YJbL+oeV4X4ht 4lCKXiUK/OJoyFM/YS8HdWvMOfMgFbGuz2D/V8hmJUhMncrWk2CW4UwrQeubLmzIzkw4 k6Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=lO/St+o2/PonjjcblNEybj23wOVCI5+m6U1+OI/TnZE=; b=vsrbZ7y96x89vWYKW5TiSvea7T9MCi/XOEz3JQgPcs1q1N001zjfwGOp5IuqC5NLbt q7hZz0F4z7W40dmKXtFo7mJJqOV7YRPFhC0dTFqywzbnEK1CM9GsF3UUDbPf3PXinS39 oywUw2iwvzpdOQQ+LP7ixCoOzUoE7BCYfPuz6/YxjKPyNck97tvBCm7w5Q1W95PyCNan omkkOHDWPTwZc6pCAdCJy4veh9raEYXVf/sSyzIgeb7hj6LAxq47Qe4qGacgogtiE9aN 34Z3u9eMHKceEstrisNE80cfZozpYkyFQJ5SS3dGNo2DAIvnNfOgHX0OZgUaBFsgsqrw cc/Q== X-Gm-Message-State: AOAM532ZDnI6PsddHdeFnK9ATlGTWVlQYaJlX7f/eofnTIrnqgXYnIkj cb/507o1qLt216t2kWPYCVHvcRrJ9/JjJ9SMBPP7 X-Received: by 2002:a17:90a:9294:b0:1b9:48e9:a030 with SMTP id n20-20020a17090a929400b001b948e9a030mr6495804pjo.200.1651608165644; Tue, 03 May 2022 13:02:45 -0700 (PDT) MIME-Version: 1.0 References: <20220217141858.71281-1-cgzones@googlemail.com> <41224e84-2da7-3f69-0fdb-bb309ad6a3d4@schaufler-ca.com> In-Reply-To: From: Paul Moore Date: Tue, 3 May 2022 16:02:34 -0400 Message-ID: Subject: Re: [PATCH] security: declare member holding string literal const To: =?UTF-8?Q?Christian_G=C3=B6ttsche?= Cc: Casey Schaufler , SElinux list , James Morris , "Serge E. Hallyn" , Nathan Chancellor , Nick Desaulniers , Xin Long , "David S. Miller" , Ondrej Mosnacek , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , Todd Kjos , Olga Kornievskaia , Linux kernel mailing list , linux-security-module@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 2, 2022 at 9:38 AM Christian G=C3=B6ttsche wrote: > On Thu, 17 Feb 2022 at 23:50, Casey Schaufler wr= ote: > > On 2/17/2022 6:18 AM, Christian G=C3=B6ttsche wrote: > > > The struct security_hook_list member lsm is assigned in > > > security_add_hooks() with string literals passed from the individual > > > security modules. Declare the function parameter and the struct memb= er > > > const to signal their immutability. > > > > > > Reported by Clang [-Wwrite-strings]: > > > > > > security/selinux/hooks.c:7388:63: error: passing 'const char [8]= ' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible= -pointer-types-discards-qualifiers] > > > security_add_hooks(selinux_hooks, ARRAY_SIZE(selinux_hoo= ks), selinux); > > > = ^~~~~~~~~ > > > ./include/linux/lsm_hooks.h:1629:11: note: passing argument to p= arameter 'lsm' here > > > char *lsm); > > > ^ > > > > > > Signed-off-by: Christian G=C3=B6ttsche > > > > Reviewed-by: Casey Schaufler > > > > Kindly ping; > any progress on this one? I've already added my Reviewed-by tag, as has Casey, so I think it's pretty "safe" at this point. The next step is for James to pull this into the LSM tree. If it is still collecting dust at the end of this week, ping us again and I can just go ahead and pull it into the SELinux tree, it's small enough that it shouldn't cause any problems. --=20 paul-moore.com