unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Is with-temp-buffer really temporary?
@ 2021-04-26 17:51 Jean Louis
  2021-04-26 19:58 ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Jean Louis @ 2021-04-26 17:51 UTC (permalink / raw)
  To: Help GNU Emacs

I wish to use Emacs to accept file online and file should enter memory
and memory should be deleted thereafter.

Thus, if I use with-temp-buffer function, how sure is it that anything
that as in temporary buffer is not any more in the memory of computer?




Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is with-temp-buffer really temporary?
  2021-04-26 17:51 Is with-temp-buffer really temporary? Jean Louis
@ 2021-04-26 19:58 ` Stefan Monnier
  2021-04-26 20:53   ` Jean Louis
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2021-04-26 19:58 UTC (permalink / raw)
  To: help-gnu-emacs

> I wish to use Emacs to accept file online and file should enter memory
> and memory should be deleted thereafter.
> Thus, if I use with-temp-buffer function, how sure is it that anything
> that as in temporary buffer is not any more in the memory of computer?

Emacs Lisp does not "scrape" the memory that it stops using.
IIRC the only kind of scraping offered is what you get with
`clear-string` and AFAIK we have nothing equivalent for buffer text.


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is with-temp-buffer really temporary?
  2021-04-26 19:58 ` Stefan Monnier
@ 2021-04-26 20:53   ` Jean Louis
  2021-04-26 22:42     ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Jean Louis @ 2021-04-26 20:53 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

* Stefan Monnier <monnier@iro.umontreal.ca> [2021-04-26 22:59]:
> > I wish to use Emacs to accept file online and file should enter memory
> > and memory should be deleted thereafter.
> > Thus, if I use with-temp-buffer function, how sure is it that anything
> > that as in temporary buffer is not any more in the memory of computer?
> 
> Emacs Lisp does not "scrape" the memory that it stops using.
> IIRC the only kind of scraping offered is what you get with
> `clear-string` and AFAIK we have nothing equivalent for buffer text.

Also good to know.

And if Emacs exits, finishes the process, is memory then scraped?


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is with-temp-buffer really temporary?
  2021-04-26 20:53   ` Jean Louis
@ 2021-04-26 22:42     ` Stefan Monnier
  2021-04-27  7:11       ` tomas
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2021-04-26 22:42 UTC (permalink / raw)
  To: help-gnu-emacs

> And if Emacs exits, finishes the process, is memory then scraped?

Of course not.


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is with-temp-buffer really temporary?
  2021-04-26 22:42     ` Stefan Monnier
@ 2021-04-27  7:11       ` tomas
  2021-04-27 16:49         ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: tomas @ 2021-04-27  7:11 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

On Mon, Apr 26, 2021 at 06:42:30PM -0400, Stefan Monnier wrote:
> > And if Emacs exits, finishes the process, is memory then scraped?
> 
> Of course not.

I'd think this is your operating system's job.

Cheers
 - t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is with-temp-buffer really temporary?
  2021-04-27  7:11       ` tomas
@ 2021-04-27 16:49         ` Stefan Monnier
  2021-04-27 17:39           ` Jean Louis
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2021-04-27 16:49 UTC (permalink / raw)
  To: help-gnu-emacs

>> > And if Emacs exits, finishes the process, is memory then scraped?
>> Of course not.
> I'd think this is your operating system's job.

Also, given the way computers are currently implemented, the cost of
having to scrape all memory immediately after use would be somewhat
high, especially compared to the benefit:

- most of that memory contains data of no significance, so most of that
  work is wasted.
- it just removes one particular attack vector, among many others, so
  the added security gain is low.


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Is with-temp-buffer really temporary?
  2021-04-27 16:49         ` Stefan Monnier
@ 2021-04-27 17:39           ` Jean Louis
  0 siblings, 0 replies; 7+ messages in thread
From: Jean Louis @ 2021-04-27 17:39 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

* Stefan Monnier <monnier@iro.umontreal.ca> [2021-04-27 19:54]:
> >> > And if Emacs exits, finishes the process, is memory then scraped?
> >> Of course not.
> > I'd think this is your operating system's job.
> 
> Also, given the way computers are currently implemented, the cost of
> having to scrape all memory immediately after use would be somewhat
> high, especially compared to the benefit:
> 
> - most of that memory contains data of no significance, so most of that
>   work is wasted.
> - it just removes one particular attack vector, among many others, so
>   the added security gain is low.

Purpose is to implement Emacs Lisp based uploading of files that are
on the fly GnuPG/PGP encrypted and would like to have zero-knowledge
privacy from hosting provider. As I see it now, it is not easy
task.

Could you give me pointers on how to accept uploaded data, should I
use (read-event) to read POST request like one byte by byte?

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-27 17:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-26 17:51 Is with-temp-buffer really temporary? Jean Louis
2021-04-26 19:58 ` Stefan Monnier
2021-04-26 20:53   ` Jean Louis
2021-04-26 22:42     ` Stefan Monnier
2021-04-27  7:11       ` tomas
2021-04-27 16:49         ` Stefan Monnier
2021-04-27 17:39           ` Jean Louis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).