Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c99ac5b3 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "Dm: init: Enable rootfs mount as dm-verity during boot without ramdisk""

parents af51b498 19047e38
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
dm_verity {
	dmname="disabled";
	version="1";
	data_device="/dev/sda6";
	hash_device="/dev/sda6";
	data_block_size="4096";
	hash_block_size="4096";
	number_of_data_blocks="262144";
	hash_start_block="262145";
	algorithm="sha256";
	// root hash: 64 bytes long
	digest=
	"b0fe12d7da6e23a1e19b5a69252c7aaf7b249191eb13bba3f566d630b3f2828a";
	salt="a2df040e00f02c3b2a19e90e5aa76fe1a303f4e08584aaf40e87f088a32b7709";
	// restart_on_corruption ignore_corruption ignore_zero_blocks
	opt="restart_on_corruption";
};
+0 −2
Original line number Diff line number Diff line
@@ -671,8 +671,6 @@
		read-only;
		ranges;
	};

	/include/ "dm-verity-boot.dtsi"
};

&ipa_hw {
+0 −35
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
 */

#include "dm-core.h"
#include "dm-ioctrl.h"

#include <linux/module.h>
#include <linux/vmalloc.h>
@@ -2057,37 +2056,3 @@ int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid)

	return r;
}

int __init dm_ioctrl(uint cmd, struct dm_ioctl *param)
{
	int r = 0;
	int ioctl_flags;
	ioctl_fn fn = NULL;
	size_t input_param_size;

	/*
	 * Nothing more to do for the version command.
	 */
	if (cmd == DM_VERSION_CMD)
		return 0;

	DMDEBUG("dm_ctl_ioctl: command 0x%x", cmd);

	fn = lookup_ioctl(cmd, &ioctl_flags);
	if (!fn) {
		DMWARN("dm_ctl_ioctl: unknown command 0x%x", cmd);
		return -ENOTTY;
	}

	input_param_size = param->data_size;
	param->data_size = sizeof(*param);

	r = fn(NULL, param, input_param_size);

	if (unlikely(param->flags & DM_BUFFER_FULL_FLAG) &&
		unlikely(ioctl_flags & IOCTL_FLAGS_NO_PARAMS))
		DMERR("ioctl %d  but has IOCTL_FLAGS_NO_PARAMS set", cmd);

	return r;
}
EXPORT_SYMBOL(dm_ioctrl);

drivers/md/dm-ioctrl.h

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef DM_IOCTRL_INTERNAL_H
#define DM_IOCTRL_INTERNAL_H

#include <linux/dm-ioctl.h>

int dm_ioctrl(uint cmd, struct dm_ioctl *param);

#endif
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o
mounts-$(CONFIG_BLK_DEV_INITRD)	+= do_mounts_initrd.o
mounts-$(CONFIG_BLK_DEV_MD)	+= do_mounts_md.o
mounts-$(CONFIG_BLK_DEV_DM)	+= do_mounts_dm.o
mounts-$(CONFIG_BLK_DEV_DM)	+= do_mounts_verity.o

# dependencies on generated files need to be listed explicitly
$(obj)/version.o: include/generated/compile.h
Loading