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: <CAK8P3a3W1EYts=2uL-6kTWwcgBeigLdv-W4mnxBd+En2ZFReLA@mail.gmail.com>
Date:   Sun, 13 Sep 2020 13:46:45 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Kashyap Desai <kashyap.desai@...adcom.com>,
        Sumit Saxena <sumit.saxena@...adcom.com>,
        Shivasharan S <shivasharan.srikanteshwara@...adcom.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Anand Lodnoor <anand.lodnoor@...adcom.com>,
        Chandrakanth Patil <chandrakanth.patil@...adcom.com>,
        Hannes Reinecke <hare@...e.de>, megaraidlinux.pdl@...adcom.com,
        linux-scsi <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: compat_alloc_user_space removal, was Re: [PATCH 3/3] scsi:
 megaraid_sas: simplify compat_ioctl handling

On Sun, Sep 13, 2020 at 8:50 AM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Sat, Sep 12, 2020 at 02:49:05PM +0200, Arnd Bergmann wrote:
> > fs/quota/compat.c: dqblk = compat_alloc_user_space(sizeof(struct if_dqblk));
> > fs/quota/compat.c: dqblk = compat_alloc_user_space(sizeof(struct if_dqblk));
> > fs/quota/compat.c: fsqstat = compat_alloc_user_space(sizeof(struct
> > fs_quota_stat));
>
> I sent this out a while ago, an Al has it in a branch, but not in
> linux-next:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/log/?h=work.quota-compat

Nice! Aside from already being queued, your patch is also nicer than
my version, and it makes it trivial to fix it for arm oabi as well by adding

#ifdef CONFIG_OABI_COMPAT
#define compat_need_64bit_alignment_fixup in_oabi_syscall
#endif

to arch/arm/include/asm/compat.h

I had considered fixing that case for arch/arm as well but it ended up being
harder to do in my version.

> > drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c: karg =
> > compat_alloc_user_space(
> >
> > Had a brief look but did not investigate further, it's complicated.
> >
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: args =
> > compat_alloc_user_space(sizeof(*args));
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: args =
> > compat_alloc_user_space(sizeof(*args) +
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: args =
> > compat_alloc_user_space(sizeof(*args));
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: args =
> > compat_alloc_user_space(sizeof(*args) +
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: args =
> > compat_alloc_user_space(sizeof(*args));
> > drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c: args =
> > compat_alloc_user_space(sizeof(*args));
> >
> > Should not be too hard, but I have not looked in detail.
>
> We do not have to care about staging drivers when removing interfaces.
> But to be nice you probably ping the maintainers to see what they can
> do.

Right. As both of these are architecture specific, I also considered moving
the compat_alloc_user_space() and copy_in_user() definitions for the
respective architectures into those drivers and adding the removal
into the TODO files.

> I also have the mount side handles in this branch which I need to rebase
> and submit:
>
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/mount-cleanups

I think I had done an almost identical patch for sys_mount() last year
and forgotten about it. Again, yours is slightly better ;-)

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ