[PATCH 00/12] w1: Constify 'struct bin_attribute'

Thomas Weißschuh posted 12 patches 1 year ago
drivers/w1/slaves/w1_ds2406.c  | 10 +++++-----
drivers/w1/slaves/w1_ds2408.c  | 42 +++++++++++++++++++++---------------------
drivers/w1/slaves/w1_ds2413.c  | 14 +++++++-------
drivers/w1/slaves/w1_ds2430.c  | 10 +++++-----
drivers/w1/slaves/w1_ds2431.c  | 10 +++++-----
drivers/w1/slaves/w1_ds2433.c  | 24 ++++++++++++------------
drivers/w1/slaves/w1_ds2438.c  | 34 +++++++++++++++++-----------------
drivers/w1/slaves/w1_ds2780.c  |  8 ++++----
drivers/w1/slaves/w1_ds2781.c  |  8 ++++----
drivers/w1/slaves/w1_ds2805.c  | 10 +++++-----
drivers/w1/slaves/w1_ds28e04.c | 18 +++++++++---------
drivers/w1/w1.c                | 12 ++++++------
12 files changed, 100 insertions(+), 100 deletions(-)
[PATCH 00/12] w1: Constify 'struct bin_attribute'
Posted by Thomas Weißschuh 1 year ago
The sysfs core now allows instances of 'struct bin_attribute' to be
moved into read-only memory. Make use of that to protect them against
accidental or malicious modifications.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Thomas Weißschuh (12):
      w1: Constify 'struct bin_attribute'
      w1: ds2406: Constify 'struct bin_attribute'
      w1: ds2408: Constify 'struct bin_attribute'
      w1: ds2413: Constify 'struct bin_attribute'
      w1: ds2430: Constify 'struct bin_attribute'
      w1: ds2431: Constify 'struct bin_attribute'
      w1: ds2433: Constify 'struct bin_attribute'
      w1: ds2438: Constify 'struct bin_attribute'
      w1: ds2780: Constify 'struct bin_attribute'
      w1: ds2781: Constify 'struct bin_attribute'
      w1: ds2805: Constify 'struct bin_attribute'
      w1: ds28e04: Constify 'struct bin_attribute'

 drivers/w1/slaves/w1_ds2406.c  | 10 +++++-----
 drivers/w1/slaves/w1_ds2408.c  | 42 +++++++++++++++++++++---------------------
 drivers/w1/slaves/w1_ds2413.c  | 14 +++++++-------
 drivers/w1/slaves/w1_ds2430.c  | 10 +++++-----
 drivers/w1/slaves/w1_ds2431.c  | 10 +++++-----
 drivers/w1/slaves/w1_ds2433.c  | 24 ++++++++++++------------
 drivers/w1/slaves/w1_ds2438.c  | 34 +++++++++++++++++-----------------
 drivers/w1/slaves/w1_ds2780.c  |  8 ++++----
 drivers/w1/slaves/w1_ds2781.c  |  8 ++++----
 drivers/w1/slaves/w1_ds2805.c  | 10 +++++-----
 drivers/w1/slaves/w1_ds28e04.c | 18 +++++++++---------
 drivers/w1/w1.c                | 12 ++++++------
 12 files changed, 100 insertions(+), 100 deletions(-)
---
base-commit: f92f4749861b06fed908d336b4dee1326003291b
change-id: 20241211-sysfs-const-bin_attr-w1-737adb3f39e0

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>

Re: [PATCH 00/12] w1: Constify 'struct bin_attribute'
Posted by Krzysztof Kozlowski 12 months ago
On Wed, 11 Dec 2024 18:50:15 +0100, Thomas Weißschuh wrote:
> The sysfs core now allows instances of 'struct bin_attribute' to be
> moved into read-only memory. Make use of that to protect them against
> accidental or malicious modifications.
> 
> 

Applied, thanks!

[01/12] w1: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/699e5f2f28c8f68ae3d3f58ba99f711b006c355b
[02/12] w1: ds2406: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/edc52050f81c5d190e7e4e7cfd1b8a6a401b394d
[03/12] w1: ds2408: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/492772838ddfd266fac83a8f47e44ee28c8d414b
[04/12] w1: ds2413: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/f597a4ce8c91dab3a192b2615769b54450031ce0
[05/12] w1: ds2430: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/be0d277fd319e1e702f325757e6fa208945d745e
[06/12] w1: ds2431: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/86b04e4dcf8ae443aef9f871874120260d89a7ee
[07/12] w1: ds2433: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/1398800d8274afe138361a803c900ad563c32bb1
[08/12] w1: ds2438: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/83544525d1ab7bade074e6a41cb5d6211b2efa0d
[09/12] w1: ds2780: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/4a68c8530fcaf12f977db89d25340d2a233d3177
[10/12] w1: ds2781: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/c797bbdac5dc5d695d56a50845f5cce25122e99a
[11/12] w1: ds2805: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/0ef2a9b2439a119508b7b80e1024f0d19dd0c7dc
[12/12] w1: ds28e04: Constify 'struct bin_attribute'
        https://git.kernel.org/krzk/linux-w1/c/0f28374e99a46bfb5ece60af0791ccc840a6aa89

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>