lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZnEzyJW9WAX0Rjsx@infradead.org>
Date: Tue, 18 Jun 2024 00:14:16 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: axboe@...nel.dk, tj@...nel.org, gregkh@...uxfoundation.org,
	bvanassche@....org, hch@...radead.org, josef@...icpanda.com,
	lizefan.x@...edance.com, hannes@...xchg.org,
	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
	cgroups@...r.kernel.org, yukuai3@...wei.com, yi.zhang@...wei.com,
	yangerkun@...wei.com
Subject: Re: [PATCH RFC v2 3/7] block: export some API

On Tue, Jun 18, 2024 at 11:17:47AM +0800, Yu Kuai wrote:
>  bool blkcg_debug_stats = false;
> +EXPORT_SYMBOL_GPL(blkcg_debug_stats);

exporting variables is lways a bad idea.a

>  
>  static DEFINE_RAW_SPINLOCK(blkg_stat_lock);
>  
> @@ -688,6 +689,7 @@ const char *blkg_dev_name(struct blkcg_gq *blkg)
>  		return NULL;
>  	return bdi_dev_name(blkg->q->disk->bdi);
>  }
> +EXPORT_SYMBOL_GPL(blkg_dev_name);

And this helper is just horribly to be honest.  The bdi_dev_name
should not be used anywhere in block code, and something like this
certainly should not be exported even if we have to keep it for
legacy reasons.

>  /**
>   * blkcg_print_blkgs - helper for printing per-blkg data
> @@ -815,6 +817,7 @@ int blkg_conf_open_bdev(struct blkg_conf_ctx *ctx)
>  	ctx->bdev = bdev;
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(blkg_conf_open_bdev);

This again is a horrible function papeing over blk-cgroup design
mistakes.  I absolutely should not be exported.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ