Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4026304img; Tue, 26 Mar 2019 01:13:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8NQrbbtpZ+D9jK7jBhmwYdPUF1iOX89UagfkjmHmp6v2wETKrvBHNAQqNeVLAScbJPmK/ X-Received: by 2002:a17:902:848d:: with SMTP id c13mr16404291plo.279.1553588009807; Tue, 26 Mar 2019 01:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553588009; cv=none; d=google.com; s=arc-20160816; b=QAmarmHvAtfuFSk2T5zgaqwiFmr8VGJJFXFpBmpLktwUXbj209i0WeAFKrRqCamdeS Kc94aXBKBe3A2ZvSxL8p3m7MhwzNXbbhBix3ASiA+ytSUdI2GYi7Oz7wud9+nPJqof6B G2WDVywVN425S5yqyJclkuhOrKq+RcR7dZa6W+yF0hMQRVBHNWo0+H4jfK+fsL9q9oyr ZyYpNsjNo37Os9/4EVhR029JvCjL3cJgx6vPAVz5wRyhgvN7bbJmpvA5LP+m6th39yvm Hc3rZgOUd4Fs9bB9Np/Zl61+wOsX/APd0pLCzyCYWJvxxS3CFGLUv4d1UXRTGcKDJDML Kv4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=KnNw3x3uIVonMYaNm1hCRelod2otCjxy0BvB7UUxoXg=; b=hVxoBGe4csJQ5cLs8/8Ec+bl/uYQYboAJg6QXJzEK24dPmK6T+pN3Sj8vXNXmRmLGy rdsv7LOXhHbtgvnDPgOi7exVyr/0bfc8QH2PG5hgxYLXmbPGAAh6hZeuJuGjzmgi7JmE arptT3mAJqqJapZ5HtWVOUQDcpkuqGApOq/MagacmyNnrsg7EW7lHnKhe2th8PHk26Qp R0S8At7gcfJrc+7CSaCZ4o0Z2F7oMXlHGpM6MBvenxIV+mHg1JkiIC3mA+OHWHqYgXJG pZT0SAvG9pZW+TRpMj+jZQEqSlXuIRR9ViVI70TLF9BzxAS4CABixaXJn8UADn5rPsjg sOAg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v61si17036049plb.60.2019.03.26.01.13.14; Tue, 26 Mar 2019 01:13:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730944AbfCZIMC (ORCPT + 99 others); Tue, 26 Mar 2019 04:12:02 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:47004 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730803AbfCZIMB (ORCPT ); Tue, 26 Mar 2019 04:12:01 -0400 Received: by mail-qk1-f196.google.com with SMTP id s81so7011016qke.13; Tue, 26 Mar 2019 01:12:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KnNw3x3uIVonMYaNm1hCRelod2otCjxy0BvB7UUxoXg=; b=Se1M+F2UAILNvSZIyLKHYc9cA1powSeRu1cetMo9ZBhH42FnMnCXc5v03yBHPoZ48P KkKROVErNg5Z9Ad2ixv50O4LfLmdbKKiieb0FSB3l+oqZ5OzcmiR2eSk5N4+uYOjfRSZ BxsYmtPf2WcUcdUQdA/ifpzIAPgJoDRCdGyorw4dY3nN2sm5wZLq+SXedjxk8kd7MG9P /lPQ/yl2bnGYREKIU4NrMOg04Vvt2EK4AhP012GRt6Ha9BmR4+jR+haQO4aLgbm0ig9D 5M8NKVsSqxCNk984d9XbsMoemr28tjf8BmnZlFCb92rwmHg6vIiE6CYo5lp7IQ4QmXjW OxSw== X-Gm-Message-State: APjAAAUlqodffwA3suLWtM47H8jQ52wyrKfY1sZYzK2/5cz8BXhQOEoA vJkSIo8Zlp5PwYymY1wOQGKp9Ss/4uVSAiNhqkM= X-Received: by 2002:a37:aa58:: with SMTP id t85mr23438691qke.291.1553587920707; Tue, 26 Mar 2019 01:12:00 -0700 (PDT) MIME-Version: 1.0 References: <20190322154425.3852517-1-arnd@arndb.de> <20190322154425.3852517-2-arnd@arndb.de> <20190326010831.GA29420@kroah.com> In-Reply-To: <20190326010831.GA29420@kroah.com> From: Arnd Bergmann Date: Tue, 26 Mar 2019 09:11:44 +0100 Message-ID: Subject: Re: [BACKPORT 4.4.y 01/25] mmc: pwrseq: constify mmc_pwrseq_ops structures To: Greg KH Cc: "# 3.4.x" , Ulf Hansson , Janusz Krzysztofik , Linus Walleij , "Tobin C. Harding" , Geert Uytterhoeven , Julia Lawall , linux-mmc , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 2:22 AM Greg KH wrote: > On Fri, Mar 22, 2019 at 04:43:52PM +0100, Arnd Bergmann wrote: > > } > > > > -static struct mmc_pwrseq_ops mmc_pwrseq_simple_ops = { > > +static const struct mmc_pwrseq_ops mmc_pwrseq_simple_ops = { > > .pre_power_on = mmc_pwrseq_simple_pre_power_on, > > .post_power_on = mmc_pwrseq_simple_post_power_on, > > .power_off = mmc_pwrseq_simple_power_off, > > Why is this needed for a stable patch? It doesn't fix a bug, it just > looks like it is a "nice thing" to have, right? I don't think any later > patch in this series relies it it, or am I missing something? Right, the benefit here is rather small. In theory, any structure of function pointers is a place into which an exploit can be placed in case someone finds a way to modify a few bytes of kernel memory. Placing the structures in read-only memory make this a little harder (it doesn't prevent rowhammer attacks though). Dropping this patch is certainly fine with me, as we have a large supply of other structure definitions like this, and we wont' get close to plugging enough of them in stable kernels. Arnd